dep
杨威 4 months ago
parent 65381775dc
commit 68cfadd7fa

@ -154,6 +154,7 @@ namespace Mesnac.Action.ChemicalWeighing.Qu
HslSwitch HslSwitch15; HslSwitch HslSwitch15;
HslSwitch HslSwitch16; HslSwitch HslSwitch16;
HslSwitch HslSwitch17;
HslLanternSimple Hsldq1; HslLanternSimple Hsldq1;
@ -415,6 +416,10 @@ namespace Mesnac.Action.ChemicalWeighing.Qu
HslSwitch16.Text = "回收仓侧吹启停"; HslSwitch16.Text = "回收仓侧吹启停";
HslSwitch17 = controls.FirstOrDefault(x => x.Name == "HslSwitch17") as HslSwitch;
HslSwitch17.Text = "回收仓振动电机启停";
HslSwitch1.OnSwitchChanged += HslSwitch1_OnSwitchChanged; HslSwitch1.OnSwitchChanged += HslSwitch1_OnSwitchChanged;
HslSwitch2.OnSwitchChanged += HslSwitch1_OnSwitchChanged; HslSwitch2.OnSwitchChanged += HslSwitch1_OnSwitchChanged;
HslSwitch3.OnSwitchChanged += HslSwitch1_OnSwitchChanged; HslSwitch3.OnSwitchChanged += HslSwitch1_OnSwitchChanged;
@ -433,10 +438,19 @@ namespace Mesnac.Action.ChemicalWeighing.Qu
HslSwitch16.OnSwitchChanged += HslSwitch16_OnSwitchChanged; HslSwitch16.OnSwitchChanged += HslSwitch16_OnSwitchChanged;
HslSwitch17.OnSwitchChanged += HslSwitch17_OnSwitchChanged;
MCButton2147483644_Click(new object(), new EventArgs()); 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) private void HslSwitch16_OnSwitchChanged(object arg1, bool arg2)
{ {
string add = "DB2119.16.7"; string add = "DB2119.16.7";
@ -1239,6 +1253,10 @@ namespace Mesnac.Action.ChemicalWeighing.Qu
var sss = plc.ReadBool("DB2119.16.7").Content; var sss = plc.ReadBool("DB2119.16.7").Content;
this.HslSwitch16.SwitchStatus = sss; this.HslSwitch16.SwitchStatus = sss;
sss = plc.ReadBool("DB2119.17.0").Content;
this.HslSwitch17.SwitchStatus = sss;
} }
} }

@ -1,6 +1,11 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FrmQu" children="Controls"> <Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FrmQu" children="Controls">
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox10" children="Controls"> <Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox10" children="Controls">
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch17" children="Controls">
<Property name="Location">206, 20</Property>
<Property name="Name">HslSwitch17</Property>
<Property name="Size">119, 121</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch16" children="Controls"> <Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch16" children="Controls">
<Property name="Location">43, 20</Property> <Property name="Location">43, 20</Property>
<Property name="Name">HslSwitch16</Property> <Property name="Name">HslSwitch16</Property>
@ -118,8 +123,7 @@
<Property name="Size">39, 32</Property> <Property name="Size">39, 32</Property>
</Object> </Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel2147483614" children="Controls"> <Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel2147483614" children="Controls">
<Property name="Format"> <Property name="Format" />
</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
@ -138,8 +142,7 @@
<Property name="Size">29, 12</Property> <Property name="Size">29, 12</Property>
</Object> </Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel2147483615" children="Controls"> <Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel2147483615" children="Controls">
<Property name="Format"> <Property name="Format" />
</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>

Loading…
Cancel
Save