Chapter 4 - i/o interfacing – B&B Electronics RS-232 Digital Relay I/O 232DRIO User Manual

Page 16

Advertising
background image

14 232DRIO-0308

Manual

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

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


Command: !0S
Argument: {…} (shown in bold face)
Response: none
ASCII Example: !0S<ETX>
Dec. Example: !0S<3>
Hex. Example: !0S<03>
Bin. Example: !0S<00000011>
Description:

Relay #2 is energized (“1”), and Relay #1 is
energized (“1”).


Command: #0S
Argument: {…}{~…} (shown in bold face)

Response: none
ASCII Example: #0S<ETX><n>
Dec. Example: #0S<3><252>
Hex. Example: #0S<03><FC>
Bin. Example: #0S<00000011><11111100>
Description:

Relay #2 is energized (“1”), and Relay #1 is
energized (“1”). Note that the complement is
returned immediately following the data byte.



NOTE: If any of these lines are defined as inputs the bit settings are
ignored. Since Bit 2 is defined as Input #1 the bit setting is ignored.

Two important ideas to keep in mind when sending commands
back to back or in sequence are the following:
1)If the “!0R” is sent, one character delay must follow immediately
before any other commands are sent.
2)If the “#0R” is sent, two character delay must follow immediately
before any other commands are sent.

For example:

1) “!0R_!0S1”

2) “#0R_ _ #0S1”


Otherwise, the microcontroller will miss the second “!” or “#” and not
interpret the second command at all since it is still trying to transmit
the returned data byte(s) to the user.

Chapter 4 - I/O Interfacing

Advertising