Hello,
I am working on data logging inverters that communicate using ModBus.
I can retrieve most values with a simple python script sending requests via RS485, but 30% of the requests returns an "Illegal data adress error". Not much info on this error except: "the address might not exist"... which it does though. Some forums indicated that the value is stored in a "block" of register and cannot allow a user to access only one of the registers individually.
So i looked up my registers and it looks like the ones returning an error are values stored as 32bit integers or floats. This means i cannot access them without requesting 2 registers at the same time? For example:
- Register 40200: value1 (32Uint)
- Register 40202: value2 (16int)
I can access value at 40202 but neither value in 40200 and 40201. How do i even ask the slave that i need both register values at the same time? Can my request hold an information containing how many registers i want?
Thanks in advance for your help!
I am working on data logging inverters that communicate using ModBus.
I can retrieve most values with a simple python script sending requests via RS485, but 30% of the requests returns an "Illegal data adress error". Not much info on this error except: "the address might not exist"... which it does though. Some forums indicated that the value is stored in a "block" of register and cannot allow a user to access only one of the registers individually.
So i looked up my registers and it looks like the ones returning an error are values stored as 32bit integers or floats. This means i cannot access them without requesting 2 registers at the same time? For example:
- Register 40200: value1 (32Uint)
- Register 40202: value2 (16int)
I can access value at 40202 but neither value in 40200 and 40201. How do i even ask the slave that i need both register values at the same time? Can my request hold an information containing how many registers i want?
Thanks in advance for your help!