Modbus Sniffing Support
-
Greetings, Smart People at the Forum:
I wonder if anyone has (yet) deployed Mango as a Modbus Sniffer. We have some applications for this, and I may end doing this via Serial data source / SOCAT to TCP/IP, but I'd rather use Mango natively for this.
We have several applications where we have to "sniff" existing modbus traffic to feed into other systems. In the past, I've used Modbus repeater devices and other types of doodads to make this happen, but it seems like something that would be pretty easy to implement in Mango.
Ideally, this would be "just plug in Mango to a Modbus network, and it would create points and fill them with values" (not names, scaling, or whatever else) by listening on the RS-485 line.
This would be an amazing feature for the industry I am working in, and would simplify our life a lot as compared to the way I've done this in the past (Configure Mango Modbus data source, get data in, then publish data back out again as a Modbus publisher).
The difference is in the configuration time- If I can sniff the line, I can populate all the data automatically, and then just assign tag names / point names since Mango would already know the Modbus register indices that we would need, and the raw values they contain.
Has anyone ever done this / asked about this before?
-
@Turbo, interesting idea which I've not seen a request for.
This won't work with the Modbus data sources as they won't process messages unless they have sent a request.
The "Discovery" feature of those data sources also works on a request/response approach but can create data points based on the response.
It might be possible to do this with a custom module and some pieces of Modbus4J, however it handles messages in a "Waiting Room" so you would need to bypass the transport layer of the library.
You could try to use the serial data source but parsing out the messages might be tricky.
-
@Turbo Would it be worthwhile to write an app that converts modbus messages into another format to fire into a mango system for sniffing?
Does it need to be in modbus format?
Keen to know your thoughts
Fox
-
@MattFox The wires we are sniffing carry modbus/RTU- The format within mango doesn't really matter. I was considering knocking another thing up using that SOCAT -> TCP device to just get an idea of what the points are being moved back and forth, then develop that into a Modbus read store/forward type of affair.
We basically have a need to eavesdrop on other systems for whom the documentation is a bit minimal- It's a way to "get around" some legacy systems that have controllers that we can't just swap out for Mango, but still need to gather the data for display.
So long as we can get the data into Mango, that'd be swell.
I like @terrypacker 's idea of bypassing Modbus4J's waiting room.. I think I can get something working using the serial data source. I'm doing this for the first time next week, so we'll see how complex this is. I don't even have a full understanding (yet) of exactly how dense / fast / complicated the Modbus/RTU data implementation here actually is- It could only be a handful of points. I was just going to sniff first, using SOCAT to listen on the wire, and try and work out a solution based on what I see.
I can't think I'm the only one trying to do Modbus Sniffing-type stuff with legacy systems, but then again, I see a lot of stuff that I do seems to be"I've never seen this type of thing before"..
Cheers,
-Greg