MangoAutomation / modbus4j

A high-performance and ease-of-use implementation of the Modbus protocol written in Java. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning and response data type parsing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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.