Modbus Message Structure - ICP DAS USA iNS-308 User Manual

8-port 10/100base-tx iot switch
Table of Contents

Advertisement

iNS-308 User Manual

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
Bytes 00 - 05
6-byte header
The Leading 6 bytes of a Modbus/TCP Protocol Query
Byte 00
Byte 01
Transaction Identifier
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
Byte 06
Net ID
(Station Number)
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.
Copyright © 2022 ICP DAS CO., Ltd. All Rights Reserved.
Bytes 06 - 11
RTU Data
Byte 02
Byte 03
Protocol Identifier
Byte 07
Bytes 08 - 09
Reference Number
Function Code
(Address Mapping)
Byte 04
Byte 05
Length Field
Length Field
(upper byte )
(lower byte)
Bytes 10 - 11
Data Field
Number of Points
- 34 -

Advertisement

Table of Contents
loading

Table of Contents