dathlin / HslCommunication

A very popular industrial Internet of Things communication plug-in. Using this dll can be very convenient, stable, and fast to obtain data from PLC equipment of multiple brands, and also supports redis, mqtt, websocket, etc., which can let your data on the network Free transmission, reducing enterprise development costs.
http://www.hslcommunication.cn
1.64k stars 629 forks source link

使用modbusTCP连接了一天左右,突然连接写不进去值了,重启之后就可以连接上继续写值 #48

Open sl9411 opened 1 year ago

sl9411 commented 1 year ago

_wcld_client = new ModbusTcpNet(_ipaddr, _port); OperateResult OptRet = _wcld_client.ConnectServer(); if (OptRet.IsSuccess) { Log.LogInstance.WriteLog("连接成功", LogType.Run, "Cooler" + _devno + "Log"); _net_connected = true; StartWriteHeartBeatThread(); StartWcldStateThread(); } else { Log.LogInstance.WriteLog("连接失败", LogType.Run, "Cooler" + _devno + "Log"); _net_connected = false; }

sl9411 commented 1 year ago

我有多个设备需要连接,使用的都是这样一中连接方式,多台不同的设备同时写不进去值了。其他设备采用别的连接方式没用使用此类库连接正常

dathlin commented 1 year ago

库本身如果不激活的话,只能连续使用24小时,重启软件又是24小时,并且在读写失败后,Message显示授权失败的消息。 授权参考:http://www.hsltechnology.cn/Home/Licence?area=HslCommunication