modbus rtu over tcp(modbus tcp 网关) [英] modbus rtu over tcp (modbus tcp gateway)

查看:69
本文介绍了modbus rtu over tcp(modbus tcp 网关)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 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.

https://github.com/3cky/mbusd

最好的问候

这篇关于modbus rtu over tcp(modbus tcp 网关)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆