Skip to content

Questions on Power, current, and energy #1

@robert-wilcox

Description

@robert-wilcox

Hello, I just stumbled on your library as I'm developing for what appears to be the same device. This was a great find and I would love to contribute to this rather than re-inventing the wheel. Looking at how you're reading the current, power, and energy I think there may be an issue or I have a slightly different device. My documentation has power, current, and energy existing in 2 separate 16 byte registers. In order to read the total current, I think you need to read a long from the device and adjust for little endian and byte swapping. Something more like this:
current = instrument.read_long(1, 4, False, minimalmodbus.BYTEORDER_LITTLE_SWAP)/1000 # Registernumber, number of decimals
Let me know if you have a slightly different device than what I have. Happy to submit a patch to your repo as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions