DO – Digital Output Status
Gets/sets the digital output [value] for [channel].
Access: Read/Write
Category: I/O
Applies to: 2CR, 2ED, 2EX, 4CR, 4ED, 4EX, 8CR
ASCII/Standalone DO all digital output status
DO[output] individual digital output status
Syntax
Read
DO[channel]
|
[channel] is number (CMD series 1-4, PMX series 1-8) for output, or not specified to read all output channels |
Reply
Returns status (CMD series 0-15, PMX series 0-255) of all outputs based on each bit designated to an output, and the value of that bit is 1 if on, or 0 if off.
Write
DO[channel]=[value], DO=[value]
|
[channel] is number (CMD series 1-4, PMX series 1-8) for output, or not specified to read all output values. [value] for individual output is 1 if on, or 0 if off, for all outputs is number (CMD series 0-15, PMX series 0-255) for setting output based on each bit designated to an output, and the value of that bit is 1 if on, or 0 if off. (See chart below) |
Reply
Command is accepted and executed
|
Bit |
Description |
Bit-Wise Command |
|
0 |
Digital Output 1 |
DO1 |
|
1 |
Digital Output 2 |
DO2 |
|
2 |
Digital Output 3 |
DO3 |
|
3 |
Digital Output 4 |
DO4 |
|
4 |
Digital Output 5 |
DO5 |
|
5 |
Digital Output 6 |
DO6 |
|
6 |
Digital Output 7 |
DO7 |
|
7 |
Digital Output 8 |
DO8 |
Command cannot be processed
An error message is returned. See Error Codes
Example
Read
D0 * Returns value for all Digital Outputs
Ex. Return a value of 12, or binary 1100, indicates outputs 3 and 4 are on and all other
outputs are off.
D03 * Returns the status of Digital Output 3
Write
D0=11 * Since 11 is binary 1011, digital outputs 1, 2, and 4 are turned on, all other outputs are turned off.
D04=1 * Sets the status of Digital Output 4 to on
Notes
None