问题描述
是否可以使用 linux box 或 arduino 构建 modbus-RTU 以太网网关?
Is it possible to build a modbus-RTU ethernet gateway using a linux box or arduino?
我使用 modbus RTU 将 plc 从站连接在一起,我想通过 TCP 将其中一个连接到我的电脑作为主站.
I have plc slaves linked together using modbus RTU, and I want to connect one of them over TCP with my pc as master.
我想知道我是否可以使用连接到路由器的 linux box(rasbery pi/raspbian)作为 modbus-to-tcp 转换器,通过将 USB 端口通过管道连接到某个端口上的本地 ip,因为将连接一个 plc在 modbus rtu 到 linux box 的 usb 端口.管道命令将是这样的:
I wonder if I can use a linux box (rasbery pi/raspbian) connected to a router, as a modbus-to-tcp converter by piping the usb port to my local ip on some port, as one plc will be connected in modbus rtu to the linux box`s usb port.Piping command will be something Like this:
nc -l 5626 > /dev/ttyUSB0 < /dev/ttyUSB0
我的目标是使用 modbus 通过 linux box 将一台电脑(与 linux box 联网)连接到该 plc.
My goal is to connect a pc (networked with the linux box) to that plc through the linux box using modbus.
推荐答案
我不完全确定您的要求是什么,但您可能想查看以下库.这是一个 Modbus TCP->RTU 库,我假设您可以使用.
I'm not entirely sure as to what your requirements are, but you may want to have a look at the following library. It's a Modbus TCP->RTU library I assume you can use.
最好的问候
这篇关于modbus rtu over tcp(modbus tcp 网关)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!