B&B Electronics ADAM-6066 - Manual User Manual

Page 175

Advertising
background image

165

Chapter 6

? delimiter indicating the command was invalid.
aa (range 00-FF) represents the 2-character hexadecimal
slave network address of an ADAM-6000 module.
(data) a 2-character hexadecimal value representing the
values of the digital input module.
(cr) is the terminating character, carriage return (0Dh)

Example

command: $016(cr)
response: !01000FFD(cr) The command asks the specific
module at address 01h to return the values of all channels.
The first 2-character portion of the response (exclude the "!"
character) indicates the address of the ADAM-6000
module. The second 2-character portion of the response is
reserved, and will always be 00 currently.
The 5~8 characters of the response indicate 15~12, 11~8,
7~4 and 3~0 channels value. In this example, channels
15~12 are all OFF since the 5 characters of the response is
"0" (0000b). Channels 11~8 and 7~4 are all ON, since the 6
and 7 characters of the response are both "F" (1111b). Chan-
nel 0, 2, 3 are ON and channel 1 is OFF, since the 8 charac-
ters of the response is "D" (1101b).

#aabb(data)
Name

Write Digital Output

Description This command sets a single or all digital output channels to

the specific ADAM-6000 module.

Syntax #aabb(data)(cr)

# is a delimiter character.
aa (range 00-FF) represents the 2-character hexadecimal
slave network address of the ADAM-6000 module.
(Always 01)
bb is used to indicate which channel(s) you want to set.
Writing to all channels (write a byte): both characters should
be equal to zero (BB=00).
Writing to a single channel (write a bit): first character is 1,
second character indicates channel number which can range

Advertising