1
0
Fork 0
master
nodyang@aliyun.com 4 weeks ago
parent 05a6e312f0
commit 617bcd2ae4

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

@ -31,7 +31,7 @@ namespace HighWayIot.Winform
//Console.OutputEncoding = System.Text.Encoding.UTF8;
//Console.InputEncoding = System.Text.Encoding.UTF8;
var b= PlcConnect.IsConnect;
AllocConsole();//调用系统API调用控制台窗口
// 设置控制台编码为系统默认编码(解决乱码问题)

Loading…
Cancel
Save