Read Holding Registers - Modbus Function Code 03 (0X03); Request; Response - Xytronix Research & Design ControlByWeb X317 User Manual

Web-enabled analog output module
Table of Contents

Advertisement

Operation
5.3.4 Read Holding Registers – Modbus Function Code 03 (0x03)
The Read Holding Registers function is used to read the analog output values. 32-bit values are read
from 16-bit register pairs. Consequently, the addresses and registers must be even numbers.

5.3.4.1 Request

Modbus TCP Request Frame Example – Read analog output 1 and 2
Field Name
Transaction Identifier
Protocol Identifier
Message Length
Unit Identifier
Function Code
Start Address
Quantity of Registers

5.3.4.2 Response

Each value is returned as two registers in IEEE 754 floating point formats. The four data bytes are
treated as two individual big-endian 16-bit words with the least significant word being sent first. In other
words, the 32-bit floating point number represented as '1234 ABCD' is sent as an 'ABCD 1234.'
The device returns a value of 0xFFFFFFFF (NaN) if there isn't a valid reading or when the output is in an
alarm condition.
X-317 Response Frame Example – Read Sensor 1 and 2
Field Name
Transaction Identifier
Protocol Identifier
Message Length
Unit Identifier
Function Code
Byte Count
Analog Out 1
Analog Out 2
Page 46
Length
Function
2 bytes
Synchronization number.
2 bytes
Zero for Modbus/TCP
2 bytes
Number of bytes in frame (below)
1 byte
Slave Address (0xff if not used)
1 byte
Read Holding Register
2-bytes
Start Address
2 bytes
Quantity of Registers
Length
Function
2 bytes
Synchronization number.
2 bytes
Zero for Modbus/TCP
2 bytes
Number of bytes in frame (below)
1 byte
Slave Address (0xff if not used)
1 byte
Read Holding Registers
1 byte
Byte Count
4-bytes
Data Value (0x00000000 – 0xFFFFFFFF)
4-bytes
Data Value (0x00000000 – 0xFFFFFFFF)
X-317™ Users Manual
Example Data
0x0001
0x0000
0x0005
0xFF
0x03
0x0510
0x0002
Example Data
0x0001
0x0000
0x000C
0xFF
0x03
0x08
0x999A41B1
0xB85142D2
Xytronix Research & Design, Inc.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ControlByWeb X317 and is the answer not in the manual?

Questions and answers

Table of Contents