7 ip message format, 1 computer (master) message format, 2 device (slave) message format – In-Situ Aqua TROLL 400 Modbus and SDI-12 Reference Guide User Manual

Page 58: 8 data addresses (registers), Ip message format, Computer (master) message format, Device (slave) message format, Data addresses (registers)

Advertising
background image

• 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 response data from the device in hex characters. For an

error response, the payload will be a 1 byte value 1-255.

• 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 <CR><LF> characters.

8.7 IP Message Format

The IP message format is based on the RTU format but eliminates the CRC because TCP/IP
will ensure that the message bytes are transmitted correctly. The instrument does not support IP
format. However, the protocol can be used through a connected telemetry device.

TCP/IP is an asynchronous protocol. The significance is that the device must send its response
to the address of the sender (computer). This differs from the serial RTU and ASCII formats
where the protocol assumes only a single master device (computer) which does not have an
address. For this reason, the IP format has a different header than the RTU serial formatted
message.

8.7.1 Computer (Master) Message Format

Xac ID Protocol ID Msg Length

Device Address Function Code

Data Payload

• Xac ID: 2 byte transaction ID to provide for asynchronous messages.
• Protocol ID: 2 byte field – always 0.
• Length: 2 byte field represents number of bytes following.
• Device Address: 1 byte field with a value ranging from 1 to 247. Broadcast address is 0.
• Data Payload: 0-N bytes with information required to complete the requested function

code operation.

8.7.2 Device (Slave) Message Format

Xac ID Protocol ID Msg Length

Device Address Function Code

Data Payload

• Xac ID: transaction ID echoed from message.

• Protocol ID: 2 byte field – always 0.

• Length: 2 byte field represents number of bytes following.

• Device Address: Echoed from message. No response for broadcast.

• Data Payload: 0-N bytes with information required to complete the requested function

code operation.

8.8 Data Addresses (Registers)

As shown in the section pertaining to message formats, the function code from the Master’s
message tells the Slave device what operation to perform. There are a number of standard
function codes defined by Modbus. These functions typically operate on atomic chunks of data
historically and generically called registers. A register is quite simply a data address. A Modbus

58

Advertising
This manual is related to the following products: