User manual

Project:
The following example project shows how the ACL
program is used with the Vision System, in order to
automate the robot and the Vision System. The example
is made from two programs:
ACL: for the robot task
Visual Basic Script: for the vision task.
GOPOS.ACL
(Note: N should be a Global Variable.)
The code initiates the global variable VF before
sending comments to the Vision System, so that it
can cause the ACL program to wait until the vision
command is finished. This happens when VF is 1.
The program tells the Vision System to Snap, then
executes the GetPos function in the script. The results
of the GetPos function is a string that is an ACL
command. If the search results are 3, for example,
then set N to 3 (“set n=3”).
SETPOS takes the position of the object from the
measurement table that was found after the search,
and converts it to positions that can be sent.
ALL takes every position from the Measurement
Table and sets them into positions in the vector.
At the end of GoPos, the program moves the robot to
the position in the vector.
PROGRAM GOPOS
*********************
SET VF = 0
PRINTLN "%SNAP%"
WAIT VF = 1
SET VF = 0
PRINTLN "%RUN GETPOS%"
WAIT VF = 1
SET VF = 0
PRINTLN "%SETPOS POS,ALL,,60%"
WAIT VF = 1
FOR I = 1 TO N
MOVED POS[I]
ENDFOR
END
ViewFlex v.3.3 2-26 User Manual
1209