Table 3.3 - Read A/D Response

# of Channels Specified

 

Response

 

 

 

 

 

Channels Returned

 

Bytes

decimal

Hex

ASCII

 

(order of response)

 

Returned

 

 

 

 

 

 

0

0

NUL

 

Channel 0

 

2

1

1

SOH

 

Channels 1,0

 

4

2

2

STX

 

Channels 2,1,0

 

6

3

3

ETX

 

Channels 3,2,..,0

 

8

4

4

EOT

 

Channels 4,3,..,0

 

10

5

5

ENQ

 

Channels 5,4,..,0

 

12

NOTE: There are three test channels that can be read: Ref+, Ref-, and Ref+/2. Specify 13 (0Dh) to read Ref+, 12 (0Ch) to read Ref-, and 11 (0Bh) to read Ref+/2.

Reading Digital I/O Command

The Read Digital I/O command returns a byte which represents the state of the digital input and digital output. Bit 0 corresponds to the state of the digital output, and bit 3 corresponds to the state of the digital input. If a bit is a 0 then the digital state of that digital I/O is LOW. If a bit is a 1 then the digital state of the I/O is HIGH. NOTE: Bits 1-2 and 4-7 of the data byte are ignored.

Command Syntax

!0RD

Unit Response

{states}

Where {states} is a byte in which bits 0 corresponds to the current state of the digital output and bit 3 corresponds to the current state of the digital input.

Set Digital Output Command

The Set Digital Output command is used to set the state of the digital output line. This command requires a data byte. The data byte is used to specify the output state. Bits 0 corresponds to the state of the digital output. If bit 0 is a 0 then the output will be set LOW. If bit 0 is a 1 then the output will be set HIGH. NOTE: This command ignores bits 1-7 of the data byte.

Command Syntax

!0SO{states}

Where {states} is a byte in which bit 0 corresponds to the output state of the digital outputs.

Unit Response no response

14Documentation Number 232OPSDA1397 Manual

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 433-5105

Page 16
Image 16
B&B Electronics 232OPSDA manual Reading Digital I/O Command, Set Digital Output Command, 0RD, States, 0SOstates