Manual

Using ACL Variables 10-7
Timeouts and Flags
In this application, the Automove system is waiting for an external event to occur, for
example, a workpiece arriving on a conveyor belt. If the workpiece does not arrive within a
certain amount of time, the Automove is to turn off a heater. Assume that the event is
indicated by a "1" on Digital Input 7, and the heater is activated by a "1" on Digital Output 2.
If the heater is turned off, the Automove clears a flag (i.e., changes the variable's value from
1 to 0). The next time the heater is needed, the Automove sees that the flag is clear, turns on
the heater, and waits a few moments for it to warm up.
Table 32 - Timeouts and Flags
ACL Commands: Comments:
BD 1; VS 18, 0; XD 2, 0; ED; Variable 18 is the flag; here we set it to 0 to
indicate that the heater must be turned on the first
time. Then 2 is repeated forever to process parts
on the conveyor.
BD 2; VS 16, 100; XU 3, 128, 128; V= 18, 0;
XI 20, 1; ... ED;
Initialize the timeout variable (16) to 100. Repeat
Sequence 3 until a part arrives. Test the flag. If
the heater is off, call 20 to turn it on. Process the
part.
BD 3; V= 16, 0; XI 21, 1, 1, 4; ED; Test the timeout variable. If it is zero, call 21 to
turn off the heater, Otherwise, call 4 to subtract 1
from the timeout and wait. Note: We actually call
21 many times after the timeout is 0, but in this
case, it does not affect processing.
BD 4; V- 16, 1; WA 0.1; ED; Subtract 1 from the timeout. Wait 0.1 seconds
(so that the total timeout is 100 x 0.1 = 10
seconds).
BD 20; CD 4, 4; WA 1.5; VS 18, 1; ED; Turn on the heater and wait 1.5 seconds for it to
warm up. Set the "heater on" flag.
BD 21; CD 0, 4; VS 18, 0; ED; Turn off the heater and clear the "heater on" flag.