
iNS-308 User Manual
Copyright
©
2022 ICP DAS CO., Ltd. All Rights Reserved.
- 34 -
7.2 Modbus Message Structure
Modbus devices communicate using a master-slave (client-server) technique in which only one device
(the master/client) can initiate transactions (called queries). The other devices (slaves/servers)
respond by either supplying the requested data to the master, or by taking the action requested in
the query.
A query from a master will consist of a slave, or broadcast, address, a function code defining the
requested action, any required data, and an error checking field. A response from a slave consists of
fields confirming the action taken, any data to be returned, and an error checking field.
The Modbus/TCP Message Structure
The Leading 6 bytes of a Modbus/TCP Protocol Query
Transaction identifier = Assigned by the Modbus/TCP master (client)
Protocol identifier = 0
Length field (upper byte) = 0 (since all messages are smaller than 256)
Length field (lower byte) = The number of following RTU data bytes
Modbus RTU Data Structure
Net ID: Specifies the address of the receiver (i.e., the Modbus/TCP slave).
Function Code: Specifies the message type.
Data Field: The data block.
Bytes 00 - 05
Bytes 06 - 11
6-byte header
RTU Data
Byte 00
Byte 01
Byte 02
Byte 03
Byte 04
Byte 05
Transaction Identifier
Protocol Identifier
Length Field
(upper byte )
Length Field
(lower byte)
Byte 06
Byte 07
Bytes 08 - 09
Bytes 10 - 11
Net ID
(Station Number)
Function Code
Data Field
Reference Number
(Address Mapping)
Number of Points