Modbus RTU over TCP
deinok opened this issue · comments
Hi, is there any support for this kind of conection?
There is no support 'out of the box', but I would suspect it would work with some additional coding. If you were to provide a SerialPortWrapper that uses a TCP/IP Socket you should be able to create an RtuSlave or RtuMaster. We have done something like this is Mango Automation which we have called a SerialSocketBridge and SerialServerSocketBridge. I haven't personally tested Mango with a ModbusRTU data source using one of these virtual serial ports so I can't make any guarantees. The code is open source so feel free to poke around and see what you can come up with.
But that would be a good place to start.
Absolutely.
Here is the source for our implementation:
https://github.com/infiniteautomation/ma-core-public/blob/main/Core/src/com/infiniteautomation/mango/io/serial/virtual/SerialServerSocketBridge.java
i have checked ,rtu over tcp Communication message actually is same as tcpmaster use encapsulated,so we can use the tcpmaster with encapsulated option,and EncapMessage is same as RtuMessage,just communiction channel different.of course,rtu ove tcp is one more choice.
Thanks, just worked that out. I'll remove the class in the corresponding PR from the codebase then.