From 95462bdd3669437accda30289858b59f72603f6f Mon Sep 17 00:00:00 2001 From: hwh <332078369@qq.com> Date: 星期一, 02 九月 2024 14:05:27 +0800 Subject: [PATCH] 设备监控绑数据 --- Admin.NET/WCS.Application/PLC/PLCUtil.cs | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Admin.NET/WCS.Application/PLC/PLCUtil.cs b/Admin.NET/WCS.Application/PLC/PLCUtil.cs index 69442c6..c0b0612 100644 --- a/Admin.NET/WCS.Application/PLC/PLCUtil.cs +++ b/Admin.NET/WCS.Application/PLC/PLCUtil.cs @@ -21,9 +21,9 @@ _client = new SiemensClient((SiemensVersion)modPlc.PLCType, modPlc.IP, modPlc.Port); _client.Open(); } - public bool Connected() + public bool Connected { - return _client.Connected; + get { return _client.Connected; } } public IoTClient.Result Open() { @@ -80,6 +80,9 @@ case PLCDataTypeEnum.Double: result = _client.ReadDouble(address); break; + case PLCDataTypeEnum.String: + result = _client.ReadString(address); + break; default: result = new IoTClient.Result<object>(); break; -- Gitblit v1.8.0