-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[inputs.modbus] read multiple coils with higher address gives wrong result #8905
Comments
@rwalli Can you describe what type of devices you are using? We are currently trying to understand what hardware devices may require a workaround for enforcing bit-register reads from zero and if such a workaround would cover the issue you're running into. |
Im using a TROVIS 5579 over mbusd ( https://github.com/3cky/mbusd )But I don’t think this depends on the device because it can be read with every other modbus software/library expect telegraf.On 25.05.2021, at 22:44, Samantha Wang ***@***.***> ***@***.*** Can you describe what type of devices you are using? We are currently trying to understand what hardware devices may require a workaround for enforcing bit-register reads from zero and if such a workaround would cover the issue you're running into.—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
As discussed on slack, for some devices you need to specify all coil registers starting from address zero as those devices do not allow reading from an offset. |
Relevant telegraf.conf:
System info:
Telegraf 1.17.1, 1.17.2, 1.17,3
GNU/Linux aarch64, x86_64, armv7, 18.7.0 Darwin
client side: https://github.com/3cky/mbusd
Steps to reproduce:
eg.:
1 (ad 00000): 0
2 (ad 00001): 0
3 (ad 00002): 1
4 (ad 00003): 0
5 (ad 00004): 0
6 (ad 00005): 0
7 (ad 00006): 1
8 (ad 00007): 0
Expected behavior:
Get the right coils
Actual behavior:
with modbus address starting from 0 (test0) telegraf returns the right coils.
higher adresses (test1) give wrong values.
2021-02-25T07:43:13Z I! Starting Telegraf 1.17.1
Additional info:
the returend values seems to be ok with a modbus testing-tool:
test0:
test1:
(I also verified return values with tcpdump)
The text was updated successfully, but these errors were encountered: