omron — SETBELT program instruction

SETBELT program instruction SETBELT program instruction Syntax SETBELT %belt_var = expression Function Set the encoder offset of the specified belt variable equal to the value of the expression. Usage Considerations This option is available only if your system is equipped with the eV+ Extensions option. The BELT switch must be enabled for this instruction to be executed. The SETBELT instruction is generally used in conjunction with the BELT real-valued function to set the effective belt position to zero. (See Details section and WARNING below.) SETBELT cannot be executed while the robot is moving relative to the specified belt variable.

The belt variable referenced must have been defined already using a DEFBELT instruction. Parameters %belt_var Name of belt variable associated with the encoder offset to be set. expression Real-valued expression that specifies a signed 24-bit encoder offset value. Details When computing the position of a belt associated with a belt variable, eV+ subtracts the offset value from the current belt position value and uses the difference, modulo 16,777,216. The expression value is normally a signed number in the range -8,388,608 to 8,388,607. If the number is outside this range, its value modulo 16,777,216 is used.

The SETBELT instruction is generally used in conjunction with the BELT real-valued function to set the effective belt position to zero. This must be done each time the robot will perform a sequence of motions relative to the belt, and must be done shortly before the first motion of such a sequence. WARNING: It is important to execute SETBELT each time the robot is going to track the belt, to make sure the difference between the current belt position (as returned by the BELT function) and the belt position of the specified belt variable does not exceed 8,388,607 (^H7FFFFF) eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 465