From ef05ab42cb7f012454fc44f4e67a807a6de959d9 Mon Sep 17 00:00:00 2001 From: wangsr Date: Mon, 18 Dec 2023 17:24:29 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=BE=93=E9=80=81=E7=82=B9?= =?UTF-8?q?=E4=BD=8D=E5=A2=9E=E5=8A=A0=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LjDeliver/DeliverInitAction.cs | 43 +++++++++++++++++-- .../LjDeliver/Entity/DeliverEntity.cs | 5 +++ .../LjDeliver/Entity/PlcTempEntity.cs | 12 ++++++ .../Util/ControlsImprot.cs | 13 +++++- 4 files changed, 69 insertions(+), 4 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs index b368c03..2b9e77f 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs @@ -5,6 +5,7 @@ using DevExpress.Utils.FormShadow; using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.LjDeliver.Entity; using Mesnac.Action.ChemicalWeighing.LjMaterial; +using Mesnac.Action.ChemicalWeighing.Util; using Mesnac.Controls.Base; using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; @@ -35,6 +36,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver DB1Helper DB1 = new DB1Helper(); DB90Helper DB90 = new DB90Helper(); DB91Helper DB91 = new DB91Helper(); + DB137Helper DB137 = new DB137Helper(); byte[] b1; byte[] b90; //db1/90的byte数组 @@ -56,7 +58,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver ThreeWayValveEntity ThreeWayValveE = new ThreeWayValveEntity(); LjSwitchEntity LjSwitchE = new LjSwitchEntity(); MCLabelEntity LabelE = new MCLabelEntity(); - /// /// 报警滚动条 /// @@ -119,6 +120,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver DB1 = new DB1Helper(); DB90 = new DB90Helper(); DB91 = new DB91Helper(); + DB137 = new DB137Helper(); DB1GetData(); DB90GetData(); @@ -424,9 +426,28 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver private void DBOtherGetData() { - + PlcTemp.HighLevel1 = DB137.HighLevel01; + PlcTemp.HighLevel2 = DB137.HighLevel02; + PlcTemp.HighLevel3 = DB137.HighLevel03; + + PlcTemp.Excitation1 = DB137.Excitation01; + PlcTemp.Excitation2 = DB137.Excitation02; + PlcTemp.Excitation3 = DB137.Excitation03; + + PlcTemp.SideBlowing1 = DB137.SideBlowing01; + PlcTemp.SideBlowing2 = DB137.SideBlowing02; + PlcTemp.SideBlowing3 = DB137.SideBlowing03; + + PlcTemp.Atank1_Set = MReadHelp.Read()[0]; + PlcTemp.Atank2_Set = MReadHelp.Read()[1]; + PlcTemp.Atank3_Set = MReadHelp.Read()[2]; + PlcTemp.Atank4_Set = MReadHelp.Read()[3]; + PlcTemp.Atank5_Set = MReadHelp.Read()[4]; + PlcTemp.Atank6_Set = MReadHelp.Read()[5]; } + + private void DB1SetData() { ControlsHelper.SetMCLabel(LabelE.PR1ASI01, (float)Math.Round(PlcTemp.PR1ASI01_Set, 2)); @@ -587,7 +608,23 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver private void DBOtherSetData() { - + ControlsImprot.SetJzf(JzfE.Excitation1, PlcTemp.Excitation1); + ControlsImprot.SetJzf(JzfE.Excitation2, PlcTemp.Excitation2); + ControlsImprot.SetJzf(JzfE.Excitation3, PlcTemp.Excitation3); + ControlsImprot.SetJzf(JzfE.SideBlowing1, PlcTemp.SideBlowing1); + ControlsImprot.SetJzf(JzfE.SideBlowing2, PlcTemp.SideBlowing2); + ControlsImprot.SetJzf(JzfE.SideBlowing3, PlcTemp.SideBlowing3); + + ControlsImprot.SetSwitchLight(SwitchlightE.Atank1, PlcTemp.Atank1_Set); + ControlsImprot.SetSwitchLight(SwitchlightE.Atank2, PlcTemp.Atank2_Set); + ControlsImprot.SetSwitchLight(SwitchlightE.Atank3, PlcTemp.Atank3_Set); + ControlsImprot.SetSwitchLight(SwitchlightE.Atank4, PlcTemp.Atank4_Set); + ControlsImprot.SetSwitchLight(SwitchlightE.Atank5, PlcTemp.Atank5_Set); + ControlsImprot.SetSwitchLight(SwitchlightE.Atank6, PlcTemp.Atank6_Set); + + ControlsImprot.SetSwitchLight(SwitchlightE.HighLevel1, PlcTemp.HighLevel1); + ControlsImprot.SetSwitchLight(SwitchlightE.HighLevel2, PlcTemp.HighLevel2); + ControlsImprot.SetSwitchLight(SwitchlightE.HighLevel3, PlcTemp.HighLevel3); } #endregion diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs index ca98120..5a49a2a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs @@ -179,6 +179,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity public SwitchLight LSiloM { get; set; } public SwitchLight LSiloN { get; set; } public SwitchLight LSiloO { get; set; } + public SwitchLight Atank1 { get; set; } public SwitchLight Atank2 { get; set; } public SwitchLight Atank3 { get; set; } @@ -190,6 +191,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity public SwitchLight DM2DSM01 { get; set; } public SwitchLight DM3DSM01 { get; set; } + public SwitchLight HighLevel1 { get; set; } + public SwitchLight HighLevel2 { get; set; } + public SwitchLight HighLevel3 { get; set; } + } internal class JzfEntity diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs index 2f4f7a6..2e38814 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs @@ -1,5 +1,6 @@ using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; +using Mesnac.Controls.Feeding; using System; using System.Collections.Generic; using System.Linq; @@ -304,6 +305,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity public bool LSiloM_Set { get; set; } public bool LSiloN_Set { get; set; } public bool LSiloO_Set { get; set; } + public bool Atank1_Set { get; set; } public bool Atank2_Set { get; set; } public bool Atank3_Set { get; set; } @@ -334,5 +336,15 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity public bool DM2DSM01_Alarm { get; set; } public bool DM3DSM01_Alarm { get; set; } + public bool Excitation1 { get; set; } + public bool Excitation2 { get; set; } + public bool Excitation3 { get; set; } + public bool SideBlowing1 { get; set; } + public bool SideBlowing2 { get; set; } + public bool SideBlowing3 { get; set; } + + public bool HighLevel1 { get; set; } + public bool HighLevel2 { get; set; } + public bool HighLevel3 { get; set; } } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs index 953c073..ae0eb4f 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs @@ -90,7 +90,18 @@ namespace Mesnac.Action.ChemicalWeighing.Util obj.Status = SwitchLight.Statuses.ylNormal; } } - + public static void SetSwitchLight(SwitchLight obj, bool set) + { + obj.BackColor = Color.Gray; + if (set == true) + { + obj.Status = SwitchLight.Statuses.ylMove; + } + else + { + obj.Status = SwitchLight.Statuses.ylNormal; + } + } /// /// 阀门 ///