Solar Lattice

Concept

Register data encoding

ID
concept:register-data-encoding
IRI
https://solarlattice.org/kb/concept/register-data-encoding
Status
active
Also known as
scale factor, byte order, word order, 32-bit registers, Data Encoding, Data Representation, 32-bit Word Order, 32-bit Endianness
Category
Communication
Concept kind
technology

Register data encoding is the set of rules a device uses to pack numbers and text into Modbus registers, and the Modbus specification itself only clearly covers 16-bit integers, so vendors differ. A 32-bit value is built from two consecutive registers; by default the register at the lower address usually holds the upper word, but some meters let you flip this word order with a configuration bit. If the word order in your monitoring software does not match the device, 32-bit readings such as energy totals will decode to wrong values. Instead of floating point, many inverters and meters send integers with a scale factor that moves the decimal point, for example a raw 3895 with scale factor -1 means 389.5 V. Some maps use fixed scale values per register or separate scale-factor registers, while others send true floats spanning two registers. Text strings are stored as characters packed two per register, padded or terminated with a null, and unused points return a defined Not Implemented value such as 0xFFFF for an unsigned 16-bit field. When writing a 32-bit setpoint, send both registers in one Write Multiple Registers request rather than two single-register writes.

<!-- review notes

Claims

related_to

c1 drafted · lead Modbus

Modbus defines only 16-bit registers; wider values and scaling are vendor conventions layered on top.

c2 drafted · lead SunSpec Modbus

SunSpec maps carry separate scale-factor registers (e.g. M_AC_PF_SF) and require 32-bit values to be written in one transaction.

review note: support check: partial - Passages show SunSpec scale-factor registers (M_AC_PF_SF) and the single-transaction write requirement, but don't tie the write rule explicitly to SunSpec.

c3 drafted · lead Modbus addressing

Word order is defined by which register address (lower or higher) holds the high-order word.

Data