Skip to content

Commit

Permalink
Show problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Nov 6, 2024
1 parent d137c6e commit 92ba05a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/client_async_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def async_handle_file_records(client):
async def async_execute_information_requests(client):
"""Execute extended information requests."""
_logger.info("### Running information requests.")
rr = await client.read_device_information(slave=SLAVE)
rr = await client.read_device_information(slave=SLAVE, read_code=1, object_id=0)
assert not rr.isError() # test that call was OK
assert rr.information[0] == b"Pymodbus"

Expand Down
8 changes: 3 additions & 5 deletions examples/client_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,9 @@ def handle_file_records(client):
def execute_information_requests(client):
"""Execute extended information requests."""
_logger.info("### Running information requests.")
# NOT WORKING: ONLY SYNC.
# FAILS WITH framer = RTU
# rr = client.read_device_information(slave=SLAVE)
# assert not rr.isError() # test that call was OK
# assert rr.information[0] == b"Pymodbus"
rr = client.read_device_information(slave=SLAVE, read_code=1, object_id=0)
assert not rr.isError() # test that call was OK
assert rr.information[0] == b"Pymodbus"

rr = client.report_slave_id(slave=SLAVE)
assert not rr.isError() # test that call was OK
Expand Down

0 comments on commit 92ba05a

Please sign in to comment.