Read/write command that returns/sets the output status of all digital outputs or return/sets statuses individually.


Applies to: CMD-4CR, CMD-4EX-SA, PMX-4EX-SA, PMX-4ET-SA, PMX-2ED-SA, PMX-2EX


ASCII/Standalone                DO                all digital input status

       DO[input]        individual digital input status

Syntax:                        

Read:

DO[output]                

Where:        [output] is number (CMD series 1-4, PMX series 1-8) for output, or not specified to read all output values.

Write:

DO[output]=[value]                

Where:        [output] 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

Read:         


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.

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

Write:         


OK


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

See also:

I/O Setup

AI, DI, DIP, DOBOOT, DOP, IO, IOBOOT, IOCFG, IOP

Commander Manual

2.1.3.2.2 High-Speed Digital Output