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
- sentence 3: support check: partial - Passages describe the word-order difference and reversal option but never explicitly state that a mismatch yields wrong decoded values.
- sentence 6: support check: partial - Null padding/termination and Not Implemented 0xFFFF for uint16 are stated, and ASCII fills MSB then LSB (two chars per register), but 'many' packing is only implied by the example.
- sentence 4: review: partial - The scale-factor mechanism and the 3895 with scale factor -1 = 389.5 V example are stated, but only for Chint's CPS protocol, so 'many inverters and meters' goes beyond the passage.
-->
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.