Manual

10-4 Using ACL Variables
Multiplication and division are performed on normalized numbers. Multiplication gives 32
bits of precision in the internal result, and division gives 31 bits, but in both cases, the de-
normalization process may discard some of the precision.
Multiplying two integers always gives the correct result, assuming that the result does not
overflow the range -32768 through 32767.
Testing for Overflow
All of the ACL commands which operate on variables give an ACL Error 3 if a numeric
overflow occurs during the processing of the command. To test whether overflow has
occurred during a series of computations:
VC 0; OE; (...perform the computations...) VC 0; OE;
The initial OE "clears" the error mechanism in case a previous ACL error was logged and
not yet reported. The final OE sets variable 0 to zero if there have been no ACL errors, or 3
if there has been overflow. Note: Other values are also possible.
Some Possible Uses For Variables
Variables allow the Automove system to count items and to keep track of past events.
Possible applications include:
Stopping the move sequence after a certain number of failures or missing parts.
Keeping track of whether a conveyor slot contains a workpiece.
Remembering a Z-axis location for future use.
Keeping track of occupied slots on a parts tray.
Implementing a state machine (a series of operations based on the value of a "state
variable", with different transitions, depending on previous state and current inputs.)
Remembering several operator-taught locations for later use during a move sequence.
Building a table of focal-find surface heights for interpolation.
Storing manually-entered or automatically-measured information for workpiece skew
correction via translation and rotation.
Keeping track of the status of an automatic parts loader or other external device.
Examples
The following examples are not intended to be working move sequences, but are merely to
give some ideas on how variables can be used.
Counters
The following three download sequences show how to use a variable to count how many
times a particular process has been performed.