Skip to content

Writes time out on APSystems ECU-R because it only supports multi-register writes (0x10), not single-register writes (0x06) #104

@MartijnVdS

Description

@MartijnVdS

I've been trying to set WMaxLimPct (part of model 123, immediate controls) on my APSystems ECU-R / YC600 and it does not work.

model.WMaxLimPct.cvalue = 100.0
model.write() # this gives a timeout

The problem seems to be that the other end does not support function code 0x06 (single-register write), but only 0x10 (multi-register write), while pysunspec2 contains some logic to use single-register writes if only a single change was done on the model.

By manually disabling the check (changing if count == 1: in sunspec2/modbus/modbus.py line 781 to if False), writes always use function 0x10 and they succeed; values get updated correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions