From e60c85faef696e5f76050bf8b5b58a8b89317766 Mon Sep 17 00:00:00 2001 From: "LAPTOP-C3BH1AET\\wangj" Date: Wed, 17 Jul 2024 14:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WcfControlMonitorLib/SampleModule.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WcfControlMonitorLib/SampleModule.cs b/WcfControlMonitorLib/SampleModule.cs index c804ee7..2d71c95 100644 --- a/WcfControlMonitorLib/SampleModule.cs +++ b/WcfControlMonitorLib/SampleModule.cs @@ -19,7 +19,6 @@ namespace WcfControlMonitorLib private Object thisLock = new Object(); public static void Start() { - // _server = new NancyHost(new Bootstrapper(), new Uri("http://127.0.0.1:8686")); _server = new NancyHost(new Bootstrapper(), new Uri("http://192.168.0.30:8088")); //_server = new NancyHost(new Bootstrapper(), new Uri("http://192.168.0.30:8686")); _server.Start(); @@ -46,7 +45,9 @@ namespace WcfControlMonitorLib /* { "storage": [{ + // 类型 1.2.3.4.5 "type": "1", + // 上下限 0.1.2 "inventory": "0" }, { @@ -79,6 +80,8 @@ namespace WcfControlMonitorLib //jsonObject1["5"] = 7064; //for (int i = 0; i < jsonObject.storage; i++) + //type 1--对应电气db区7060 + //type 2--对应电气db区7061 。。。 foreach (STORAGE storage in jsonObject.storage) { string deviceIndexii = storage.type; @@ -103,7 +106,6 @@ namespace WcfControlMonitorLib } //var deviceinedx = int.Parse(Convert.ToString(jsonObject[i]["type"])); - // 7377行 ISendDeviceOrder sdo; //Model.MDevice devinfo; //devinfo = Model.CGetInfo.GetDeviceInfo(deviceinedx); @@ -116,6 +118,7 @@ namespace WcfControlMonitorLib wv[0].Append(storage.inventory); //wv[0].Append(jsonObject[i]["inventory"]); sdo = CommModeCreate.CreateSendDeviceOrder(deviceinedx); + //7060-7064 db区写入上下限值 sdo.WriteDBData(witemnames, wv, "S7 connection_2"); //sdo.WriteDBData(witemnames, wv, devinfo.S7Connection); }