Function Code 03- Read Holding (Data) Registers - Honeywell UDA2182 User Manual

Communications card
Hide thumbs Also See for UDA2182:
  • Faq (5 pages)
Table of Contents

Advertisement

Modbus/TCP & Modbus RTU Function Codes

8.2 Function Code 03- Read Holding (Data) Registers

Description
Function code 03 (also referred to as 4X decimal references) is used to read 32-bit floating point analog
variables and 32-bit integer digital variables in the UDA as described in Section 10. Registers are
consecutive. These registers are writeable using function code 16.
If a request is made to an address that does not exist in the map in Section 10 , the UDA will honor that
request and return zeros for that address.
Broadcast is not supported.
Query
The query message specifies the starting register and quantity of registers to be read. Registers are
addressed starting at zero: registers 1-16 are addressed as 0-15.
Example: Read Analog variable #1, Analog variable #2, Analog variable #3, and Analog variable #4 as
floating point values in the UDA at slave address 1.
Slave
Address
(00 for TCP)
TCP Example
00
RTU Example
01
Response
The register data in the response message is packed as two bytes per register. For each register, the first
byte contains the high order bits and the second contains the low order bits.
The floating point values require two consecutive registers. The word order of the floating point number is
determined by the setting of the word swap configuration value. In this example, and the examples that
follow, the word swap order is yes which is big endian. Refer to section 7. The first 16 bits of the response
contain the IEEE MSB of the float value. The second 16 bits of the response contain the IEEE LSB of the
float value. If the master station requests only one register at an address of a floating point value then half
of a float will be returned.
Example: Return Analog variable #1, Analog variable #2, Analog variable #3, and Analog variable #4
where Analog variable #1=100.0, Analog variable #2=100.0, Analog variable #3=100.0, and Analog
variable #4=55.32
Slave
Address
(00 for TCP)
TCP Example
00
RTU Example
01
22
Query message format for function code 03
Function
Starting
Code
Address
High
03
00
03
00
Response message format for function codes 03
Function
Byte
Code
Count
03
10
42 C8 00 00
03
10
42 C8 00 00
UDA2182 Communications User Guide
Starting
Number
Address
Addresses
Low
High
00
00
00
00
Data
Data
42 C8 00 00
42 C8 00 00
(100)
(100)
(100)
42 C8 00 00
42 C8 00 00
(100)
(100)
(100)
Number
CRC
Addresses
(RTU)
Low
08
08
CRC
Data
Data
CRC
(RTU)
42 5D 47 AE
(55.32)
42 5D 47 AE
CRC CRC
(55.32)
CRC
(RTU)
CRC
CRC
(RTU)
January 09

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents