diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs index 20f8974..55bb8aa 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Qu/InitAction.cs @@ -154,6 +154,7 @@ namespace Mesnac.Action.ChemicalWeighing.Qu HslSwitch HslSwitch15; HslSwitch HslSwitch16; + HslSwitch HslSwitch17; HslLanternSimple Hsldq1; @@ -415,6 +416,10 @@ namespace Mesnac.Action.ChemicalWeighing.Qu HslSwitch16.Text = "回收仓侧吹启停"; + HslSwitch17 = controls.FirstOrDefault(x => x.Name == "HslSwitch17") as HslSwitch; + HslSwitch17.Text = "回收仓振动电机启停"; + + HslSwitch1.OnSwitchChanged += HslSwitch1_OnSwitchChanged; HslSwitch2.OnSwitchChanged += HslSwitch1_OnSwitchChanged; HslSwitch3.OnSwitchChanged += HslSwitch1_OnSwitchChanged; @@ -433,10 +438,19 @@ namespace Mesnac.Action.ChemicalWeighing.Qu HslSwitch16.OnSwitchChanged += HslSwitch16_OnSwitchChanged; + HslSwitch17.OnSwitchChanged += HslSwitch17_OnSwitchChanged; MCButton2147483644_Click(new object(), new EventArgs()); } + private void HslSwitch17_OnSwitchChanged(object arg1, bool arg2) + { + + string add = "DB2119.17.0"; + var val = PlcConnect.Instance.ReadBool(add).Content; + PlcConnect.Instance.Write(add, !val); + } + private void HslSwitch16_OnSwitchChanged(object arg1, bool arg2) { string add = "DB2119.16.7"; @@ -1239,6 +1253,10 @@ namespace Mesnac.Action.ChemicalWeighing.Qu var sss = plc.ReadBool("DB2119.16.7").Content; this.HslSwitch16.SwitchStatus = sss; + + sss = plc.ReadBool("DB2119.17.0").Content; + + this.HslSwitch17.SwitchStatus = sss; } } diff --git a/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml b/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml index e3e30a2..8136c00 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/FrmQu.xml @@ -1,6 +1,11 @@ + + 206, 20 + HslSwitch17 + 119, 121 + 43, 20 HslSwitch16 @@ -118,8 +123,7 @@ 39, 32 - - + Red DarkGray @@ -138,8 +142,7 @@ 29, 12 - - + Red DarkGray