Warnung

Sie lesen eine alte Version dieser Dokumentation. Wenn Sie aktuelle Informationen wünschen, schauen Sie bitte unter 5.0 .

URCap global 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 Tab. 33 are automatically created.

Tab. 33 List of static global variables

Name

Beschreibung

Type

By default

EYE1Prm

Store the last EYE+ parameter after using get_parameter

String

„“

EYE1AR

Store the last Asycube response after using feeder

String

„“

EYE1Pos

Store the last EYE+ pick point position 1 read

Position

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

Bemerkung

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

Tab. 34 List of global variable created dynamically for part_quantity = 5

Name

Beschreibung

Type

By default

EYE1Pos2

Store the last EYE+ pick point position 2 read

Position

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

EYE1Pos5

Store the last EYE+ pick point position 5 read

Position

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

EYE1Pos, EYE1Pos2, …, EYE1Pos5

These global variables store the last part coordinates received after sending a Basic command - 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.

    Warnung

    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.

Warnung

The global variable EYE1Pos 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

Abb. 193 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

Abb. 194 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 (Abb. 195) and then choose the type of move you want to perform (MoveJ, MoveL or MoveP). Finally, set the Waypoint to the part coordinates variable EYE1Pos. (Abb. 196).

../../../_images/move_select_frame_tool.png

Abb. 195 Choose the right robot frame and TCP in the Move command

../../../_images/move_select_variable.png

Abb. 196 Select the global variable EYE1Pos

EYE1Prm

This global variable is used to store the return value of the Advanced command - 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.

Wichtig

If you run the get_parameter command using the URScript EYErawCommand(<name>, <command>) function, the EYE1Prm global variable will not be modified.

EYE1AR

This global variable is used to store the return value of the Advanced command - 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.

Wichtig

If you run the get_parameter command using the URScript EYErawCommand(<name>, <command>) function, the EYE1AR global variable will not be modified.