From bc0f71814b30815af6b03524123fe1597db24d20 Mon Sep 17 00:00:00 2001 From: wangsr Date: Mon, 11 Dec 2023 16:26:02 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=8E=BB=E6=8E=89=E8=80=81?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LjDeliver/DeliverInitAction.cs | 59 ++++++------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs index 2d9917e..ecf7374 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs @@ -26,6 +26,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver { public class DeliverInitAction : ChemicalWeighingAction, IAction { + #region 属性 + PlcTempEntity PlcTemp = new PlcTempEntity(); private Timer timer; @@ -64,6 +66,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver #endregion + #endregion + + #region 接口Run方法 + public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 @@ -85,6 +91,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver } + #endregion + + #region 方法 + private void SetAllControls() { ControlsHelper.ControlImport(bottleE, Controls); @@ -108,8 +118,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver timer.Stop(); timer.Dispose(); } - - AlarmControl(); DB1 = new DB1Helper(); DB90 = new DB90Helper(); @@ -122,6 +130,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver DB1SetData(); DB90SetData(); DB2103SetData(); + + AlarmControl(); } #region plc读取前端控件值写入 @@ -610,26 +620,12 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver private void AlarmControl() { - - //DataTable TempTable = DBHelp.GetTable(@"SELECT - // t2.Alarm_Other_Info, - // t2.Alarm_Cn_Info, - // t1.Alarm_OccurTime - // FROM - // LR_Alarmlog t1 - // LEFT JOIN Pmt_Alarm t2 ON t1.Alarm_ID = t2.Alarm_ID - // WHERE - // t1.Alarm_Status = 1 - // ORDER BY - // t1.Alarm_OccurTime desc"); - b1 = DB1.bytes; b90 = DB90.bytes; b2103 = DB2103.bytes; StringBuilder sb = new StringBuilder(); - //string nowtime = DateTime.Now.ToString(); //报警点位遍历 foreach (DataRow rows in AllAlarmTable.Rows) { @@ -667,31 +663,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver } #endregion - - - - - - - - - - - - - - - - - - - - - - - - - + + #region 测试程序 /// /// 测试程序 @@ -768,5 +741,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver Thread thread = new Thread(threadStart); thread.Start(); } + + #endregion + + #endregion } }