2024-03-22 08:36:51,401 INFO logging:97 Server listening.
updating_task: started: initialised values: [0, 0, 0, 0, 0, 0] at address 16
updating_task: incremented values: [1, 1, 1, 1, 1, 1] at address 16
updating_task: incremented values: [2, 2, 2, 2, 2, 2] at address 16
updating_task: incremented values: [3, 3, 3, 3, 3, 3] at address 16
updating_task: incremented values: [4, 4, 4, 4, 4, 4] at address 16
updating_task: incremented values: [5, 5, 5, 5, 5, 5] at address 16
...
However, when I attempt to query the above server modbus addresses with a simple client over an RS485-USB connection:
from pymodbus.client import ModbusSerialClient
port = '/dev/tty.usbserial-AB0M9JMN'.
master = ModbusSerialClient(port=port, baudrate=9600)
master.connect()
result = master.read_holding_registers( 0x10, 6, slave=0x01)
print(result.registers)
I can only ever get 1 reading from the slave, for example:
[2]
when I was expecting to get:
[2, 2, 2, 2, 2, 2]
(ie only 1 address is found to populated when there should be 6.)
Is there something wrong with the setup of the slave addresses in the example script? If so, how can I set it up so that the master will find all 6 when it looks for them?
If not, then I imagine this is a bug?
Versions
Python: 3.11.7
OS: MAC Ventura
Pymodbus: 3.6.6
Modbus Hardware (if used): Waveshare USB to RS485 converter
When I run the server_updating example it completes correctly, giving me the following parameters set in the updating_task method:
I get the following output:
2024-03-22 08:36:51,401 INFO logging:97 Server listening. updating_task: started: initialised values: [0, 0, 0, 0, 0, 0] at address 16 updating_task: incremented values: [1, 1, 1, 1, 1, 1] at address 16 updating_task: incremented values: [2, 2, 2, 2, 2, 2] at address 16 updating_task: incremented values: [3, 3, 3, 3, 3, 3] at address 16 updating_task: incremented values: [4, 4, 4, 4, 4, 4] at address 16 updating_task: incremented values: [5, 5, 5, 5, 5, 5] at address 16 ... However, when I attempt to query the above server modbus addresses with a simple client over an RS485-USB connection:
I can only ever get 1 reading from the slave, for example:
[2]
when I was expecting to get:
[2, 2, 2, 2, 2, 2]
(ie only 1 address is found to populated when there should be 6.)
Is there something wrong with the setup of the slave addresses in the example script? If so, how can I set it up so that the master will find all 6 when it looks for them?
If not, then I imagine this is a bug?
Versions
Pymodbus Specific