diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs index 2a0928d..da6828f 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs @@ -96,6 +96,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver #endregion + MCLabel MCLabel349; + MCLabel MCLabel350; + + Color mcCol; + #region 接口Run方法 public void Run(RuntimeParameter runtime) @@ -110,6 +115,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver SetAllControls(); + MCLabel349 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel349") as MCLabel; + MCLabel350 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel350") as MCLabel; + mcCol = MCLabel349.ForeColor; //wangsr(); AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm"); @@ -121,6 +129,24 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver } + private void other() + { + var a = PlcConnect.Instance.ReadFloat("DB1.1634").Content; + if (a > 40) + { + MCLabel349.ForeColor=Color.Red; + + } + else + { + MCLabel349.ForeColor = mcCol; + } + MCLabel349.Text = a.ToString("0.00") + " mg/m3"; + + var b = PlcConnect.Instance.ReadFloat("DB1.1654").Content; + MCLabel350.Text = b.ToString("0.00") + " ℃"; + } + #endregion #region 方法 @@ -207,6 +233,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver timer.Dispose(); } + other(); + DB1 = new DB1Helper(); DB90 = new DB90Helper(); DB91 = new DB91Helper(); diff --git a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml index f8aed08..2c8c5a8 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml @@ -1,6 +1,90 @@ + + + + Red + DarkGray + + + False + + + + None + True + True + 压送罐1 + Transparent + ButtonHighlight + 475, 112 + MCLabel350 + 47, 12 + + + + + Red + DarkGray + + + False + + + + None + True + True + 压送罐1 + Transparent + ButtonHighlight + 476, 86 + MCLabel349 + 47, 12 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 大仓排气口温度 + ButtonHighlight + 357, 111 + MCLabel348 + 89, 12 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 大仓排气口粉尘浓度 + ButtonHighlight + 357, 86 + MCLabel347 + 113, 12 +