From deb04ca8b241251234f38107c8a290e2eec96dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=84=E5=A4=B4?= Date: Thu, 1 Aug 2024 14:13:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Qu/InitAction.cs | 31 +++++++++++++++---- Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml | 8 ++--- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs index 7c4826f..75d62a9 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs @@ -1399,7 +1399,7 @@ namespace Mesnac.Action.ChemicalWeighing.Qu //Hsldq1 - var dq = plc.ReadBool("DB2102.245.0").Content; + var dq = plc.ReadBool("DB2119.21.0").Content; if (dq) { Hsldq1.LanternBackground = System.Drawing.Color.Green; @@ -1409,7 +1409,7 @@ namespace Mesnac.Action.ChemicalWeighing.Qu Hsldq1.LanternBackground = System.Drawing.Color.Gray; } - dq = plc.ReadBool("DB2102.247.0").Content; + dq = plc.ReadBool("DB2119.21.2").Content; if (dq) { Hsldq2.LanternBackground = System.Drawing.Color.Green; @@ -1419,8 +1419,8 @@ namespace Mesnac.Action.ChemicalWeighing.Qu Hsldq2.LanternBackground = System.Drawing.Color.Gray; } - - dq = plc.ReadBool("DB2102.244.7").Content; + + dq = plc.ReadBool("DB2119.20.7").Content; if (dq) { HslKq1.LanternBackground = System.Drawing.Color.Green; @@ -1430,7 +1430,7 @@ namespace Mesnac.Action.ChemicalWeighing.Qu HslKq1.LanternBackground = System.Drawing.Color.Gray; } - dq = plc.ReadBool("DB2102.246.7").Content; + dq = plc.ReadBool("DB2119.21.1").Content; if (dq) { HslKq2.LanternBackground = System.Drawing.Color.Green; @@ -1441,8 +1441,27 @@ namespace Mesnac.Action.ChemicalWeighing.Qu } + var byt = plc.Read("DB2119.19.0", 2).Content; + var at = byt[0]; + Set(H1, at.GetBit(0)); + Set(H2, at.GetBit(1)); + Set(H3, at.GetBit(2)); + Set(H4, at.GetBit(3)); + Set(H5, at.GetBit(4)); + Set(H6, at.GetBit(5)); + Set(H7, at.GetBit(6)); + Set(H8, at.GetBit(7)); + at = byt[1]; + + Set(H9, at.GetBit(0)); + Set(H10, at.GetBit(1)); + Set(H11, at.GetBit(2)); + Set(H12, at.GetBit(3)); + Set(H13, at.GetBit(4)); + Set(H14, at.GetBit(5)); + Set(H15, at.GetBit(6)); + - } diff --git a/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml b/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml index 5bc28a3..781cce4 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml @@ -116,14 +116,14 @@ HslSwitchz8 70, 90 - + 28, 471 - HslSwitchz7 + HslSwitchz6 70, 90 - + 28, 561 - HslSwitchz6 + HslSwitchz7 70, 90