80 / 109 Issued: 11.10.2013 Version: KST VisionTech 2.1 V1
KUKA.VisionTech 2.1
Description
Line Description
3 … 6 Declaration of the variables required for the example pro-
gram.
10 Defines the interrupt program that is to be executed when the
result of the image processing is received. On successful
execution, the program sets flag 1 to TRUE. This signals to
the main program that execution can be resumed. The num-
ber of workpiece instances found is saved in the PartCounter
variable.
Note: The variables PartCounter and RESULTS[] must be
declared in the DAT file.
13 Start position of the robot
2D fixed: The robot is located outside of the camera’s field
of vision. The component is located in the camera’s field of
vision.
2D and 3D moving: The robot is located above the compo-
nent. The component is located in the camera’s field of vi-
sion.
15 Initializes the base in which the gripping point of the robot
must be taught.
16 Flag 1 is set to FALSE.
17 … 19 Variables required for the further program sequence are ini-
tialized.
21 Initializes the EKI channel with the data from the configuration
file.
22 Opens an EKI connection to the server.
23 Requests execution of the task with the name “Demo”. The
result is output in base 16. As an alternative, the subprogram
VT_Tasktrigger() can be used.
2D fixed: The result is output in the calibration base.
2D and 3D moving: The result is output in the base of the
image acquisition point or the model generation (the base
of the image acquisition point and the base of the model
generation must be identical).
24 Waits for flag 1. This is set by the interrupt program when the
result of the image processing is received. Execution of the
main program is then resumed.
26 Calls the user data of the executed task and saves them in
the 2-dimensional array APPDATA[,].
Note: The program also functions without this call.
28 Executes the loop for each component instance found.
30 Checks the results of all components found. If a result is
faulty, a message is displayed.
Note: The program also functions without this call.
32 Takes the frame data required for the correction from the
result.
33 Calculates the base in which the component must be gripped.
34 Checks whether points defined by the user lie within the area
defined by the user. In this example, relative to base 12.
Note: The program also functions without this call.