Manual

3-20 Detailed Descriptions of ACL Commands
CD [<new> [, <which>]] Change Digital Outputs
This command causes an immediate change in any or all of the 8 Digital Outputs. See also
the TD ("Toggle Digital Outputs") command.
<new> is interpreted as an 8-bit number, with a useful range of 0 through 255. The number
is written immediately to the Digital Outputs. Each bit corresponds to one Digital Output; if
the bit is 1, the Digital Output is set True; if zero, it is set False. The correspondence with
Digital Outputs is as follows:
Table 9 - Changing Digital Outputs
Bit Decimal Value Digital Output
0 1 0
1 2 1
2 4 2
3 8 3
4 16 4
5 32 5
6 64 6
7 128 7
For example, to turn on Digital Outputs 3
and 4 and turn off all the others, set <new>
to 24, which is the sum of 8 and 16.
The <which> parameter is also optional, but may only be specified if <new> is specified.
<which> controls which Digital Outputs are affected by the value of <new>. If a particular
bit of <which> is 1, the corresponding Digital Output is immediately set to the
corresponding bit of <new>, and the old value of that Digital Output is forgotten. If a bit of
<which> is 0, the corresponding Digital Output retains its old level and the corresponding
bit in <new> is ignored.
If <which> is omitted it defaults to 255 (i.e. binary 11111111), meaning that all 8 Digital
Outputs are affected by <new>.
After the Digital Outputs have been given the new command, the machine waits a certain
amount of time before processing the next command. This delay is specified via the WD
command; it should be great enough to allow any associated external hardware to complete
its action, if necessary. (Alternatively, the WA command can be used to produce a unique
value of delay after each CD.)
If <new> is omitted, and also at Emergency Stop, IN, and power up, the Digital Outputs are
all set to the False state.