RModBus 是一个 Ruby 语言实现了 ModBus 协议的软件。
Modbus是一种串行通信协议,是Modicon于1979年,为使用可编程逻辑控制器(PLC) 而发表的。事实上,它已经成为工业领域通信协议标准,并且现在是工业电子设备之间相当常用的连接方式。Modbus比其他通信协议使用的更广泛的主要原因 有:
- 公开发表并且无版税要求
- 相对容易的工业网络部署
- 对供应商来说,修改移动原生的位或字节没有很多限制
改进内容:
== Features
* Support Ruby 1.8, Ruby 1.9
* Support ModBus-TCP, ModBus-RTU protocol
* Support client(master) and server(slave)
* Support functions:
* 01 (0x01) Read Coils
* 02 (0x02) Read Discrete Inputs
* 03 (0x03) Read Holding Registers
* 04 (0x04) Read Input Registers
* 05 (0x05) Write Single Coil
* 06 (0x06) Write Single Register
* 15 (0x0F) Write Multiple Coils
* 16 (0x10) Write Multiple registers
* 22 (0x16) Mask Write register
CHANGES:
- Added new RTUServer class;
- Added debug logging for clients classes;
- Added methods RTUClient::connent, TCPClient::connect.
- Added support more modem parameters sush as data bits, stop bits and parity
- Added more methods for getting information about TCP connections and modem parametrs (see API and ChangeLog)
- Fixed bug for Ruby-1.8.6 compatibility