1 维修模式

dep
我叫锄头 11 months ago
parent 0e6c313205
commit 2d5f03807e

@ -1342,22 +1342,26 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetFan(FanE.DM1DRY4_Running, PlcReadTemp.DM1DRY4_Running_Set); ControlsHelper.SetFan(FanE.DM1DRY4_Running, PlcReadTemp.DM1DRY4_Running_Set);
ControlsHelper.SetFan(FanE.PM3ADF01, PlcReadTemp.PM3ADF01_Set); ControlsHelper.SetFan(FanE.PM3ADF01, PlcReadTemp.PM3ADF01_Set);
ControlsHelper.SetSwitchLight(LightE.DMWETER1, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm); var wx = Db3000Helper.ReadModel();
ControlsHelper.SetSwitchLight(LightE.DMWETER11, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm);
ControlsHelper.SetSwitchLight(LightE.DMWETER2, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER1, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm, wx[0]);
ControlsHelper.SetSwitchLight(LightE.DMWETER22, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER11, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm, wx[0]);
ControlsHelper.SetSwitchLight(LightE.DMWETER3, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER2, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm, wx[1]);
ControlsHelper.SetSwitchLight(LightE.DMWETER33, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER22, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm, wx[1]);
ControlsHelper.SetSwitchLight(LightE.DMWETER4, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER3, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm, wx[2]);
ControlsHelper.SetSwitchLight(LightE.DMWETER44, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER33, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm, wx[2]);
ControlsHelper.SetSwitchLight(LightE.DMWETER5, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm);
ControlsHelper.SetSwitchLight(LightE.DMWETER55, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER4, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm, wx[3]);
ControlsHelper.SetSwitchLight(LightE.DMWETER6, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER44, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm, wx[3]);
ControlsHelper.SetSwitchLight(LightE.DMWETER66, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER5, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm, wx[4]);
ControlsHelper.SetSwitchLight(LightE.DMWETER7, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER55, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm, wx[4]);
ControlsHelper.SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER6, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm, wx[5]);
ControlsHelper.SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER66, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm, wx[5]);
ControlsHelper.SetSwitchLight(LightE.DMWETER88, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER7, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm, wx[6]);
ControlsHelper.SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm, wx[6]);
ControlsHelper.SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm, wx[7]);
ControlsHelper.SetSwitchLight(LightE.DMWETER88, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm, wx[7]);
//压力参数 //压力参数

@ -91,6 +91,34 @@ namespace Mesnac.Action.ChemicalWeighing.Util
} }
} }
public static void SetSwitchLight(SwitchLight obj, bool set, bool alarm, bool weixiu)
{
obj.BackColor = Color.Gray;
if (weixiu == true)
{
obj.Status = SwitchLight.Statuses.ylWeiXiu;
}
else
{
if (set == true && alarm == false)
{
obj.Status = SwitchLight.Statuses.ylMove;
}
else if (alarm == true)
{
obj.Status = SwitchLight.Statuses.ylAlarm;
}
else
{
obj.Status = SwitchLight.Statuses.ylNormal;
}
}
}
/// <summary> /// <summary>
/// 阀门 /// 阀门
/// </summary> /// </summary>

@ -673,6 +673,9 @@
<EmbeddedResource Include="Resources\AlarmLightNewRed.png"> <EmbeddedResource Include="Resources\AlarmLightNewRed.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Resources\AlarmLightPurple.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<Content Include="Resources\prepareHopperRight.png" /> <Content Include="Resources\prepareHopperRight.png" />
<Content Include="Resources\prepareHopperLeft.png" /> <Content Include="Resources\prepareHopperLeft.png" />
<Content Include="Resources\fay.png" /> <Content Include="Resources\fay.png" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

@ -32,7 +32,7 @@ namespace Mesnac.Controls.ChemicalWeighing
} }
public enum Statuses public enum Statuses
{ {
ylNormal = 0, ylMove = 1, ylAlarm = 2 ylNormal = 0, ylMove = 1, ylAlarm = 2,ylWeiXiu=3
} }
Statuses _status; Statuses _status;
string[] sImages; string[] sImages;
@ -48,10 +48,11 @@ namespace Mesnac.Controls.ChemicalWeighing
base.Init(); base.Init();
_imageStream = null; _imageStream = null;
sImages = new string[3]; sImages = new string[4];
sImages[0] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewGray.png";// sImages[0] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewGray.png";//
sImages[1] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewGreen.png";// sImages[1] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewGreen.png";//
sImages[2] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewRed.png";// sImages[2] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewRed.png";//
sImages[3] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightPurple.png";//
_status = Statuses.ylNormal; _status = Statuses.ylNormal;
} }
@ -84,18 +85,37 @@ namespace Mesnac.Controls.ChemicalWeighing
bNewPic = true; bNewPic = true;
} }
} }
if ((int)value < 0)
var val = (int)value;
if (val == 0)
{ {
_status = (Statuses)0; _status = (Statuses)0;
} }
else if ((int)value > 2)
if (val == 1)
{
_status = (Statuses)1;
}
if (val == 2)
{ {
_status = (Statuses)2; _status = (Statuses)2;
} }
else
if (val == 3)
{
_status = (Statuses)3;
}
if (val == 4)
{ {
_status = value; _status = (Statuses)4;
} }
ReloadStream(); ReloadStream();
Reload(); Reload();
} }

Loading…
Cancel
Save