Skip to content

feat: add ignoreslaveaddress parameter#130

Open
penguintamer wants to merge 7 commits into
pyhys:masterfrom
penguintamer:ignoreslaveaddress
Open

feat: add ignoreslaveaddress parameter#130
penguintamer wants to merge 7 commits into
pyhys:masterfrom
penguintamer:ignoreslaveaddress

Conversation

@penguintamer
Copy link
Copy Markdown

Allows bypassing slave address check for individual responses

closes #101

@j123b567
Copy link
Copy Markdown
Collaborator

j123b567 commented Apr 4, 2024

To be honest, I don't like the idea of polluting every single function with this parameter.

Wouldn't it be better to implement this as a state of the instrument?

You can later set this parameter forever for universal addresses

instrument.ignore_slave_address = True

Or do one time exchanges

with instrument.expect_invalid_slave_address():
    instrument.write_register(..., NEW_ADDRESS)
    instrument.address = NEW_ADDRESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modbus ID change - Wrong return slave address

2 participants