Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ignoreslaveaddress parameter #130

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

penguintamer
Copy link

Allows bypassing slave address check for individual responses

closes #101

@j123b567
Copy link
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