Page 50
MODBus Read Command Example
Request
Response
Field Name
(Hex)
Field Name
(Hex)
Function
0x03
Function
0x03
Starting Address High 0x01
Byte Count
0x06
Starting Address Low
0x91 Register Value High (401)
Value
No. of Registers High 0x00
Register Value Low (401)
Value
No. of Registers Low
0x03 Register Value High (402)
Value
Register Value Low (402)
Value
Register Value High (403)
Value
Register Value Low (403)
Value
*All Values are base 10 unless expressed in hex notation (0X00)
Most PLC’s have simple ladder instructions that read and write Modbus values. The following
information details the data packet layout of the Modbus transactions. In most cases, it will not
be necessary to understand the content of the transaction to utilize the PLC instructions
Example Read
Example request to read registers 401 to 403
Byte
Description
Default Value
Remarks
0
Transaction Identifier High Byte
Number to track request. Response will
include this number.
1
Transaction Identifier Low Byte
2
Protocol Identifier High Byte
0
All Modbus commands must be
protocol 0.
3
Protocol Identifier Low Byte
0
4
Length High Byte
0
Start counting at byte 6. Length will
always be 0x06 for this command.
5
Length Low Byte
0x06
6
Device ID
ID of device being requested.
7
Function
0x03
Modbus function identifier.
8
Read Address Start High Byte
NOTE: Unless your software is using
zero based addressing this will typically
be one less than the starting address
you request in the TCP IP packet.
9
Read Address Start Low Byte
10
Read Length High Byte
11
Read Length Low Byte
*All Values are base 10 unless expressed in hex notation (0X00)
TCP IP Data Packet Detail
Request Structure
Содержание HazardPRO Series
Страница 1: ......
Страница 74: ...Page 71 Notes...
Страница 75: ...Page 72 Notes...
Страница 76: ...HPSM100 Rev C 2019 Electro Sensors Inc All rights reserved HazardPRO is a Trademark of Electro Sensors Inc...