T3 VAR precision at large values – float32 internally?

Hi Maurice,

I am currently developing MODBHub, a generic Modbus TCP integration for the Hubitat home automation platform. It allows Hubitat to read and write PLC/device points directly through Modbus TCP, with the Modbus data type, register address, scaling, etc. defined in a configuration file.

I have been testing the new 32-bit integer support against a T3 controller, and I noticed an interesting precision behavior that I wanted to check with you.

For the T3 VARs, I am reading/writing two consecutive Modbus registers as a signed 32-bit integer, with a 0.001 scale. The Modbus round-trip itself is consistent: when MODBHub writes a raw INT32 value, it reads back exactly the same 32 bits.

At normal values, T3000 and MODBHub also agree exactly. For example:

111.222 in T3000 → Modbus raw 111222111.222 in MODBHub.

However, with larger values I sometimes see a small difference between the value represented through Modbus and the value displayed by T3000. For example:

112233.111 written through MODBHub → T3000 displays 112233.109

And in the opposite direction:

106599.367 entered in T3000 → MODBHub reads 106599.368

Interestingly, not every large value shows a difference. By pure chance, I also tested:

1065599.875

and both T3000 and MODBHub showed exactly 1065599.875.

Another test was:

1132233.111 written through MODBHub → T3000 displays 1132233.125, while the Modbus INT32 readback still corresponds exactly to 1132233.111.

This made me wonder whether T3 VAR values are internally represented or processed as IEEE-754 single-precision (float32), while the Modbus interface exposes them as the two-register INT32 × 1000 representation.

That would seem to explain the observations quite well: .875 is exactly representable in binary, while at larger magnitudes a float32 progressively loses enough resolution that every 0.001 increment can no longer be represented.

Is this how VAR values are represented internally in the T3 firmware? If so, is there a documented precision/resolution limit that should be taken into account when accessing VARs through Modbus?

Thanks,
Michel