Manual

Detailed Descriptions of ACL Commands 3-75
The <value> and <which> parameters are treated as 8-bit numbers and are similar to the
<new> and <which> parameters of the CD command, respectively. That is, the System
waits until each Digital Input matches the corresponding bit of <value>, where a True input
matches a 1 bit and a False input matches a 0. However, the System only checks those
Digital Inputs which correspond to a 1 bit in <which>. All other Digital Inputs are ignored
and do not need to match.
The <which> parameter is optional; if omitted it defaults to 255 (i.e. binary 11111111),
meaning that all 8 Digital Inputs must match <value>.
The <timeout> parameter is also optional, but cannot be specified unless <which> is also
specified. <timeout> can be any value in the range 0 through 65.535; it specifies the
maximum amount of time, in seconds, to wait before giving up and proceeding to the next
ACL command. If <timeout> is zero or is omitted then there is no timeout; i.e., the System
will potentially wait forever for the specified condition to occur.
The WN command is ignored if the System is in the Emergency Stopped state. Once a wait
has begun it can be aborted via Emergency Stop or the
ESC.K command.
The host computer can directly determine the current values of the Digital Inputs via the ON
command. Like all other ACL commands, of course, ON won't work during a WN wait.
The Digital Inputs can be enabled to trigger certain functions automatically upon a
False-to-True transition. See personality parameters 36 and 37 in Chapter 7. If any such
transitions occur during the WN command, regardless of whether the WN command is
looking at the particular input(s) which changed, the associated functions are performed after
the wait, even if the triggering Digital Input has meanwhile gone False again. (This
contrasts with the fact that transitions on the Digital Inputs are usually ignored during
motion commands such as vectors and arcs. See the MN command and Chapter 8.)
During the WN command the Digital Inputs are checked approximately every 36
microseconds (0.000036 second). If a pulse of shorter duration occurs on an Input, the
System may not see it.
If you need to check the Digital Inputs during a vector or arc, see the MN ("Mid-move
Digital Inputs Response") command.
Example: the command WN 1, 1; waits until Digital Input 0 is True. It does not pay
attention to any other Inputs. (The 1's correspond to binary 00000001, which has only bit 0
set.)
Example: the command WN 0, 4; waits until Digital Input 2 is False. (The 4 corresponds
to binary 00000100, which has only bit 2 set.)
Example: the command WN 2, 3, 4.6; waits until Input 1 is True and Input 0 is False. If
this condition has not occurred within 4.6 seconds the wait is terminated.
For more information about the Digital Inputs see Chapter 8 Using the Digital Outputs and
Inputs.