omron — Location, Motion, and External Encoder Functions

Location, Motion, and External Encoder Functions Location, Motion, and External Encoder Functions eV+ provides numerous functions for manipulating and converting location variables. See Motion Control Operations for details on motion processing and a table that includes all location-related functions. For details on the external encoders, see Reading Device Data on page 220. Examples of Location Functions The instruction: rotation = RZ(HERE) places the value of the current rotation about the Z axis in the variable rotation. The instruction:

dist = DISTANCE(HERE, DEST) places the distance between the motion device's current location and its destination (the value of the next motion instruction) in the variable dist. The instructions: IF INRANGE(loc_1) == 0 THEN SPEED 50 END MOVE(loc_1) END IF SPEED(2) > 50 THEN ensures that loc_1 is reachable and moves the motion device to that location at a program speed not exceeding 50. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 84