8-in-8-out Modbus Relay Communication Protocol Description

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

8-in-8-out Modbus Relay Communication Protocol Description缩略图
8-in-8-out Modbus Relay Communication Protocol Description插图

Communication Protocol Description

本产品支持标准modbus指令的一部分,支持modbus-RTU控制继电器通断,显示输入状态,其他功能不支持!有关详细的指令生成与解析方式,可根据本文中的寄存器表结合参考《MODBUS协议中文版》 即可。

本产品支持功能码:01,02,03,05,06,15,16

广播地址245,对广播地址的操作,将会操作总线上所有的模块。

功能码01:读取继电器状态,寄存器地址0代表第1路,1代表第2路;

功能码02:读取开关量输入的状态,寄存器地址0代表第1路,1代表第2路;

功能码05:操作单个继电器的状态,寄存器地址0代表第1路,1代表第2路;

功能码15:操作多个继电器的状态,寄存器地址0代表第1路,1代表第2路,

功能码01/02/05/15均以以上规则以此类推。

功能码03读取多个寄存器的值

功能码06写单个寄存器的值

功能码16写多个寄存器的值

以上3个功能码对应的寄存器地址如下:
寄存器地址:0 保存了本机的地址支持读写,支持功能码03,06,16
寄存器地址:500 保存了输入的状态只支持读,地址500代表第1-16路,地址501代表17-32路,根据输入的数量,以此类推。支持功能码03。

寄存器地址:10 00从这个寄存器地址开始保存了输出继电器的状态。地址10 00代表第1-16路,地址10 01代表17-32路,根据继电器的数量,以此类推。支持读写,支持功能码03,06,16

寄存器地址:15 00从这个寄存器地址开始保存了内部变量的值。地址15 00代表内部变量1,地址15 01代表内部变量2,以此类推,支持功能码03,06,16,指令1次只能读或者写1个内部变量。

使用功能码01读取继电器的状态

8-in-8-out Modbus Relay Communication Protocol Description插图1

使用功能码02读取开关量输入的状态

8-in-8-out Modbus Relay Communication Protocol Description插图2

使用功能码05操作单个继电器的状态

8-in-8-out Modbus Relay Communication Protocol Description插图3

使用功能码15更改多个继电器的状态

8-in-8-out Modbus Relay Communication Protocol Description插图4
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.