Instruction Manual

132 User Variables and Arithmetic Conversions
Publication 1398-PM601A-EN-P October 2000
TUTORIAL
encoder positions to a value, for example, WAIT POS1 > V4. The comparison statement WAIT
POS1 > V4 will not properly account for rollover. It should be written so that a direct 32 bit math
function is performed on values in encoder counts before the comparison is done.
For example:
WAIT POS1 > V4
could be rewritten as:
V5 = UTOC1 V5
WAIT (@POS1 - V5) > 0