2 device (slave) response format, 6 ascii message format, 1 computer (master) message format – In-Situ Aqua TROLL 400 Modbus and SDI-12 Reference Guide User Manual
Page 57: Device (slave) response format, Ascii message format, Computer (master) message format

8.5.2 Device (Slave) Response Format
Device Address
Function Code
Data Payload
CRC
• Device Address: Echo of device address sent in the message to the device. A broadcast
message will not generate a response.
• Function Code: Echo of the function code sent to the device in the message packet. If an
error occurs, the top bit of the byte is set and the data payload is the 1 byte error code
from the device.
• Data Payload: 0-N bytes with response data from the device. For an error response, the
payload will be a 1 byte value 1-255.
• CRC: 2 bytes with a value computed mathematically from the message bytes. This value
can be computed on both sides of the link and verified to ensure that the bits of the
message were transmitted and received correctly.
8.6 ASCII Message Format
The ASCII formatted message is almost identical in content to the RTU formatted message with
the addition of the Start Of Packet (SOP) and End Of Packet (EOP) characters. The SOP
character is a ‘:’ and the EOP is the combination carriage return
linefeed
The contents of the packet are converted to 2 byte hex characters 0-9 and A-Z. For example,
the 1 byte device address 25 would be two bytes 0x3235 where 0x32 is the ASCII character ‘2’
and 0x35 is the ASCII character ‘5’. This ensures that the message contents never contain SOP
or EOP characters.
The check value uses a different mathematical algorithm and is called an LRC.
8.6.1 Computer (Master) Message Format
Start Packet Device Address Function Code
Data Payload
LRC
End Packet
• Start Packet: the ‘:’ character signals the start of an ASCII packet.
• Device Address: 2 byte field containing the device address 1-247 in hex characters.
• Function Code: 2 byte field with a value range 1-127 representing the standard or
extended function code in hex characters.
• Data Payload: 0-N bytes with information required to complete the requested function
code operation. Each data byte is represented in its two byte hex character format.
• LRC: 2 bytes represented in hex characters with a value computed mathematically from
the message bytes. This value can be computed on both sides of the link and verified to
ensure that the bits of the message were transmitted and received correctly.
• End Packet the
8.6.2 Device (Slave) Response Format
Start Packet Device Address Function Code
Data Payload
LRC
End Packet
• Start Packet: the ‘:’ character signals the start of an ASCII packet.
• Device Address: 2 byte field containing the device address 1-247 in hex characters.
57