Plugin variables

The EYE+ URCap creates global variables dynamically to store some useful information. As soon as a URCap program node is opened with a connected EYE+, all global variables listed in the Table 2 are automatically created.

Table 2 List of static global variables

Name

Description

Type

By default

EYEParam

Store the last EYE+ parameter after using get_parameter

String

“”

EYEAsyRes

Store the last Asycube response after using feeder

String

“”

EYEPos

Store the last EYE+ pick point position 1 read

Position

p[0,0,0,0,0,0]

Note

If the command set_parameter part_quantity n is used with n > 1, the global variables listed in Table 3 are automatically created (according to the value of n).

Table 3 List of global variable created dynamically for part_quantity = 5

Name

Description

Type

By default

EYEPos2

Store the last EYE+ pick point position 2 read

Position

p[0,0,0,0,0,0]

EYEPos5

Store the last EYE+ pick point position 5 read

Position

p[0,0,0,0,0,0]

EYEPos, EYEPos2, …, EYEPos5

These global variables store the last part coordinates received after sending a EYE get_part. The position variable is defined as: p[X,Y,0,0,0,RZ].

  • The X and Y coordinates of the part stored in the variable are only valid in the robot frame that you defined during the hand-eye calibration. These coordinates are also only valid with the same Tool Center Point (TCP) as used during the hand-eye calibration.

    Warning

    For positioning the robot in space, the system uses meters.

  • The Z coordinate is set to 0. You have to add an offset in the Z direction in the position to avoid hitting the plate of the Asycube when picking up a part.

  • RZ is the angle sent by EYE+ in radian.

Warning

The global variable EYEPos is expressed in terms of roll, pitch and yaw. As the robot is expecting a rotation vector, you cannot directly move to the position. You at least have to add the 0-position of the robot as presented below.

../_images/correction_before_move.png

Fig. 22 Position correction before Move

Most of the time, an RX or RY angle offset must be added to reach the part position.

../_images/correction_before_move2.png

Fig. 23 Position correction before Move with a correction on RX angle

To move the robot to the global variable coordinates, you can select the basic robot command called Move. Make sure you use the right TCP and frame (Fig. 24) and then choose the type of move you want to perform (MoveJ, MoveL or MoveP). Finally, set the Waypoint to the part coordinates variable EYEPos. (Fig. 25).

../_images/move_select_frame_tool.png

Fig. 24 Choose the right robot frame and TCP in the Move command

../_images/move_select_variable.png

Fig. 25 Select the global variable EYEPos

EYEParam

This global variable is used to store the return value of the EYE get_parameter command. Each time a new parameter is read, the last parameter stored in the variable is erased and replaced by the new one.

Important

If you run the get_parameter command using the URScript EYERawCommand function, the EYEParam global variable will not be modified.

EYEAsyRes

This global variable is used to store the return value of the EYE feeder command. Each time a new Asycube response is received, the last response stored in the variable is deleted and replaced by the new one.

Important

If you run the feeder command using the URScript EYERawCommand function, the EYEAsyRes global variable will not be modified.