WCCOAmod     (10), 2024.04.19 16:21:02.830, PARAM,WARNING,    54, Unexpected state, ModModbusMaster, writeData, No host/unit address defined for PLC number: 39

找到Modbus驱动配置,找到39号驱动,配置IP地址和Unit单元号


WCCOAmod     (10), 2024.04.19 16:21:22.904, SYS,  WARNING,    54, Unexpected state, ModModbusMaster, processResponse, 192.168.42.186: Wrong response to read registers request

找到Modbus 设备Ip地址192.168.42.186的配置,对读取寄存器请求的错误响应,检查此类设备配置的地址有误?


WCCOAmod     (10), 2024.04.19 16:21:22.638, SYS,  SEVERE,     54, Unexpected state, ModMasterConnection, sendRequest, Timeout expires for connection to server 192.168.43.112 on port 502

192.168.43.112的modbus设备不在线。


WCCOAs7      (7), 2024.04.19 16:21:29.643, SYS,  SEVERE,     54, Unexpected state, S7PollGroupBlock, processData, Error result 0xfff50008 in request for address GMS_CPU_004.DB155.DBD20F; startbyte 0x9b0014, pollLen 8 type D

西门子PLC GMS_CPU_004, 地址DB155.DBD20F 无法读取,需要在西门子PLC的DB155 多下载几个(10个)占位空字节,防止一个长数据帧溢出。


WCCOAs7      (7), 2024.04.19 16:21:30.408, SYS,  SEVERE,      7/s7, No active connection for GMS_CPU_003
WCCOAs7      (7), 2024.04.19 16:21:30.440, SYS,  SEVERE,     13/s7, Common AGLink error (0xfff5001c) for GMS_CPU_003(1/1), 0, 0

西门子设备GMS_CPU_003无法连接


WCCOAmod     (10), 2024.04.19 16:21:30.705, SYS,  WARNING,    54, Unexpected state, ModModbusMaster, processResponse, 192.168.40.183: Exception code received: EC=2 FC=3 for UA: 1 Ref: 1

modbus设备的心跳地址:4x00001不存在,无法实现心跳。

EC=2 Error Code=2,读取错误
FC=3 Function Code=3, 3功能码,读取保持寄存器4区的数据
UA:1 Unit Address =1 , 单元地址为1
Ref:1 基准地址1, 意思是4x00001的保持寄存器地址。
可以考虑在config文件添加配置禁用这个心跳或改心跳地址:

[mod]
aliveInterval = 0 # 禁用心跳
aliveTimeoutMsg = 3 1 # 默认是3功能码,读取4x0001地址。改成其他心跳地址

WCCOAmod     (10), 2024.04.19 16:23:48.371, PARAM,WARNING,    54, Unexpected state, ModModbusMaster, decodeFrame, Receiving Modbus frame without request from server 192.168.40.185

发送的modbus tcp的数据帧与应答的tcp数据帧不匹配,例如发送的帧ID为223344, 应答的是223345,错帧了容易出现这种错误,一般是设备的bug。

可以考虑在config文件添加配置:

[mod]
maxPendingRequests = 8 # 默认是1, 容易出现错帧现象。改成并行8个tcp等候,适应错帧的情况。

WCCOActrl    (1), 2024.04.19 16:23:55.866, SYS,  SEVERE,    229, The Manager MAN: (SYS: 1 Data -num 0 CONN: 1) is already running at host localhost.

启动一个新的control manager的时候,未用“-num 2” 这种格式指定一个number号,导致从1开始分配,1是系统用的,会产生这个日志。


WCCOActrl    (3), 2024.04.19 16:24:34.402, CTRL, WARNING,    71, DP does not exist, FMCS_WEBClient.ctl    Line: 328, dpGet, System1:GMS_GDS01_DET_O3.Online

在control manager -num 3的脚本里面, 第328行,代码错误,DP不存在,System1:GMS_GDS01_DET_O3.Online