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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/advancedusage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ Add this to :func:`._extract_payload` function, after the argument validity test
pass


Handling instrument address mismatch
--------------------------------------------------------------------------
Some commands or instrument access patterns may result in responses whose reported slave
address differs from the address used to send the command. Examples include sending a
command to change the device's address or using a "universal address" to communicate
with a single connected device. Note that you should never use a "universal address" when
more than one device is connected to the bus.

To ignore the slave address returned by a command, set the "ignoreslaveaddress" parameter
to True:

instr = minimalmodbus.Instrument('/dev/ttyUSB0', 1)
# change device's address to 23 using register 0x17
instr.write_register(0x17, 23, ignoreslaveaddress=True)


Install or uninstalling a distribution
--------------------------------------------------------------------------

Expand Down
Loading