MODBUS Binding with SMA inverter missing lower byte

I continued the investigation of the “lost byte problem”.

My power plant has 2 inverters:

    • SB 1.5-1VL-40
    • SB2500TLST-21

The “lost byte problem” shows up with the SB2500TLST-21 and not with the SB 1.5-1VL-40.

Without going into to much details:

SB 1.5-1VL-40

If register 30577 is queried with length = 2, all 13 bytes are transmitted in one MODBUS/TCP RESPONSE frame

    • Transaction ID 2 bytes
    • Protocol ID 2 bytes
    • Length 2 bytes
    • Unit ID 1 byte
    • Function code 1 byte
    • Byte count 1 byte
    • Register 30775 2 bytes
    • Register 30776 2 bytes

SB2500TLST-21

If register 30577 is queried with length = 2, the first 12 bytes are transmitted in a TCP [ACK] frame

    • Transaction ID 2bytes
    • Protocol ID 2 bytes
    • Length 2 bytes
    • Unit ID 1 byte
    • Function code 1 byte
    • Byte count 1 byte
    • Register 30775 2 bytes
    • Register 30776 MSByte

And the remaining byte is transmitted in the MODBUS/TCP RESPONSE frame

  • Register 30776 LSByte

SB2500TLST-21

If register 30577 is queried with length = 4, the first 16 bytes are transmitted in a TCP [ACK] frame:

    • Transaction ID 2bytes
    • Protocol ID 2 bytes
    • Length 2 bytes
    • Unit ID 1 byte
    • Function code 1 byte
    • Byte count 1 byte
    • Register 30775 2 bytes
    • Register 30776 2 bytes
    • Register 30777 2 bytes
    • Register 30778 MSByte

and the remaining 1byte is transmitted in the MODBUS/TCP RESPONSE frame:

    • Register 30778 LSByte

The result from register 30775 / 30776 is as expected when querying with length = 4.

There is, however, a serious downside of extending the query length.

Instead of register 30776, now register 30778 is affected.

Register 30777 / 30778 hold the Inverters current line 1 power.

This value inside OPENHAB may drop down, but will be restored during the next query of the current line 1 power, there will be just a glitch !

But what if it applies to a register that holds data used to determine whether your shutters should be open or closed ?

At a polling frequency of 1 minute ………. imagine for yourself :grimacing: