Electrician here, got handed the SCADA side of a sub meter because nobody else would touch it. Power meter on the main incomer, Modbus TCP, Ignition 8.1 Modbus driver. The meter manual says kW is a 32-bit float at holding registers 3054 and 3055, so I made an address HRF3054 and the tag reads 1.27e+30, or sometimes minus a few million. The meter's own display says 401 kW.
Thought it might be an off by one, so I tried 3053 and 3055 as the start and got a zero and a different piece of nonsense. The voltage registers, which the manual has as 16-bit, read right to the volt, so the connection and the unit ID are fine.
Two days on one tag and I'm at a loss. Any ideas where I'm going wrong on the float?
Which page of the manual, and does it give the two registers as high word first or low word first? Some meters print it in the notes as "float, LSW first". And post the raw values of 3054 and 3055 as two separate 16-bit reads, HR3054 and HR3055.
Page 41 of the register map. It says "32-bit float, LSW first". Raw: HR3054 = 29056, HR3055 = 17352. Means nothing to me, but there it is.
It means everything. 17352 is 0x43C8 and 29056 is 0x7180. Put them together as 0x43C87180 and that is 400.9 as a float, your 401. Your meter sends the low word first and the driver puts the first register in the high half, so it reads 0x718043C8, which is your 1.27e+30.
Ignition: device settings for the Modbus device, Advanced, tick Reverse Word Order, save. Every float and 32-bit int on that device flips with it, which is what you want if the meter does them all the same way. No scaling, no offset, the value comes out in kW as printed.
The off by one thing is real, 40001 versus 0 has bitten me more than once, but the voltages already proved your addressing.
Longer version with the word order tables: https://plctr.com/understanding-the-communication-protocols-for-plc-and-scada-systems/
Reverse Word Order ticked and kW reads 400.9 against 401 on the meter. That's the power sorted. Except the energy total, kWh, which the manual has as a 32-bit unsigned int at 3204, now reads a huge number instead of the 84,000 odd on the display.
Same fix, different address type. HRUI for unsigned 32-bit, not HRI. Check what you typed there.
Checked, it was HRUI already. So I read the manual again, page 43, and the energy registers are marked "MSW first", the opposite of the power ones. Same meter, two word orders. Reverse Word Order is per device, so I read 3204 and 3205 as plain HR and an expression tag does 3204 times 65536 plus 3205. kWh matches the display now.
Short of it, the meter sends its floats low word first and the driver was putting them together the other way round. That's your 1.27e+30. Reverse Word Order sorted the power registers, and the energy total goes the opposite way so it gets stitched together by hand.
Why one meter would do both in the same register map I'm not sure. Manual doesn't say either. Thanks marcob, valh7.
Two word orders in one register map. That's a new one on me.