Skip to content

Trying to read holding 110 register on 46 slave with no luck #41

Description

@yury-sannikov

Command: modbus -s 46 -b 115200 -p 2 -P n -v /dev/cu.usbserial-210 110

Output

Parsed 0 registers definitions from 1 files
Serial port /dev/cu.usbserial-210. Parameters: 115200 baud, 2 stop bit(s), parity: N, timeout 5.0s.
→ < 2e 03 00 6e 00 01 e2 48 >
← < 00 2e 03 02 04 80 6e e2 00 > 9 bytes

error:

Traceback (most recent call last):
  File "/opt/homebrew/anaconda3/bin/modbus", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/modbus/__init__.py", line 100, in main
    connect_to_device(args).perform_accesses(
  File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/modbus_cli/modbus_rtu.py", line 69, in perform_accesses
    access.perform(self)
  File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/modbus_cli/access.py", line 113, in perform
    self.read_registers_receive(modbus)
  File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/modbus_cli/access.py", line 146, in read_registers_receive
    words = modbus.receive(self.request)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/modbus_cli/modbus_rtu.py", line 58, in receive
    raise NotImplementedError('RTU function {}'.format(function))
NotImplementedError: RTU function 46

Can someone please explain why it compains on RTU function 46 tough it's a slave address

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions