Function Code 04 - Read Input Registers - Honeywell UDA2182 User Manual

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

Advertisement

8.3 Function Code 04 - Read Input Registers

Description
Function code 04 (3X references) provides read access to the UDA signals.
If a request is made to an address that does not exist in the map in Section 101, the UDA will honor that
request and return zeros for that address. These registers are read-only.
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 PV1, PV2, TEMP1, and TEMP2 as floating point values in the UDA at slave address 1.
Slave
Address
(00 for TCP)
TCP Example
RTU Example
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 is set to yes for big endian. Refer to subsection 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 PV1, PV2, TEMP1, and TEMP2 where PV1=100.0, Analog PV2=100.0, TEMP1=100.0,
and TEMP2=55.32
Slave
Address
(00 for TCP)
TCP Example
00
RTU Example
01
January 09
Query message format for function code 04
Function
Starting
Code
Address
00
04
01
04
Response message format for function codes 04
Function
Byte
Code
Count
04
08
04
08
UDA2182 Communications User Guide
Modbus/TCP & Modbus RTU Function Codes
Starting
Address
Addresses
High
Low
00
00
00
00
Data
Data
42 C8 00 00
42 C8 00 00
(100)
(100)
42 C8 00 00
42 C8 00 00
(100)
(100)
Number
Number
Addresses
High
Low
00
08
00
08
Data
Data
42 C8 00 00
42 5D 47 AE
(100)
(55.32)
42 C8 00 00
42 5D 47 AE
(100)
(55.32)
CRC
CRC
(RTU)
(RTU)
CRC
CRC
CRC
CRC
(RTU)
(RTU)
CRC
CRC
23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents