omron — Basic Programming Concepts

Basic Programming Concepts The Encoder Offset The last encoder value needed for proper operation of the conveyor-tracking system is the belt encoder offset. The belt encoder offset is used by eV+ to establish the instantaneous location of the belt reference frame relative to its nominal location. In particular, if the belt offset is set equal to the current belt encoder reading, the instantaneous belt transformation will be equal to the nominal transformation. The belt encoder offset can be used, in effect, to zero the encoder reading, or to set it to a particular value whenever necessary.

Unlike the encoder scaling factor, which is constant for any given conveyor/encoder setup, the value of the belt encoder offset is variable and will usually be changed often. Normally, the instantaneous location of the reference frame will be established using external input from a sensory device such as a photocell. The DEVICE real-valued function also returns latched or unlatched encoder values for use with SETBELT. The encoder offset is set with the SETBELT program instruction, described in Belt Variable Definitions on page 199. The Belt Window The belt window controls the region of the belt in which the robot is to work. The figure Conveyor Terms illustrates the terms used here.

A window is a segment of the belt bounded by two planes that are perpendicular to the direction of travel of the belt. When defining the window, ensure that the robot can reach all conveyor locations within the belt window. This is especially important for revolute (i.e., non-Cartesian) robots. NOTE: The window has limits only in the direction along the belt. Within eV+, a belt window is defined by two transformations with a WINDOW program instruction. The window boundaries are computed by eV+ as planes that are perpendicular to the direction of travel of the belt and that pass through the positions defined by the transformations.

If the robot attempts to move to a belt-relative location that has not yet come within the window (is upstream of the window), the robot can be instructed either to pause until it can accomplish the motion or immediately generate a program error. If a destination moves out of the window (is downstream of the window), it is flagged as an error condition and the application program can specify what action is to be taken.

(See the description of the BELT.MODE system parameter in eV+ Language Reference Guide.) If the normal error testing options are selected, whenever the eV+ system is planning a robot motion to a belt-relative location and the destination is outside the belt window but upstream, the system automatically delays motion planning until the destination is within the window. However, if an application program attempts to perform a motion to a belt- relative destination that is out of the window at planning time (or is predicted to be out by the time the destination would be reached) and this destination is downstream, a window- eV+Language User's Guide, v2.x, 18318-000 Rev A Page 195