User Manual

179 Chapter 6
#aaccdd
Name Write DO Value to a Single Channel or All Channels
Description This command sets a single or all digital output channels to
the specific module.
Syntax #aaccdd(cr)
# is a delimiter character.
aa (range 00-FF) represents the 2-character hexadecimal
slave network address of the ADAM-6000 module.
(Always 01)
cc is used to indicate which channel(s) you want to set.
Writing to all channels (byte):
Both characters should be equal to zero.
Writing to a single channel (bit):
First character is 1.
Second character indicates channel number (00-01).
dd is the hexadecimal representation of the digital output
value(s).
Writing to all channels (byte)
The digital equivalent of these hexadecimal characters
represent the channels’ values.
Writing to a single channel (bit)
First character is always 0. The value of the second
character is either 0 or 1. (The DO value)
Response >(cr) if the command was valid.
?aa(cr) if an invalid command has been issued.
There is no response if the module detects a syntax error or
communication error or if the address does not exist.
> delimiter indicating a valid command was received.
? delimiter indicating the command was invalid.
aa (range 00-FF) represents the 2-character hexadecimal
slave network address of a module that is responding.
(cr) is the terminating character, carriage return (0Dh)
Example command: #011101(cr)
response: >(cr)
An output bit with value 1 is sent to digital output channel 1
of a module at address 01h.