7 PROGRAMMING A ROBOT WITH IRC
Figure 23: Camera command in the program editor.
Under Type the type of camera must be selected, under Name the name defined in the configuration
must be entered. The output variables for target position and model class must have been declared
beforehand by store command. The target position contains the position and orientation of the object
in the coordinate system of the robot, while the model class contains an identification number for the
detected object type. If no object was detected the value of the model class is "-1".
ð
The camera command does not wait if no object has been detected. Use an If statement
or a condition loop to check whether the camera has actually detected an object!
ð
The orientation of the object can cause a slow linear movement of the robot!
If the rotation of the tool axis takes longer than the movement of the tool to the object
position, then the movement is slowed down accordingly. This happens even if no tool
axis is installed. If the object orientation is not relevant or no tool axis is installed, this
can be avoided as follows:
1. Determine the orientation of the robot before moving to the object position, for
example by defining a new position variable there and initializing it with the cur-
rent position. If no tool axis is installed you can use the constant orientation val-
ues from the information area of iRC.
2. Create three assignment statements (Math statement) and overwrite the A, B and
C components of the target position with the determined values.
©2022 igus® GmbH
35