beautypg.com

Vrun statement – Epson 5 User Manual

Page 197

background image

VRun Statement

VRun Statement

Applies To

Vision Sequence

Description

VRun is a SPEL

+

language statement used to initiate execution of vision sequences which were created in

the Vision Guide development environment.

Usage

VRun Sequence

Sequence Name of a sequence or string variable containing a sequence name.

Remarks

Once a vision sequence has been created in the Vision Guide development environment it can be executed
from the development environment or from within a SPEL

+

program. The VRun SPEL

+

Language

statement initiates execution of vision sequences.

When VRun is initiated the vision sequence specified begins execution. This means that an image is
acquired (unless the user sets the RuntimeAcquire property to False) into the frame buffer, and then vision
objects are applied to that image as defined in the vision sequence.

It is important to note that VRun returns prior to completing execution of the vision sequence specified
with VRun. Once the image is acquired, VRun returns control to the next SPEL

+

statement which follows

VRun. This improves the throughput of the overall cycle time by allowing other SPEL

+

statements to

execute while vision processing occurs. (For example, the robot can move during vision processing, or a
calculation could be performed during this time.)

Once VRun is executed, VGet is normally used to get the results of the vision sequence such as part
position data, good part bad part status, part count information or many other results. Shown below is a
simple program which uses VRun and VGet to execute a vision sequence and then use results from that
sequence to display useful information to the user.

Function test

'It is assumed that a sequence called FindHoles has already been created

'prior to running this program. FindHoles contains a Blob object called Part

'which is configured to find how many holes are in the search window.

'In this example, we will run the sequence and then display the number

'of holes which were found.

Integer count

VRun FindHoles 'Run the vision sequence

VGet FindHoles.Part.Holes, count 'Get the # of holes found

Print count, "holes found"

Fend

See Also

VGet, VSet, Vision Sequences

Vision Guide 5.0 Reference (Ver.5.3) Rev.1

183