From 61c4818106ab54d781604da41772b268fb56ffb9 Mon Sep 17 00:00:00 2001 From: nodyang Date: Sat, 14 Oct 2023 13:27:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?1=20=E5=8E=BB=E6=8E=89=E6=B9=BF=E6=B7=B7?= =?UTF-8?q?=E6=9C=BA=208=E4=B8=AA=E7=82=B9=E5=87=BB=E6=8C=89=E9=92=AE=202?= =?UTF-8?q?=20=20=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=203=20=20=E9=80=9A=E8=BF=87=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=82=B9=E5=87=BB=20=E5=A2=9E=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManualControl/InitAction.cs | 6 +- .../ManualControl/ManualControlAction.cs | 259 +++++------------- .../MCProject/nodeForm/ManualWaterControl.xml | 175 ++---------- 3 files changed, 86 insertions(+), 354 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs index 6d5886b..c67b74c 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs @@ -217,7 +217,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl if (flag > 10) { flag = 0; - LogInsertToDatabase(); + //LogInsertToDatabase(); } no += 1; @@ -470,7 +470,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl private void LogInsertToDatabase() { - DataTable table = DBHelp.GetTable(@"select top 100 id, logtext, logtime from Manual_Log order by id desc"); + DataTable table = DBHelp.GetTable(@"select top 200 id, logtext, logtime from Manual_Log order by id desc"); if (this.materialGridControl != null && this.materialGridControl.BaseControl != null) { @@ -479,7 +479,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl } else { - ICSharpCode.Core.LoggingService.Warn("手动操作日志信息控件为Null..."); + ICSharpCode.Core.LoggingService.Warn("操作日志信息控件为Null..."); } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs index c5da7cb..b92b592 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs @@ -14,12 +14,14 @@ using Mesnac.Controls.Default; using Mesnac.Core.Service; using System; using System.Collections.Generic; +using System.Data; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Mesnac.Action.ChemicalWeighing.LjMaterial; namespace Mesnac.Action.ChemicalWeighing.ManualControl @@ -111,35 +113,60 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl IBaseControl PointSpeedSpiralValue3; IBaseControl PointSpeedSpiralValue4; - MCButton WetRequest1; - MCButton WetRequest2; - MCButton WetRequest3; - MCButton WetRequest4; - MCButton WetRequest5; - MCButton WetRequest6; - MCButton WetRequest7; - MCButton WetRequest8; + MCButton WetRequest1; + // MCButton WetRequest2; + // MCButton WetRequest3; + // MCButton WetRequest4; + // MCButton WetRequest5; + // MCButton WetRequest6; + // MCButton WetRequest7; + // MCButton WetRequest8; MCButton Focus; MCButton SaveSetting; MCButton LoadSetting; #endregion + DbMCControl materialGridControl; + + //keywords - + IBaseControl keywords; + public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须要调用 - - + + materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ManualLogGridView").FirstOrDefault(); + LogInsertToDatabase(""); + ControlImport(); - - SingleSelect(); + BottomSelect(runtime); + + } + + private void LogInsertToDatabase(string txt) + { + string sql = "select top 500 id, logtext, logtime from Manual_Log "; + if (!string.IsNullOrEmpty(txt)) + { + sql += $" where logtext like '%{txt}%'"; + } - BottomSelect(runtime); + sql += " order by id desc"; + DataTable table = DBHelp.GetTable(sql); + if (this.materialGridControl != null && this.materialGridControl.BaseControl != null) + { + this.materialGridControl.BaseControl.BindDataSource = null; + this.materialGridControl.BaseControl.BindDataSource = table; + } + else + { + ICSharpCode.Core.LoggingService.Warn("ManualContrlolAction 手动操作日志信息控件为Null..."); + } } /// @@ -221,14 +248,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl PointSpeedSpiralValue3 = GetBaseControl("PointSpeedSpiralValue3"); PointSpeedSpiralValue4 = GetBaseControl("PointSpeedSpiralValue4"); - WetRequest1 = GetButtonControl("WetRequest1"); - WetRequest2 = GetButtonControl("WetRequest2"); - WetRequest3 = GetButtonControl("WetRequest3"); - WetRequest4 = GetButtonControl("WetRequest4"); - WetRequest5 = GetButtonControl("WetRequest5"); - WetRequest6 = GetButtonControl("WetRequest6"); - WetRequest7 = GetButtonControl("WetRequest7"); - WetRequest8 = GetButtonControl("WetRequest8"); + WetRequest1 = GetButtonControl("WetRequest1"); + keywords = GetBaseControl("keywords"); + // WetRequest2 = GetButtonControl("WetRequest2"); + // WetRequest3 = GetButtonControl("WetRequest3"); + // WetRequest4 = GetButtonControl("WetRequest4"); + // WetRequest5 = GetButtonControl("WetRequest5"); + // WetRequest6 = GetButtonControl("WetRequest6"); + // WetRequest7 = GetButtonControl("WetRequest7"); + // WetRequest8 = GetButtonControl("WetRequest8"); Focus = GetButtonControl("Focus"); @@ -1021,6 +1049,14 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl // default: return; //} } + + //点击日志查询 + if (WetRequest1 == runtime.Sender) + { + string key = keywords.MCValue.ToString(); + LogInsertToDatabase(key); + } + if (SpiralOff1 == runtime.Sender) { @@ -1055,181 +1091,18 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl } - if (WetRequest1 == runtime.Sender) - { - if (MessageBox.Show("湿混机1确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "1", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机1下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机1下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机1返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机1返回数据" + returnTest); - } + - if (WetRequest2 == runtime.Sender) - { - if (MessageBox.Show("湿混机2确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "2", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机2下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机2下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机2返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机2返回数据" + returnTest); - } - - if (WetRequest3 == runtime.Sender) - { - if (MessageBox.Show("湿混机3确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "3", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机3下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机3下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机3返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机3返回数据" + returnTest); - } + - if (WetRequest4 == runtime.Sender) - { - if (MessageBox.Show("湿混机4确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "4", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机4下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机4下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机4返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机4返回数据" + returnTest); - } + - if (WetRequest5 == runtime.Sender) - { - if (MessageBox.Show("湿混机5确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "5", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机5下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机5下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机5返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机5返回数据" + returnTest); - } + - if (WetRequest6 == runtime.Sender) - { - if (MessageBox.Show("湿混机6确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "6", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机6下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机6下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机6返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机6返回数据" + returnTest); - } + - if (WetRequest7 == runtime.Sender) - { - if (MessageBox.Show("湿混机7确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "7", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机7下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机7下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机7返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机7返回数据" + returnTest); - } - if (WetRequest8 == runtime.Sender) - { - if (MessageBox.Show("湿混机8确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "8", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机8下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机8下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机8返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机8返回数据" + returnTest); - } + if(SaveSetting == runtime.Sender) { @@ -1312,7 +1185,9 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl userid = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName }; - FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity(); + FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity(); + + LogInsertToDatabase(""); } } } diff --git a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml index 97d11a8..1df297f 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml @@ -49,172 +49,29 @@ 8 - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest8 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机8发送下料请求 - 6, 339 - MCButton21 - 148, 40 - 7 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest7 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机7发送下料请求 - 6, 293 - MCButton20 - 148, 40 - 6 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest6 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机6发送下料请求 - 6, 247 - MCButton19 - 148, 40 - 5 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest5 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机5发送下料请求 - 6, 201 - MCButton18 - 148, 40 - 4 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest4 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机4发送下料请求 - 6, 155 - MCButton17 - 148, 40 - 3 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL - WetRequest3 + + 0 + 0 + True + keywords False - Query + Modify True True - False - - - Red - DarkGray - 湿混机3发送下料请求 - 6, 109 - MCButton16 - 148, 40 - 2 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== + - WetRequest2 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机2发送下料请求 - 6, 63 - MCButton15 - 148, 40 + True + 6, 35 + MCTextBox2147483626 + 148, 35 1 @@ -235,8 +92,8 @@ Red DarkGray - 湿混机1发送下料请求 - 6, 17 + 日志查询 + 6, 88 MCButton14 148, 40 0 From 82f5fdd609bd9c3a692fd457f6b06472f515f49b Mon Sep 17 00:00:00 2001 From: nodyang Date: Sat, 14 Oct 2023 13:30:02 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=80?= =?UTF-8?q?=E5=AE=9A=E8=BF=9E=E6=8E=A5=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Main/MCEdit/Data/MCProject/nodeDataSource.xml | 2 +- .../MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Main/MCEdit/Data/MCProject/nodeDataSource.xml b/Main/MCEdit/Data/MCProject/nodeDataSource.xml index 3c73a6a..3600a0d 100644 --- a/Main/MCEdit/Data/MCProject/nodeDataSource.xml +++ b/Main/MCEdit/Data/MCProject/nodeDataSource.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml index 1df297f..95ab8fb 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml @@ -66,12 +66,10 @@ Modify True True - - - True + 6, 35 MCTextBox2147483626 - 148, 35 + 148, 21 1 @@ -99,7 +97,7 @@ 0 False - 下料请求发送 + 日志查询 696, 12 GroupBox10 160, 387 From 112fbef84da0bb7c57297a809d43bf34e6cfc717 Mon Sep 17 00:00:00 2001 From: nodyang Date: Sat, 14 Oct 2023 13:43:21 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8D=B3=E4=BD=BF=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=20=E4=B9=9F=E4=B8=8D=E4=BC=9A=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E4=B8=8A=E4=BD=8D=E6=9C=BA=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InterfaceDocking/HttpResponse.cs | 1 + .../ManualControl/InitAction.cs | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs index 4aaf694..ed342bd 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs @@ -31,6 +31,7 @@ namespace Mesnac.Action.ChemicalWeighing.InterfaceDocking { HttpItem item = new HttpItem() { + Timeout = 5, URL = url, //URL 必需项 Method = "post",//URL 可选项 默认为Get ContentType = "application/json",//返回类型 可选项有默认值 diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs index c67b74c..ac1fd3e 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs @@ -18,7 +18,9 @@ using System.Data; using System.IO; using System.Linq; using System.Text; +using System.Threading; using System.Windows.Forms; +using Timer = System.Windows.Forms.Timer; namespace Mesnac.Action.ChemicalWeighing.ManualControl { @@ -196,11 +198,18 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl deviceNo = deviceNo.ToString(), state = statu.ToString(), }; - HttpResponse httpResponse = new HttpResponse(); - // MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - // ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest); + + //即使网络不同 也不会影响上位机的使用 + ThreadPool.QueueUserWorkItem(delegate + { + HttpResponse httpResponse = new HttpResponse(); + // MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求"); + string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); + // ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest); + MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest); + }); + + } From f30896869a4c1a24b9a2367bb3ddabb56eb548f3 Mon Sep 17 00:00:00 2001 From: nodyang Date: Sat, 14 Oct 2023 13:44:28 +0800 Subject: [PATCH 4/6] =?UTF-8?q?PlcAddressUtil=20=E4=BF=AE=E6=94=B9Plc?= =?UTF-8?q?=E5=BE=97=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs index e013964..c58df37 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs @@ -2,11 +2,11 @@ { public class PlcAddressUtil { - //public static string IpAddress = "172.18.4.100"; - //public static int Port = 102; + public static readonly string IpAddress = "172.18.4.100"; + public static readonly int Port = 102; //测试的Plc - public static string IpAddress = "192.168.0.100"; - public static int Port = 7788; + // public static string IpAddress = "192.168.0.100"; + // public static int Port = 7788; } } \ No newline at end of file From d531a2699df8de5752e79baa7a99f1aaea510b84 Mon Sep 17 00:00:00 2001 From: nodyang Date: Sat, 14 Oct 2023 17:22:11 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=A0=87=E8=AF=86=20=E6=9D=A5=E6=B5=8B=E8=AF=95plc=20=E5=BE=97?= =?UTF-8?q?=E9=80=9A=E8=AE=AF=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainDetailControlAction.cs | 12 ++++++++++- .../Data/MCProject/nodeForm/MainDetail.xml | 20 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index f4d7f19..6de54d9 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -851,6 +851,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl bool DV2PCP13_AlarmR; #endregion + + private MCLabel MCWatchDog; public void Run(RuntimeParameter runtime) { @@ -1067,6 +1069,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl #endregion Controls = GetAllControls(); + + MCWatchDog =Controls.FirstOrDefault(x=>x.Name=="MCWatchDog") as MCLabel; + SetControl(); @@ -1680,7 +1685,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl /// private void NewThreadDb2107() { - WatchDog_Set = DB2107.NormalStatus.WatchDog >= 1 ? true : false; + + var normalStatusWatchDog = DB2107.NormalStatus.WatchDog; + WatchDog_Set = normalStatusWatchDog >= 1 ? true : false; + + MCWatchDog.MCValue = normalStatusWatchDog.ToString(); + EMStop_Set = DB2107.NormalStatus.EMStop; Vessel_1_HighLevel_Set = DB2107.Weight.Vessel_1.HighLevel; diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index 97bf0e7..2786ebd 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -1,6 +1,26 @@ + + + + Red + DarkGray + + + False + + + + Modify + True + True + MCLabel149 + Red + 23, 115 + MCWatchDog + 65, 12 + From f94f1bf91122a8b9551e18459981625c51bd1774 Mon Sep 17 00:00:00 2001 From: wangsr Date: Sat, 14 Oct 2023 21:02:12 +0800 Subject: [PATCH 6/6] =?UTF-8?q?change=20-=20=E8=AE=BE=E5=A4=87=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E7=94=BB=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=B9=BF=E6=B7=B7?= =?UTF-8?q?=E6=9C=BA=E8=BF=90=E8=BD=AC=E6=8A=A5=E8=AD=A6=E6=8C=87=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainDetailControlAction.cs | 83 +++++++ DataBlockHelper/PlcConnect.cs | 4 +- .../Data/MCProject/nodeForm/MainDetail.xml | 235 ++++++++++++------ .../MCProject/nodeForm/ManualWaterControl.xml | 10 +- 4 files changed, 246 insertions(+), 86 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index 6de54d9..f0749ae 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -102,6 +102,22 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl SwitchLight WScale_2_LowLevel; SwitchLight WScale_3_LowLevel; SwitchLight WScale_4_LowLevel; + SwitchLight DMWETER1; + SwitchLight DMWETER11; + SwitchLight DMWETER2; + SwitchLight DMWETER22; + SwitchLight DMWETER3; + SwitchLight DMWETER33; + SwitchLight DMWETER4; + SwitchLight DMWETER44; + SwitchLight DMWETER5; + SwitchLight DMWETER55; + SwitchLight DMWETER6; + SwitchLight DMWETER66; + SwitchLight DMWETER7; + SwitchLight DMWETER77; + SwitchLight DMWETER8; + SwitchLight DMWETER88; MCLabel topPressure_V1; MCLabel topPressure_V2; @@ -437,6 +453,22 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl bool WScale_2_LowLevel_Set; bool WScale_3_LowLevel_Set; bool WScale_4_LowLevel_Set; + bool DMWETER1_Set; + bool DMWETER2_Set; + bool DMWETER3_Set; + bool DMWETER4_Set; + bool DMWETER5_Set; + bool DMWETER6_Set; + bool DMWETER7_Set; + bool DMWETER8_Set; + bool DMWETER1_Alarm; + bool DMWETER2_Alarm; + bool DMWETER3_Alarm; + bool DMWETER4_Alarm; + bool DMWETER5_Alarm; + bool DMWETER6_Alarm; + bool DMWETER7_Alarm; + bool DMWETER8_Alarm; float topPressure_V1_Set; float topPressure_V2_Set; @@ -485,6 +517,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl float DM2CSF01_Set; float DM2DSF01_Set; + bool DM1ASF01_Set; bool DM1BSF01_Set; bool DM1CSF01_Set; @@ -1603,6 +1636,23 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl DM1DRY3_Running_Set = DB2103.DM1DRY3.Running; DM1DRY4_Running_Set = DB2103.DM1DRY4.Running; + DMWETER1_Set = DB2103.DMWETER1.Running; + DMWETER2_Set = DB2103.DMWETER2.Running; + DMWETER3_Set = DB2103.DMWETER3.Running; + DMWETER4_Set = DB2103.DMWETER4.Running; + DMWETER5_Set = DB2103.DMWETER5.Running; + DMWETER6_Set = DB2103.DMWETER6.Running; + DMWETER7_Set = DB2103.DMWETER7.Running; + DMWETER8_Set = DB2103.DMWETER8.Running; + + DMWETER1_Alarm = DB2103.DMWETER1.Alarm; + DMWETER2_Alarm = DB2103.DMWETER2.Alarm; + DMWETER3_Alarm = DB2103.DMWETER3.Alarm; + DMWETER4_Alarm = DB2103.DMWETER4.Alarm; + DMWETER5_Alarm = DB2103.DMWETER5.Alarm; + DMWETER6_Alarm = DB2103.DMWETER6.Alarm; + DMWETER7_Alarm = DB2103.DMWETER7.Alarm; + DMWETER8_Alarm = DB2103.DMWETER8.Alarm; SetMCLabel(DM1DRY1_ACT_Speed, (float)Math.Round(DM1DRY1_ACT_Speed_Set, 2)); SetMCLabel(DM1DRY2_ACT_Speed, (float)Math.Round(DM1DRY2_ACT_Speed_Set, 2)); @@ -1678,6 +1728,23 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl SetFan(DM1DRY3_Running, DM1DRY3_Running_Set); SetFan(DM1DRY4_Running, DM1DRY4_Running_Set); SetFan(PM3ADF01, PM3ADF01_Set); + + SetSwitchLight(DMWETER1, DMWETER1_Set, DMWETER1_Alarm); + SetSwitchLight(DMWETER11, DMWETER1_Set, DMWETER1_Alarm); + SetSwitchLight(DMWETER2, DMWETER2_Set, DMWETER2_Alarm); + SetSwitchLight(DMWETER22, DMWETER2_Set, DMWETER2_Alarm); + SetSwitchLight(DMWETER3, DMWETER3_Set, DMWETER3_Alarm); + SetSwitchLight(DMWETER33, DMWETER3_Set, DMWETER3_Alarm); + SetSwitchLight(DMWETER4, DMWETER4_Set, DMWETER4_Alarm); + SetSwitchLight(DMWETER44, DMWETER4_Set, DMWETER4_Alarm); + SetSwitchLight(DMWETER5, DMWETER5_Set, DMWETER5_Alarm); + SetSwitchLight(DMWETER55, DMWETER5_Set, DMWETER5_Alarm); + SetSwitchLight(DMWETER6, DMWETER6_Set, DMWETER6_Alarm); + SetSwitchLight(DMWETER66, DMWETER6_Set, DMWETER6_Alarm); + SetSwitchLight(DMWETER7, DMWETER7_Set, DMWETER7_Alarm); + SetSwitchLight(DMWETER77, DMWETER7_Set, DMWETER7_Alarm); + SetSwitchLight(DMWETER8, DMWETER8_Set, DMWETER8_Alarm); + SetSwitchLight(DMWETER88, DMWETER8_Set, DMWETER8_Alarm); } /// @@ -2114,6 +2181,22 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl WScale_2_LowLevel = GetSwitchLight("WScale_2_LowLevel"); WScale_3_LowLevel = GetSwitchLight("WScale_3_LowLevel"); WScale_4_LowLevel = GetSwitchLight("WScale_4_LowLevel"); + DMWETER1 = GetSwitchLight("DMWETER1"); + DMWETER11 = GetSwitchLight("DMWETER11"); + DMWETER2 = GetSwitchLight("DMWETER2"); + DMWETER22 = GetSwitchLight("DMWETER22"); + DMWETER3 = GetSwitchLight("DMWETER3"); + DMWETER33 = GetSwitchLight("DMWETER33"); + DMWETER4 = GetSwitchLight("DMWETER4"); + DMWETER44 = GetSwitchLight("DMWETER44"); + DMWETER5 = GetSwitchLight("DMWETER5"); + DMWETER55 = GetSwitchLight("DMWETER55"); + DMWETER6 = GetSwitchLight("DMWETER6"); + DMWETER66 = GetSwitchLight("DMWETER66"); + DMWETER7 = GetSwitchLight("DMWETER7"); + DMWETER77 = GetSwitchLight("DMWETER77"); + DMWETER8 = GetSwitchLight("DMWETER8"); + DMWETER88 = GetSwitchLight("DMWETER88"); topPressure_V1 = GetMCLabel("topPressure_V1"); topPressure_V2 = GetMCLabel("topPressure_V2"); diff --git a/DataBlockHelper/PlcConnect.cs b/DataBlockHelper/PlcConnect.cs index 9e699e8..fefb566 100644 --- a/DataBlockHelper/PlcConnect.cs +++ b/DataBlockHelper/PlcConnect.cs @@ -31,8 +31,8 @@ namespace DataBlockHelper { SiemensPLCS siemensPLCS = SiemensPLCS.S1500; SiemensS7Net s7 = new SiemensS7Net(siemensPLCS); - s7.IpAddress = "192.168.0.100"; - s7.Port = 7788; + s7.IpAddress = "172.18.4.100"; + s7.Port = 102; s7.ConnectServer(); return s7; } diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index 2786ebd..79621a7 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -1,27 +1,29 @@ - + - Red - DarkGray + Control + Control False - Modify + None True True - MCLabel149 - Red - 23, 115 - MCWatchDog - 65, 12 + 8 + Transparent + 宋体, 14pt + White + 1810, 443 + MCLabel142 + 19, 19 - + Control @@ -35,13 +37,15 @@ None True True - 8 - DarkGray - 1803, 505 - MCLabel150 - 11, 12 + 7 + Transparent + 宋体, 14pt + White + 1717, 443 + MCLabel143 + 19, 19 - + Control @@ -55,13 +59,15 @@ None True True - 7 - DarkGray - 1725, 505 - MCLabel151 - 11, 12 + 6 + Transparent + 宋体, 14pt + White + 1498, 443 + MCLabel144 + 19, 19 - + Control @@ -75,13 +81,15 @@ None True True - 6 - DarkGray - 1487, 505 - MCLabel152 - 11, 12 + 5 + Transparent + 宋体, 14pt + White + 1405, 443 + MCLabel145 + 19, 19 - + Control @@ -96,12 +104,14 @@ True True 4 - DarkGray - 1248, 505 - MCLabel153 - 11, 12 + Transparent + 宋体, 14pt + White + 1253, 444 + MCLabel146 + 19, 19 - + Control @@ -116,12 +126,77 @@ True True 3 - DarkGray - 1172, 505 - MCLabel154 + Transparent + 宋体, 14pt + White + 1158, 445 + MCLabel147 + 19, 19 + + + + + Control + Control + + + False + + + + None + True + True + 2 + Transparent + 宋体, 14pt + White + 947, 444 + MCLabel148 + 19, 19 + + + + + + Red + DarkGray + + + False + + + + None + True + True + WatchDog + Red + 33, 71 + MCLabel149 + 53, 12 + + + + + Red + DarkGray + + + False + + + + Modify + True + True + 0 + Red + 53, 89 + MCWatchDog 11, 12 - + Control @@ -135,13 +210,13 @@ None True True - 5 + 8 DarkGray - 1410, 505 - MCLabel155 + 1803, 505 + MCLabel150 11, 12 - + Control @@ -155,10 +230,10 @@ None True True - 2 + 7 DarkGray - 941, 505 - MCLabel156 + 1725, 505 + MCLabel151 11, 12 @@ -176,10 +251,12 @@ True True 1 - DarkGray - 865, 505 + Transparent + 宋体, 14pt + White + 856, 445 MCLabel157 - 11, 12 + 19, 19 @@ -188,100 +265,100 @@ BU4BLT07 14, 13 - + 1792, 470 - SwitchLight65 + DMWETER8 12, 12 - + 1818, 470 - SwitchLight66 + DMWETER88 12, 12 - + 1709, 470 - SwitchLight63 + DMWETER7 12, 12 - + 1735, 470 - SwitchLight64 + DMWETER77 12, 12 - + 1479, 470 - SwitchLight61 + DMWETER6 12, 12 - + 1505, 470 - SwitchLight62 + DMWETER66 12, 12 - + 1396, 470 - SwitchLight59 + DMWETER5 12, 12 - + 1422, 470 - SwitchLight60 + DMWETER55 12, 12 - + 1238, 472 - SwitchLight57 + DMWETER4 12, 12 - + 1264, 472 - SwitchLight58 + DMWETER44 12, 12 - + 1154, 472 - SwitchLight55 + DMWETER3 12, 12 - + 1180, 472 - SwitchLight56 + DMWETER33 12, 12 - + 932, 472 - SwitchLight53 + DMWETER2 12, 12 - + 958, 472 - SwitchLight54 + DMWETER22 12, 12 - + 848, 472 - SwitchLight52 + DMWETER1 12, 12 - + 874, 472 - SwitchLight51 + DMWETER11 12, 12 diff --git a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml index 95ab8fb..da0d9d3 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml @@ -19,7 +19,7 @@ Red DarkGray 加载配置 - 732, 601 + 731, 432 MCButton23 85, 47 29 @@ -43,7 +43,7 @@ Red DarkGray 保存配置 - 732, 508 + 731, 339 MCButton22 85, 47 8 @@ -67,7 +67,7 @@ True True - 6, 35 + 6, 20 MCTextBox2147483626 148, 21 1 @@ -91,7 +91,7 @@ Red DarkGray 日志查询 - 6, 88 + 6, 47 MCButton14 148, 40 0 @@ -100,7 +100,7 @@ 日志查询 696, 12 GroupBox10 - 160, 387 + 160, 94 28