To carry a 32-bit IEEE 754 floating-point value over Modbus (whose registers are 16 bits), two consecutive registers are typically used, with the byte order documented by the slave manufacturer.
True
Modbus is natively 16-bit, so any 32-bit IEEE 754 float or long integer must span two consecutive registers. For example, an energy meter reading of 12345.67 kWh encodes in IEEE 754 as 0x4640E5C2 (four bytes), which maps in Big Endian to Register N = 0x4640 and Register N+1 = 0xE5C2. The client issues a 0x03 request with count = 2 and reassembles the value. Modern libraries (pymodbus, libmodbus) handle the conversion automatically, provided the byte order is specified correctly.
Never read a single register out of a 32-bit pair: always read both at once with a single function 0x03, otherwise the slave may update the second register between the two reads and you get a torn value.
Modbus bank in preparation
The full Modbus bank isn't available yet. Drop your email to get notified at launch and grab an early-bird discount.
Join the waitlist →See the 9 other Modbus practice questions
Related questions
- A Modbus RTU bus on RS-485 supports up to 32 nodes per segment (extendable with repeaters), requires 120 ohm termination resistors at both ends of the bus, and biasing resistors to define the idle state.3. Modbus RTU · RS-485 Multi-Drop
- Which Modbus function code is used to READ the Holding Registers (16-bit read/write registers) of a slave?4. Function codes · Lesen Coils/Register
- Function 0x06 "Write Single Register" writes a single 16-bit Holding Register on a Modbus slave, with both the address and the value encoded on 16 bits each in the request.4. Function codes · Write Single Register (0x06)
- Modpoll (focus-sw.com) and mbpoll (Linux/macOS) are free command-line tools used to query a Modbus slave from a PC, indispensable for Modbus diagnostics and integration commissioning.6. Practical · Modpoll / mbpoll
- Modbus (RTU and TCP) has no native security: no authentication, no encryption, no signatures. The accepted good practice is strict OT VLAN isolation, an industrial firewall and no direct internet exposure.6. Practical · Cybersecurity