Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading of holding registers fails if the device has a "gap" in existing register numbers #581

Open
treblada opened this issue Oct 30, 2024 · 1 comment

Comments

@treblada
Copy link

Describe the bug
As an example, I want to read three registers from a device

  • 11174
  • 11176
  • 11177

Register 11175 does not exist, reading from it causes an error.

To Reproduce
If I configure those three registers in iobroker.modbus, I will get an error, because iobroker.modbus tries to read all four registers (11174 - 11177) at once, I assume to be more efficient.

The only way to avoid the problem is to reduce the max request length to 1, effectively disabling any possible optimization.

Expected behavior
iobroker.modbus should respect gaps between requested register addresses and only read multiple registers for explicitly configured address sequences.

Screenshots & Logfiles
modbus.0
2024-10-30 21:00:08.083 warn [DevID_1] Poll error count: 1 code: {"errorCode":131,"exceptionCode":2,"message":"ILLEGAL DATA ADDRESS"}
modbus.0
2024-10-30 21:00:08.083 debug Received pdu describes an error.
modbus.0
2024-10-30 21:00:08.077 debug [DevID_1/holdingRegs] Poll address 11174 - 4 registers

Versions:

  • Adapter version: 6.3.2
  • JS-Controller version: 6.0.11
  • Node version: v20.16.0
  • Operating system: Linux

Additional context
Add any other context about the problem here.

@MaaG-dA
Copy link
Contributor

MaaG-dA commented Nov 8, 2024

In the systems I know, it is possible to specify the maximum amount of missing consecutive addresses. This makes it easier to optimize queries.

In example Weintek HMI modbus configuration:
modbus_rejestr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants