|
|
@ -36,8 +36,8 @@ namespace HighWayIot.Plc
|
|
|
|
SocketKeepAliveTime = -1,
|
|
|
|
SocketKeepAliveTime = -1,
|
|
|
|
IsPersistentConnection = true,
|
|
|
|
IsPersistentConnection = true,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var a = plc.ConnectServer();
|
|
|
|
var reslt = plc.ConnectServer();
|
|
|
|
logHelper.Info($"Plc连接 信息:[{a.Message}] 是否成功:[{a.IsSuccess.ToString()}] 错误代码:[{a.ErrorCode}]");
|
|
|
|
logHelper.Info($"Plc连接 信息:[{reslt.Message}] 是否成功:[{reslt.IsSuccess.ToString()}] 错误代码:[{reslt.ErrorCode}]");
|
|
|
|
if (!reslt.IsSuccess)
|
|
|
|
if (!reslt.IsSuccess)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logHelper.Info("链接失败:"+reslt.Message);
|
|
|
|
logHelper.Info("链接失败:"+reslt.Message);
|
|
|
|