From 1cb73bbcdfb9e03c3da67e6977cd0d40ed83b6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 9 Jan 2024 09:58:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=BD=A6=E6=AC=A1=E6=B8=85?= =?UTF-8?q?=E9=9B=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoControl/AutoControl.cs | 15 ++++++- .../Entity/GelerWeterControlsEntity.cs | 2 + .../Data/MCProject/nodeForm/AutoControlC.xml | 41 +++++++++++++++---- 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs index 12ea738..d912ed6 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs @@ -479,7 +479,20 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl DryStartOrStop(ButtonE, RadioE); } - + + + if (ButtonE.ZeroClean == runtime.Sender) + { + if (MessageBox.Show("是否车次清零?", "清零确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } + + var siemensS7Net = PlcConnect.Instance; + siemensS7Net.Write($"DB2105.6.0", (short)1); + MessageBox.Show("清零成功"); + + } #endregion diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs index 7d63010..01ba38a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs @@ -82,6 +82,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity public Button GRepairMode { get; set; } + public Button ZeroClean { get; set; } + public Button DryStartOrStop { get; set; } public Button DryDownload { get; set; } diff --git a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml index 351d7a4..a06dcd1 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml @@ -1,5 +1,30 @@ + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAANAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIERCRTgxOTNENDE2MDRBRDVCOTRBRTNDMkQzNDc1MUQyBgYAAAAV5rm/5re357OK5YyW5py65o6n5Yi2BgcAAAAV5rm/5re357OK5YyW5py65o6n5Yi2Cw== + + + + False + + + + Query + True + True + False + + + Red + DarkGray + 车次清零 + 宋体, 12pt + 1281, 646 + ZeroClean + 99, 48 + 82 + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAANAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIERCRTgxOTNENDE2MDRBRDVCOTRBRTNDMkQzNDc1MUQyBgYAAAAV5rm/5re357OK5YyW5py65o6n5Yi2BgcAAAAV5rm/5re357OK5YyW5py65o6n5Yi2Cw== @@ -95,9 +120,9 @@ DarkGray 下发送料请求 宋体, 12pt - 1364, 509 + 1370, 509 DownloadRequest - 168, 50 + 156, 50 70 @@ -120,9 +145,9 @@ DarkGray 消除报警 宋体, 12pt - 1365, 453 + 1370, 453 EliAlarms - 168, 50 + 156, 50 69 @@ -3128,9 +3153,9 @@ DarkGray 湿混机维修模式 宋体, 12pt - 1363, 565 + 1370, 565 RepairMode - 169, 38 + 156, 38 54 @@ -3321,9 +3346,9 @@ DarkGray 湿混机糊化机下传 宋体, 12pt - 1364, 397 + 1370, 397 Download - 168, 50 + 156, 50 8