Skip to content

unit parameter #673

@ferdymercury

Description

@ferdymercury

Versions

GitHub master

Description

When using pymodbus within an IDE like Spyder3, some ModbusSerialClient functions contain a 'hidden' parameter, namely one that does not appear as autocompletion, and that can only be found by looking in the docstrings by opening the source code. I am referring to parameter 'unit' in https://github.com/riptideio/pymodbus/blob/master/pymodbus/repl/client/mclient.py
image

It's only in the docstrings that one can find about how this parameter can be tuned. I needed to tune it from default's 0 to 1 and could not find how in the beginning.

image

I suggest to change the function declaration as follows:

def read_holding_registers(self, address, count=1, unit=0, **kwargs):

There are several more functions with that hidden parameter in that file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions