概述.....................................................................................................................................................3
1. 硬件及通信连线 ........................................................................................................................3
2. H
2U
通信协议切换逻辑说明 .....................................................................................................4
2.1 COM0 协议切换逻辑 ....................................................................................................4
2.2 COM1 协议切换逻辑 ....................................................................................................4
2.3 串口通信格式设置 ........................................................................................................5
2.4 串口通信格式设置软元件一览表 ................................................................................6
2.5 通讯错误码一览表 ........................................................................................................7
3. 通信协议说明.............................................................................................................................8
3.1 HMI 监控协议................................................................................................................8
3.2 并联协议 ........................................................................................................................8
3.3 N:N 协议.......................................................................................................................10
3.4 计算机链接协议 ..........................................................................................................12
3.4.1 数据序列 ................................................................................................................12
3.4.2 命令详解 ................................................................................................................13
3.4.3 接通要求(PLC 作主站发送数据到计算机)....................................................20
3.5 RS 指令.........................................................................................................................21
3.6 MODBUS 从站协议 ....................................................................................................22
3.7 MODBUS 指令 ............................................................................................................22
附件 1:............................................................................................................................................26
H
1U
/H
2U
系列 PLC MODBUS 从站协议.........................................................................................26
概述:.......................................................................................................................................26
1 MODBUS 帧格式 .................................................................................................................26
1.1 功能码 0x01(01):读线圈 .....................................................................................26
1.2 功能码 0x03(03):读寄存器 .................................................................................27
1.3 功能码 0x05(05):写单线圈 ................................................................................27
1.4 功能码 0x06(06):写单个寄存器 .........................................................................28
1.5 功能码 0x0f(15):写多个线圈..............................................................................28
1.6 功能码 0x10(16):写多个寄存器 .........................................................................29
1.7 错误响应帧 ...............................................................................................................29
2 变量编址...............................................................................................................................30
2.1 线圈编址 ...................................................................................................................30
2.2 寄存器编址 ...............................................................................................................30