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

'protocol error' on CentOS7 Ubantu20.04 #27

Open
wgchaoer opened this issue Feb 23, 2023 · 2 comments
Open

'protocol error' on CentOS7 Ubantu20.04 #27

wgchaoer opened this issue Feb 23, 2023 · 2 comments

Comments

@wgchaoer
Copy link

wgchaoer commented Feb 23, 2023

modbus-cli
image

The target device can normally read the value of each register by the modbus poll software of the Windows system. But only the part of the coil can be read through this modbus-cli program。

This problem also occurs in modbus_exporter and telegraf modbus input plugin modules, the error contents are as follows:

response data size '1' does not match count '2'

I have tried various types of combination configurations, but still cannot achieve normal data collection。

Reference link:
modbus_exporter: https://github.com/RichiH/modbus_exporter
telegraf.inputs: https://github.com/influxdata/telegraf/blob/release-1.24/plugins/inputs/modbus/README.md

The above error messages will not generally appear on the equipment, but on individual equipment, such as circuit breakers in electrical equipment. The registers simulated by the simulator are normal after testing.

@wgchaoer
Copy link
Author

This article mentioned the following data types about INT8
register datatype: INT8L, INT8H, UINT8L, UINT8H
https://github.com/influxdata/telegraf/blob/release-1.25/plugins/inputs/modbus/README.md#register-datatype

and I found a similar mistake. Maybe I can find some answers from it
grid-x/modbus#52

@simonvetter
Copy link
Owner

Hi wgchaoer,

what brand and model of breaker are you seeing this with? I see you're reading input registers. If you try reading holding registers, does that help in any way? You can read holding registers with rh::

instead of ri::.

My hunch is that the target device doesn't properly implement the modbus/tcp protocol and returns short or non-compliant data instead. This is something I've seen multiple times with RTU devices, for sure.

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