omron — DEFBELT program instruction

DEFBELT program instruction location of the belt. Belts numbered from 1 to 6 can be specified. This can be specified with a constant, a variable, or an expression. vel_avg (This parameter is currently ignored, but some value must be provided.) scale_fact The calibration constant that relates motion of the conveyor belt with counts of the encoder mounted on the conveyor. This value (which can be supplied as a constant, a real variable, or an expression) is interpreted as having the units in millimeters of belt travel per encoder count. Details A conveyor belt is modeled by a belt variable.

In addition to the parameters for the DEFBELT program instruction, a belt variable contains the following information: l Window parameters, which define the working range of the robot along the belt. (Set with the WINDOW instruction.) l An encoder offset, which is used to adjust the origin of the belt frame of reference. (Set with the SETBELT instruction.) Belt variables have the following characteristics: l Belt variable names must always be preceded by the percent character (%), for example, %main.belt. Otherwise, the normal rules for variable names apply. l Belt variable arrays are allowed, for example, %b[x].

l Belt variables can be passed as subroutine parameters just like other variables. l Belt variables can be defined only with the DEFBELT instruction-there is no assignment instruction for them. Thus, the following are not valid instructions: %new_belt = %old_belt SET %new_belt = %old_belt l Belt variables cannot be stored on a mass-storage device. (Variables used to define the parameters in a DEFBELT instruction can be stored, however.) Example The following instruction defines the belt variable %belt.var. The value of b.num must be the number of the encoder to be associated with this belt variable.

The variable b.num is also used as an index for arrays of data describing the position and orientation of the belt, its velocity smoothing, and the encoder scale factor. DEFBELT %belt.var = belt.nom[b.num], b.num, v.avg[b.num], belt.sf eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 157