12 232DRIO-0308 Manual
B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350
PH (815) 433-5100 -- FAX (815) 433-5104
Example 3.1 Set Output Lines
Data Byte Relays
Binary Decimal Hex Relay #2 Relay #1
XXXXXX00 0 0 de-energized de-energized
XXXXXX01 1 1 de-energized energized
XXXXXX10 2 2 energized de-energized
XXXXXX11 3 3 energized energized
Symbol: X don’t cares (default setting should all be “0”)
To energize the relays, the corresponding bit of the data byte must
be set high. Conversely, to de-energize the relays the
corresponding bit of the data byte must be set low.
(00000011, 3 in decimal, 3 in hex: energized both relay #1 and #2)
Example 3.2 Read I/O Lines
Data Byte Returned Status
Binary Dec Hex ASCII Input #1 Relay #2 Relay #1
00000000 0 00 NUL low de-energ. de-energ.
00000001 1 01 SOH low de-energ. energ.
00000010 2 02 STX low energ. de-energ.
00000011 3 03 ETX low energ. energ.
00000100 4 04 EOT high de-energ. de-energ.
00000101 5 05 ENQ high de-energ. energ.
00000110 6 06 ACK high energ. de-energ.
00000111 7 07 BEL high energ. energ.
Notice that the returned data byte starts at address 00000000 in
binary, 0 in dec., 0 in hex., or NUL in ASCII. From left to right (msb
to lsb), the first five bits are really XXXXX “don’t cares” but are
defaulted as “00000”. The remaining three bits represent input #1,
relay #2, and relay#1, respectively. A “1” or a HIGH represents relay
energized/input present, and a “0” or a LOW represents relay de-
energized/input absent.