I am working on a project in which I'm using Pymodbus to connect to an industrial fan system. I am able to read some addresses on this fan, but not others. The fan's instruction booklet I am working with puts the addresses into "parameter groups", as follows:
Grouping | Description |
---|---|
Group 00 | Basic parameters |
Group 01 | V/F pattern selections and setup |
Group 02 | Motor parameters |
Group 03 | Multi function digital Inputs/Outputs |
... | |
Group 15 | PLC monitoring function |
For each grouping (1-15) above, there are then more specific addresses provided in later pages of the manual. For example, for Group 00, above, there are address entries specified as below:
Group-address | Description | Range |
---|---|---|
00-00 | Control Mode Selection | 0: V/F Mode, 1: Vector mode |
00-02 | Main run command. | 0: Keypad, 1:Communication, 2: PLC |
... | ||
00-20. | Jog deceleration time. | ~0.1-3600.0 |
I am able to access and print the above addresses (for the case of the grouping of '00') with the following Python script:
from pymodbus.client.sync import ModbusSerialClient as ModbusClient
modbus_conn = ModbusClient(method='rtu', port="/dev/tty.usbserial-AQ00BYCR",baudrate=38400,parity = 'O')
modbus_conn.connect()
print(modbus_conn.read_holding_registers(0,20,unit=1).registers[0])
The problem, however, is that I cannot access the higher groupings ('01' -> '15'). For example, if I try to access any address higher than 20 with the above script, I get a "no registers there" error. I'm assuming this is because I am locked into sampling the first grouping ('00') with my script.
I explored the idea that groupings specify different address starting points, so I tested to see whether '01', for example, meant an address starting at the location of '100', as below:
modbus_conn.read_holding_registers(100,5,unit=1).registers[0]
but this turned out not to work (since I again got 'no register exists there' errors).
What am I doing wrong?
What am I missing?
Does anyone out there know how to access addresses that are grouped in the above way? This is the first time I've seen this, and I am stumped.
Thank you in advance!
from Pymodbus not finding 'grouped' addresses on device
No comments:
Post a Comment