-
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
Multiple Modbus terminal Monitoring #7523
Comments
You should be able to put multiple |
Here is the related issue on the Community site: https://community.influxdata.com/t/telegraf-requesting-from-multiple-modbus-slaves If you need to use multiple slave IDs for a single connection you must use multiple plugin definitions, but for devices connected over USB, it is problematic to make concurrent requests. |
cc @garciaolais |
I said the same thing originally ;). This won't work though if you are connecting over the same USB link. From the community site:
|
Would this work with global coordination/sync? or does that have other problems? |
It seems that would work, however it would mean different plugin instances may interfere with each other. |
Wow, This was a very quick response, I working with a Beagle bone with Ubuntu 20 running on it, going to use the UART of the board to connect up to 20 modbus slave for monitoring, will post on the update while i progress. |
@binueda let us know if you have any access/timeout problems and how severe they are. |
I have the exactly same issue with using multiple modbus slaves with different slave_id(s) on one single usb device.
@ssoroka You mentioned something about "global coordination/sync" which I don't quite unterstand. Is that a potential solution/workaround? If so, what do you mean by that? Thanks! |
You might be interested in checking out this work on a modbus gateway plugin. #8013. |
That's right, but there will be one tcp connection per remote unit, which is a problem if there are many such units attached to the gateway - it's not atypical to see gateways handle at most 4 simultaneous connections and, when you exceed that, they aren't even always smart enough to issue a connection refused. |
@ssoroka Thanks for mentioning that. As I understand it, this is for Modbus TCP, I have Modbus RTU (via serial connection - usb). @wz2b As per my understanding this thread is not about if and how to use multiple [[inputs.modbus]] - we all do that. This threat describes the issue when you use multiple [[inputs.modbus]] and the connections (may it be Modbus TCP or Modbus RTU via USB - my case) cannot be opened in parallel (what telegraf does) and therefore it fails. My workaround so far: I have created a systemd unit and timer which triggers every 10s and executes |
Correct
Clever. Devices are really all over the place with how they handle this. I have some older ethernet-to-rs485 modbus gateways that I got from Automation Direct and the way they respond to too many connections is to neither accept nor reject the TCP SYN request. I have some others by Schneider Electric / PowerLogic that accept up to 4 connections, after that they accept them but the connection is just dead (never any data). What's really helpful is you advising me you have the same problem. Your workaround will also work around the other problem: getting stuck in the infinite "mismatched transaction id" loop if the network slows down momentarily. I should have both of those things addressed soon - they actually already are, but I asked @ssoroka to not merge until I have a chance to strengthen the README.md. Few days. |
it might make sense for the input to have an option to force serial requests instead of parallel |
Telegraf config file
While i run a test, "telegraf -config telegraf.conf -input-filter modbus -test -debug"
Tested the same with mbpoll below is the result
Is the serial interface of telegraf modbus module working ? |
Shot in the dark but: are you certain you don't have a one-off difference between zero-based and one-based register addresses? Modbus implementations are notorious for inconsistency here. The fact that you specifically got an exception 2 makes me scratch my head.
You are asking for [4101,4102] and I always have to deep think about do I really want [4100,4101] there instead. |
Thanks for the Quick Reply, i could get this working,
|
Feature Request
Need a configuration option to add more than one Modbus slave terminal
Proposal: Not sure how
Current behavior: only one Modbus slave can be configured using telegraf
Desired behavior: Should be able to monitor multiple slaves
Use case:
There are instances where more than one device on the network which need to be monitored.
The text was updated successfully, but these errors were encountered: