You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
666 lines
36 KiB
C#
666 lines
36 KiB
C#
using DataBlockHelper;
|
|
using DataBlockHelper.DBHelpers;
|
|
using DevExpress.Data.Filtering.Helpers;
|
|
using DevExpress.Utils.FormShadow;
|
|
using Mesnac.Action.Base;
|
|
using Mesnac.Action.ChemicalWeighing.LjDeliver.Entity;
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
using Mesnac.Controls.Base;
|
|
using Mesnac.Controls.ChemicalWeighing;
|
|
using Mesnac.Controls.Default;
|
|
using Mesnac.Controls.Feeding;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using Timer = System.Windows.Forms.Timer;
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
{
|
|
public class DeliverInitAction : ChemicalWeighingAction, IAction
|
|
{
|
|
#region 属性
|
|
|
|
PlcTempEntity PlcTemp = new PlcTempEntity();
|
|
|
|
private Timer timer;
|
|
|
|
DB1Helper DB1 = new DB1Helper();
|
|
DB90Helper DB90 = new DB90Helper();
|
|
|
|
byte[] b1;
|
|
byte[] b90; //db1/90的byte数组
|
|
|
|
/// <summary>
|
|
/// 所有Alarm点位
|
|
/// </summary>
|
|
DataTable AllAlarmTable = new DataTable();
|
|
|
|
private string AlarmString = "";
|
|
|
|
#region 控件属性
|
|
|
|
List<Control> Controls;
|
|
|
|
HslBottleEntity bottleE = new HslBottleEntity();
|
|
SwitchLightEntity SwitchlightE = new SwitchLightEntity();
|
|
//JzfEntity JzfE = new JzfEntity();
|
|
ThreeWayValveEntity ThreeWayValveE = new ThreeWayValveEntity();
|
|
LjSwitchEntity LjSwitchE = new LjSwitchEntity();
|
|
MCLabelEntity LabelE = new MCLabelEntity();
|
|
|
|
/// <summary>
|
|
/// 报警滚动条
|
|
/// </summary>
|
|
HslMoveText AlarmMoveText;
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region 接口Run方法
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
{
|
|
base.RunIni(runtime); //必须调用
|
|
|
|
Controls = GetAllControls();
|
|
|
|
AlarmMoveText = Controls.FirstOrDefault(x => x != null && x.Name == "AlarmMoveText") as HslMoveText;
|
|
|
|
SetAllControls();
|
|
|
|
//wangsr();
|
|
|
|
AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm");
|
|
|
|
timer = new Timer();
|
|
timer.Interval = 1000;
|
|
timer.Enabled = true;
|
|
timer.Tick += GetPlcValue;//添加事件
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 方法
|
|
|
|
private void SetAllControls()
|
|
{
|
|
ControlsHelper.ControlImport<HslBottle>(bottleE, Controls);
|
|
ControlsHelper.ControlImport<SwitchLight>(SwitchlightE, Controls);
|
|
//ControlsHelper.ControlImport<Jzf>(JzfE, Controls);
|
|
ControlsHelper.ControlImport<ThreeWayValve>(ThreeWayValveE, Controls);
|
|
ControlsHelper.ControlImport<LjSwith>(LjSwitchE, Controls);
|
|
ControlsHelper.ControlImport<MCLabel>(LabelE, Controls);
|
|
|
|
this.AlarmMoveText.Font = new Font("宋体", 15f, FontStyle.Regular, GraphicsUnit.Point, 134);
|
|
this.AlarmMoveText.ForeColor = Color.White;
|
|
this.AlarmMoveText.MoveSpeed = 4f;
|
|
this.AlarmMoveText.Text = AlarmString;
|
|
}
|
|
|
|
private void GetPlcValue(object sender, EventArgs e)
|
|
{
|
|
if (GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count == 0)
|
|
{
|
|
timer.Stop();
|
|
timer.Dispose();
|
|
}
|
|
|
|
DB1 = new DB1Helper();
|
|
DB90 = new DB90Helper();
|
|
|
|
DB1GetData();
|
|
DB90GetData();
|
|
|
|
DB1SetData();
|
|
DB90SetData();
|
|
|
|
AlarmControl();
|
|
}
|
|
|
|
#region plc读取前端控件值写入
|
|
|
|
|
|
private void DB1GetData()
|
|
{
|
|
PlcTemp.PR1ASI01_Set = DB1.PR1ASI01.ACT_VALUE;
|
|
PlcTemp.PR1BSI01_Set = DB1.PR1BSI01.ACT_VALUE;
|
|
PlcTemp.PR1CSI01_Set = DB1.PR1CSI01.ACT_VALUE;
|
|
PlcTemp.PR1DSI01_Set = DB1.PR1DSI01.ACT_VALUE;
|
|
PlcTemp.PR1ESI01_Set = DB1.PR1ESI01.ACT_VALUE;
|
|
PlcTemp.PR1FSI01_Set = DB1.PR1FSI01.ACT_VALUE;
|
|
PlcTemp.PR1GSI01_Set = DB1.PR1GSI01.ACT_VALUE;
|
|
PlcTemp.PR1HSI01_Set = DB1.PR1HSI01.ACT_VALUE;
|
|
PlcTemp.PR1ISI01_Set = DB1.PR1ISI01.ACT_VALUE;
|
|
PlcTemp.PR1JSI01_Set = DB1.PR1JSI01.ACT_VALUE;
|
|
PlcTemp.PR1KSI01_Set = DB1.PR1KSI01.ACT_VALUE;
|
|
PlcTemp.PR1LSI01_Set = DB1.PR1LSI01.ACT_VALUE;
|
|
PlcTemp.PR1MSI01_Set = DB1.PR1MSI01.ACT_VALUE;
|
|
PlcTemp.PR1NSI01_Set = DB1.PR1NSI01.ACT_VALUE;
|
|
PlcTemp.PR1OSI01_Set = DB1.PR1OSI01.ACT_VALUE;
|
|
PlcTemp.HR1ASI01_Set = DB1.HR1ASI01.ACT_VALUE;
|
|
PlcTemp.HR1BSI01_Set = DB1.HR1BSI01.ACT_VALUE;
|
|
PlcTemp.HR1CSI01_Set = DB1.HR1CSI01.ACT_VALUE;
|
|
PlcTemp.HR1DSI01_Set = DB1.HR1DSI01.ACT_VALUE;
|
|
PlcTemp.HR1ESI01_Set = DB1.HR1ESI01.ACT_VALUE;
|
|
PlcTemp.HR1FSI01_Set = DB1.HR1FSI01.ACT_VALUE;
|
|
PlcTemp.HR1GSI01_Set = DB1.HR1GSI01.ACT_VALUE;
|
|
PlcTemp.HR1HSI01_Set = DB1.HR1HSI01.ACT_VALUE;
|
|
PlcTemp.HR1ISI01_Set = DB1.HR1ISI01.ACT_VALUE;
|
|
PlcTemp.HR1JSI01_Set = DB1.HR1JSI01.ACT_VALUE;
|
|
PlcTemp.HR1KSI01_Set = DB1.HR1KSI01.ACT_VALUE;
|
|
PlcTemp.HR1LSI01_Set = DB1.HR1LSI01.ACT_VALUE;
|
|
PlcTemp.HR1MSI01_Set = DB1.HR1MSI01.ACT_VALUE;
|
|
PlcTemp.HR1NSI01_Set = DB1.HR1NSI01.ACT_VALUE;
|
|
PlcTemp.HR1OSI01_Set = DB1.HR1OSI01.ACT_VALUE;
|
|
PlcTemp.SPV1DBT01_Set = DB1.SPV1DBT01.ACT_VALUE;
|
|
PlcTemp.SPV1DBT02_Set = DB1.SPV1DBT02.ACT_VALUE;
|
|
PlcTemp.SPV2DBT01_Set = DB1.SPV2DBT01.ACT_VALUE;
|
|
PlcTemp.SPV2DBT02_Set = DB1.SPV2DBT02.ACT_VALUE;
|
|
PlcTemp.SPV3DBT01_Set = DB1.SPV3DBT01.ACT_VALUE;
|
|
PlcTemp.SPV3DBT02_Set = DB1.SPV3DBT02.ACT_VALUE;
|
|
PlcTemp.PR1DBT01_Set = DB1.PR1DBT01.ACT_VALUE;
|
|
PlcTemp.PR2DBT01_Set = DB1.PR2DBT01.ACT_VALUE;
|
|
PlcTemp.PR3DBT01_Set = DB1.PR3DBT01.ACT_VALUE;
|
|
|
|
PlcTemp.Bottle1_Set = DB1.LS1ASI01.ACT_VALUE;
|
|
PlcTemp.Bottle2_Set = DB1.LS1BSI01.ACT_VALUE;
|
|
PlcTemp.Bottle3_Set = DB1.LS1CSI01.ACT_VALUE;
|
|
PlcTemp.Bottle4_Set = DB1.LS1DSI01.ACT_VALUE;
|
|
PlcTemp.Bottle5_Set = DB1.LS1ESI01.ACT_VALUE;
|
|
PlcTemp.Bottle6_Set = DB1.LS1FSI01.ACT_VALUE;
|
|
PlcTemp.Bottle7_Set = DB1.LS1GSI01.ACT_VALUE;
|
|
PlcTemp.Bottle8_Set = DB1.LS1HSI01.ACT_VALUE;
|
|
PlcTemp.Bottle9_Set = DB1.LS1ISI01.ACT_VALUE;
|
|
PlcTemp.Bottle10_Set = DB1.LS1JSI01.ACT_VALUE;
|
|
PlcTemp.Bottle11_Set = DB1.LS1KSI01.ACT_VALUE;
|
|
PlcTemp.Bottle12_Set = DB1.LS1LSI01.ACT_VALUE;
|
|
PlcTemp.Bottle13_Set = DB1.LS1MSI01.ACT_VALUE;
|
|
PlcTemp.Bottle14_Set = DB1.LS1NSI01.ACT_VALUE;
|
|
PlcTemp.Bottle15_Set = DB1.LS1OSI01.ACT_VALUE;
|
|
}
|
|
|
|
private void DB90GetData()
|
|
{
|
|
PlcTemp.BU1DBT01_Set = DB90.BU1DBT01.Set;
|
|
PlcTemp.BU1DBT02_Set = DB90.BU1DBT02.Set;
|
|
PlcTemp.BU1DBT03_Set = DB90.BU1DBT03.Set;
|
|
PlcTemp.BU1DBT04_Set = DB90.BU1DBT04.Set;
|
|
PlcTemp.BU1DBT06_Set = DB90.BU1DBT06.Set;
|
|
PlcTemp.BU1DBT07_Set = DB90.BU1DBT07.Set;
|
|
PlcTemp.BU2DBT01_Set = DB90.BU2DBT01.Set;
|
|
PlcTemp.BU2DBT02_Set = DB90.BU2DBT02.Set;
|
|
PlcTemp.BU2DBT03_Set = DB90.BU2DBT03.Set;
|
|
PlcTemp.BU2DBT04_Set = DB90.BU2DBT04.Set;
|
|
PlcTemp.BU2DBT06_Set = DB90.BU2DBT06.Set;
|
|
PlcTemp.BU2DBT07_Set = DB90.BU2DBT07.Set;
|
|
PlcTemp.BU3DBT01_Set = DB90.BU3DBT01.Set;
|
|
PlcTemp.BU3DBT02_Set = DB90.BU3DBT02.Set;
|
|
PlcTemp.BU3DBT03_Set = DB90.BU3DBT03.Set;
|
|
PlcTemp.BU3DBT04_Set = DB90.BU3DBT04.Set;
|
|
PlcTemp.BU3DBT06_Set = DB90.BU3DBT06.Set;
|
|
PlcTemp.BU3DBT07_Set = DB90.BU3DBT07.Set;
|
|
PlcTemp.AS1DBT01_Set = DB90.AS1DBT01.Set;
|
|
PlcTemp.AS1DBT02_Set = DB90.AS1DBT02.Set;
|
|
PlcTemp.AS1DBT03_Set = DB90.AS1DBT03.Set;
|
|
PlcTemp.AS1DBT04_Set = DB90.AS1DBT04.Set;
|
|
PlcTemp.AS1DBT05_Set = DB90.AS1DBT05.Set;
|
|
PlcTemp.AS1DBT06_Set = DB90.AS1DBT06.Set;
|
|
PlcTemp.AS1DBT07_Set = DB90.AS1DBT07.Set;
|
|
PlcTemp.AS2DBT01_Set = DB90.AS2DBT01.Set;
|
|
PlcTemp.AS2DBT02_Set = DB90.AS2DBT02.Set;
|
|
PlcTemp.AS2DBT03_Set = DB90.AS2DBT03.Set;
|
|
PlcTemp.AS2DBT04_Set = DB90.AS2DBT04.Set;
|
|
PlcTemp.AS2DBT05_Set = DB90.AS2DBT05.Set;
|
|
PlcTemp.AS2DBT06_Set = DB90.AS2DBT06.Set;
|
|
PlcTemp.AS2DBT07_Set = DB90.AS2DBT07.Set;
|
|
PlcTemp.AS3DBT01_Set = DB90.AS3DBT01.Set;
|
|
PlcTemp.AS3DBT02_Set = DB90.AS3DBT02.Set;
|
|
PlcTemp.AS3DBT03_Set = DB90.AS3DBT03.Set;
|
|
PlcTemp.AS3DBT04_Set = DB90.AS3DBT04.Set;
|
|
PlcTemp.AS3DBT05_Set = DB90.AS3DBT05.Set;
|
|
PlcTemp.AS3DBT06_Set = DB90.AS3DBT06.Set;
|
|
PlcTemp.AS3DBT07_Set = DB90.AS3DBT07.Set;
|
|
PlcTemp.AS1PCP01_Set = DB90.AS1PCP01.Set;
|
|
PlcTemp.AS1PCP02_Set = DB90.AS1PCP02.Set;
|
|
PlcTemp.AS1PCP03_Set = DB90.AS1PCP03.Set;
|
|
PlcTemp.AS1ASI01_Set = DB90.AS1ASI01.Set;
|
|
PlcTemp.AS1BSI01_Set = DB90.AS1BSI01.Set;
|
|
PlcTemp.AS1CSI01_Set = DB90.AS1CSI01.Set;
|
|
PlcTemp.AS1DSI01_Set = DB90.AS1DSI01.Set;
|
|
PlcTemp.AS1ESI01_Set = DB90.AS1ESI01.Set;
|
|
PlcTemp.AS1FSI01_Set = DB90.AS1FSI01.Set;
|
|
PlcTemp.AS1GSI01_Set = DB90.AS1GSI01.Set;
|
|
PlcTemp.AS1HSI01_Set = DB90.AS1HSI01.Set;
|
|
PlcTemp.AS1ISI01_Set = DB90.AS1ISI01.Set;
|
|
PlcTemp.AS1JSI01_Set = DB90.AS1JSI01.Set;
|
|
PlcTemp.AS1KSI01_Set = DB90.AS1KSI01.Set;
|
|
PlcTemp.AS1LSI01_Set = DB90.AS1LSI01.Set;
|
|
PlcTemp.AS1MSI01_Set = DB90.AS1MSI01.Set;
|
|
PlcTemp.AS1NSI01_Set = DB90.AS1NSI01.Set;
|
|
PlcTemp.AS1OSI01_Set = DB90.AS1OSI01.Set;
|
|
|
|
|
|
PlcTemp.BU1DBT01_Alarm = DB90.BU1DBT01.Alarm;
|
|
PlcTemp.BU1DBT02_Alarm = DB90.BU1DBT02.Alarm;
|
|
PlcTemp.BU1DBT03_Alarm = DB90.BU1DBT03.Alarm;
|
|
PlcTemp.BU1DBT04_Alarm = DB90.BU1DBT04.Alarm;
|
|
PlcTemp.BU1DBT06_Alarm = DB90.BU1DBT06.Alarm;
|
|
PlcTemp.BU1DBT07_Alarm = DB90.BU1DBT07.Alarm;
|
|
PlcTemp.BU2DBT01_Alarm = DB90.BU2DBT01.Alarm;
|
|
PlcTemp.BU2DBT02_Alarm = DB90.BU2DBT02.Alarm;
|
|
PlcTemp.BU2DBT03_Alarm = DB90.BU2DBT03.Alarm;
|
|
PlcTemp.BU2DBT04_Alarm = DB90.BU2DBT04.Alarm;
|
|
PlcTemp.BU2DBT06_Alarm = DB90.BU2DBT06.Alarm;
|
|
PlcTemp.BU2DBT07_Alarm = DB90.BU2DBT07.Alarm;
|
|
PlcTemp.BU3DBT01_Alarm = DB90.BU3DBT01.Alarm;
|
|
PlcTemp.BU3DBT02_Alarm = DB90.BU3DBT02.Alarm;
|
|
PlcTemp.BU3DBT03_Alarm = DB90.BU3DBT03.Alarm;
|
|
PlcTemp.BU3DBT04_Alarm = DB90.BU3DBT04.Alarm;
|
|
PlcTemp.BU3DBT06_Alarm = DB90.BU3DBT06.Alarm;
|
|
PlcTemp.BU3DBT07_Alarm = DB90.BU3DBT07.Alarm;
|
|
PlcTemp.AS1DBT01_Alarm = DB90.AS1DBT01.Alarm;
|
|
PlcTemp.AS1DBT02_Alarm = DB90.AS1DBT02.Alarm;
|
|
PlcTemp.AS1DBT03_Alarm = DB90.AS1DBT03.Alarm;
|
|
PlcTemp.AS1DBT04_Alarm = DB90.AS1DBT04.Alarm;
|
|
PlcTemp.AS1DBT05_Alarm = DB90.AS1DBT05.Alarm;
|
|
PlcTemp.AS1DBT06_Alarm = DB90.AS1DBT06.Alarm;
|
|
PlcTemp.AS1DBT07_Alarm = DB90.AS1DBT07.Alarm;
|
|
PlcTemp.AS2DBT01_Alarm = DB90.AS2DBT01.Alarm;
|
|
PlcTemp.AS2DBT02_Alarm = DB90.AS2DBT02.Alarm;
|
|
PlcTemp.AS2DBT03_Alarm = DB90.AS2DBT03.Alarm;
|
|
PlcTemp.AS2DBT04_Alarm = DB90.AS2DBT04.Alarm;
|
|
PlcTemp.AS2DBT05_Alarm = DB90.AS2DBT05.Alarm;
|
|
PlcTemp.AS2DBT06_Alarm = DB90.AS2DBT06.Alarm;
|
|
PlcTemp.AS2DBT07_Alarm = DB90.AS2DBT07.Alarm;
|
|
PlcTemp.AS3DBT01_Alarm = DB90.AS3DBT01.Alarm;
|
|
PlcTemp.AS3DBT02_Alarm = DB90.AS3DBT02.Alarm;
|
|
PlcTemp.AS3DBT03_Alarm = DB90.AS3DBT03.Alarm;
|
|
PlcTemp.AS3DBT04_Alarm = DB90.AS3DBT04.Alarm;
|
|
PlcTemp.AS3DBT05_Alarm = DB90.AS3DBT05.Alarm;
|
|
PlcTemp.AS3DBT06_Alarm = DB90.AS3DBT06.Alarm;
|
|
PlcTemp.AS3DBT07_Alarm = DB90.AS3DBT07.Alarm;
|
|
PlcTemp.AS1PCP01_Alarm = DB90.AS1PCP01.Alarm;
|
|
PlcTemp.AS1PCP02_Alarm = DB90.AS1PCP02.Alarm;
|
|
PlcTemp.AS1PCP03_Alarm = DB90.AS1PCP03.Alarm;
|
|
PlcTemp.AS1ASI01_Alarm = DB90.AS1ASI01.Alarm;
|
|
PlcTemp.AS1BSI01_Alarm = DB90.AS1BSI01.Alarm;
|
|
PlcTemp.AS1CSI01_Alarm = DB90.AS1CSI01.Alarm;
|
|
PlcTemp.AS1DSI01_Alarm = DB90.AS1DSI01.Alarm;
|
|
PlcTemp.AS1ESI01_Alarm = DB90.AS1ESI01.Alarm;
|
|
PlcTemp.AS1FSI01_Alarm = DB90.AS1FSI01.Alarm;
|
|
PlcTemp.AS1GSI01_Alarm = DB90.AS1GSI01.Alarm;
|
|
PlcTemp.AS1HSI01_Alarm = DB90.AS1HSI01.Alarm;
|
|
PlcTemp.AS1ISI01_Alarm = DB90.AS1ISI01.Alarm;
|
|
PlcTemp.AS1JSI01_Alarm = DB90.AS1JSI01.Alarm;
|
|
PlcTemp.AS1KSI01_Alarm = DB90.AS1KSI01.Alarm;
|
|
PlcTemp.AS1LSI01_Alarm = DB90.AS1LSI01.Alarm;
|
|
PlcTemp.AS1MSI01_Alarm = DB90.AS1MSI01.Alarm;
|
|
PlcTemp.AS1NSI01_Alarm = DB90.AS1NSI01.Alarm;
|
|
PlcTemp.AS1OSI01_Alarm = DB90.AS1OSI01.Alarm;
|
|
|
|
|
|
PlcTemp.DV1PCP01_SetL = DB90.DV1PCP01.LeftPosition;
|
|
PlcTemp.DV1PCP02_SetL = DB90.DV1PCP02.LeftPosition;
|
|
PlcTemp.DV1PCP03_SetL = DB90.DV1PCP03.LeftPosition;
|
|
PlcTemp.DV1PCP04_SetL = DB90.DV1PCP04.LeftPosition;
|
|
PlcTemp.DV1PCP05_SetL = DB90.DV1PCP05.LeftPosition;
|
|
PlcTemp.DV1PCP06_SetL = DB90.DV1PCP06.LeftPosition;
|
|
PlcTemp.DV1PCP07_SetL = DB90.DV1PCP07.LeftPosition;
|
|
PlcTemp.DV1PCP08_SetL = DB90.DV1PCP08.LeftPosition;
|
|
PlcTemp.DV1PCP09_SetL = DB90.DV1PCP09.LeftPosition;
|
|
PlcTemp.DV1PCP10_SetL = DB90.DV1PCP10.LeftPosition;
|
|
PlcTemp.DV1PCP11_SetL = DB90.DV1PCP11.LeftPosition;
|
|
PlcTemp.DV1PCP12_SetL = DB90.DV1PCP12.LeftPosition;
|
|
PlcTemp.DV1PCP13_SetL = DB90.DV1PCP13.LeftPosition;
|
|
PlcTemp.DV1PCP14_SetL = DB90.DV1PCP14.LeftPosition;
|
|
PlcTemp.DV1PCP15_SetL = DB90.DV1PCP15.LeftPosition;
|
|
PlcTemp.DV1PCP16_SetL = DB90.DV1PCP16.LeftPosition;
|
|
PlcTemp.DV1PCP17_SetL = DB90.DV1PCP17.LeftPosition;
|
|
PlcTemp.DV1PCP18_SetL = DB90.DV1PCP18.LeftPosition;
|
|
PlcTemp.DV1PCP19_SetL = DB90.DV1PCP19.LeftPosition;
|
|
PlcTemp.DV1PCP20_SetL = DB90.DV1PCP20.LeftPosition;
|
|
|
|
|
|
PlcTemp.DV1PCP01_SetR = DB90.DV1PCP01.RightPosition;
|
|
PlcTemp.DV1PCP02_SetR = DB90.DV1PCP02.RightPosition;
|
|
PlcTemp.DV1PCP03_SetR = DB90.DV1PCP03.RightPosition;
|
|
PlcTemp.DV1PCP04_SetR = DB90.DV1PCP04.RightPosition;
|
|
PlcTemp.DV1PCP05_SetR = DB90.DV1PCP05.RightPosition;
|
|
PlcTemp.DV1PCP06_SetR = DB90.DV1PCP06.RightPosition;
|
|
PlcTemp.DV1PCP07_SetR = DB90.DV1PCP07.RightPosition;
|
|
PlcTemp.DV1PCP08_SetR = DB90.DV1PCP08.RightPosition;
|
|
PlcTemp.DV1PCP09_SetR = DB90.DV1PCP09.RightPosition;
|
|
PlcTemp.DV1PCP10_SetR = DB90.DV1PCP10.RightPosition;
|
|
PlcTemp.DV1PCP11_SetR = DB90.DV1PCP11.RightPosition;
|
|
PlcTemp.DV1PCP12_SetR = DB90.DV1PCP12.RightPosition;
|
|
PlcTemp.DV1PCP13_SetR = DB90.DV1PCP13.RightPosition;
|
|
PlcTemp.DV1PCP14_SetR = DB90.DV1PCP14.RightPosition;
|
|
PlcTemp.DV1PCP15_SetR = DB90.DV1PCP15.RightPosition;
|
|
PlcTemp.DV1PCP16_SetR = DB90.DV1PCP16.RightPosition;
|
|
PlcTemp.DV1PCP17_SetR = DB90.DV1PCP17.RightPosition;
|
|
PlcTemp.DV1PCP18_SetR = DB90.DV1PCP18.RightPosition;
|
|
PlcTemp.DV1PCP19_SetR = DB90.DV1PCP19.RightPosition;
|
|
PlcTemp.DV1PCP20_SetR = DB90.DV1PCP20.RightPosition;
|
|
|
|
|
|
PlcTemp.DV1PCP01_AlarmL = DB90.DV1PCP01.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP02_AlarmL = DB90.DV1PCP02.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP03_AlarmL = DB90.DV1PCP03.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP04_AlarmL = DB90.DV1PCP04.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP05_AlarmL = DB90.DV1PCP05.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP06_AlarmL = DB90.DV1PCP06.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP07_AlarmL = DB90.DV1PCP07.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP08_AlarmL = DB90.DV1PCP08.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP09_AlarmL = DB90.DV1PCP09.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP10_AlarmL = DB90.DV1PCP10.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP11_AlarmL = DB90.DV1PCP11.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP12_AlarmL = DB90.DV1PCP12.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP13_AlarmL = DB90.DV1PCP13.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP14_AlarmL = DB90.DV1PCP14.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP15_AlarmL = DB90.DV1PCP15.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP16_AlarmL = DB90.DV1PCP16.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP17_AlarmL = DB90.DV1PCP17.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP18_AlarmL = DB90.DV1PCP18.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP19_AlarmL = DB90.DV1PCP19.AlarmLeftPosition;
|
|
PlcTemp.DV1PCP20_AlarmL = DB90.DV1PCP20.AlarmLeftPosition;
|
|
|
|
|
|
PlcTemp.DV1PCP01_AlarmR = DB90.DV1PCP01.AlarmRightPosition;
|
|
PlcTemp.DV1PCP02_AlarmR = DB90.DV1PCP02.AlarmRightPosition;
|
|
PlcTemp.DV1PCP03_AlarmR = DB90.DV1PCP03.AlarmRightPosition;
|
|
PlcTemp.DV1PCP04_AlarmR = DB90.DV1PCP04.AlarmRightPosition;
|
|
PlcTemp.DV1PCP05_AlarmR = DB90.DV1PCP05.AlarmRightPosition;
|
|
PlcTemp.DV1PCP06_AlarmR = DB90.DV1PCP06.AlarmRightPosition;
|
|
PlcTemp.DV1PCP07_AlarmR = DB90.DV1PCP07.AlarmRightPosition;
|
|
PlcTemp.DV1PCP08_AlarmR = DB90.DV1PCP08.AlarmRightPosition;
|
|
PlcTemp.DV1PCP09_AlarmR = DB90.DV1PCP09.AlarmRightPosition;
|
|
PlcTemp.DV1PCP10_AlarmR = DB90.DV1PCP10.AlarmRightPosition;
|
|
PlcTemp.DV1PCP11_AlarmR = DB90.DV1PCP11.AlarmRightPosition;
|
|
PlcTemp.DV1PCP12_AlarmR = DB90.DV1PCP12.AlarmRightPosition;
|
|
PlcTemp.DV1PCP13_AlarmR = DB90.DV1PCP13.AlarmRightPosition;
|
|
PlcTemp.DV1PCP14_AlarmR = DB90.DV1PCP14.AlarmRightPosition;
|
|
PlcTemp.DV1PCP15_AlarmR = DB90.DV1PCP15.AlarmRightPosition;
|
|
PlcTemp.DV1PCP16_AlarmR = DB90.DV1PCP16.AlarmRightPosition;
|
|
PlcTemp.DV1PCP17_AlarmR = DB90.DV1PCP17.AlarmRightPosition;
|
|
PlcTemp.DV1PCP18_AlarmR = DB90.DV1PCP18.AlarmRightPosition;
|
|
PlcTemp.DV1PCP19_AlarmR = DB90.DV1PCP19.AlarmRightPosition;
|
|
PlcTemp.DV1PCP20_AlarmR = DB90.DV1PCP20.AlarmRightPosition;
|
|
}
|
|
|
|
private void DB1SetData()
|
|
{
|
|
ControlsHelper.SetMCLabel(LabelE.PR1ASI01, (float)Math.Round(PlcTemp.PR1ASI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1BSI01, (float)Math.Round(PlcTemp.PR1BSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1CSI01, (float)Math.Round(PlcTemp.PR1CSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DSI01, (float)Math.Round(PlcTemp.PR1DSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1ESI01, (float)Math.Round(PlcTemp.PR1ESI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1FSI01, (float)Math.Round(PlcTemp.PR1FSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1GSI01, (float)Math.Round(PlcTemp.PR1GSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1HSI01, (float)Math.Round(PlcTemp.PR1HSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1ISI01, (float)Math.Round(PlcTemp.PR1ISI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1JSI01, (float)Math.Round(PlcTemp.PR1JSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1KSI01, (float)Math.Round(PlcTemp.PR1KSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1LSI01, (float)Math.Round(PlcTemp.PR1LSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1MSI01, (float)Math.Round(PlcTemp.PR1MSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1NSI01, (float)Math.Round(PlcTemp.PR1NSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1OSI01, (float)Math.Round(PlcTemp.PR1OSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1ASI01, (float)Math.Round(PlcTemp.HR1ASI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1BSI01, (float)Math.Round(PlcTemp.HR1BSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1CSI01, (float)Math.Round(PlcTemp.HR1CSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1DSI01, (float)Math.Round(PlcTemp.HR1DSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1ESI01, (float)Math.Round(PlcTemp.HR1ESI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1FSI01, (float)Math.Round(PlcTemp.HR1FSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1GSI01, (float)Math.Round(PlcTemp.HR1GSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1HSI01, (float)Math.Round(PlcTemp.HR1HSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1ISI01, (float)Math.Round(PlcTemp.HR1ISI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1JSI01, (float)Math.Round(PlcTemp.HR1JSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1KSI01, (float)Math.Round(PlcTemp.HR1KSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1LSI01, (float)Math.Round(PlcTemp.HR1LSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1MSI01, (float)Math.Round(PlcTemp.HR1MSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1NSI01, (float)Math.Round(PlcTemp.HR1NSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.HR1OSI01, (float)Math.Round(PlcTemp.HR1OSI01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.SPV1DBT01, (float)Math.Round(PlcTemp.SPV1DBT01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.SPV1DBT02, (float)Math.Round(PlcTemp.SPV1DBT02_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.SPV2DBT01, (float)Math.Round(PlcTemp.SPV2DBT01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.SPV2DBT02, (float)Math.Round(PlcTemp.SPV2DBT02_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.SPV3DBT01, (float)Math.Round(PlcTemp.SPV3DBT01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.SPV3DBT02, (float)Math.Round(PlcTemp.SPV3DBT02_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DBT01, (float)Math.Round(PlcTemp.PR1DBT01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR2DBT01, (float)Math.Round(PlcTemp.PR2DBT01_Set, 2));
|
|
ControlsHelper.SetMCLabel(LabelE.PR3DBT01, (float)Math.Round(PlcTemp.PR3DBT01_Set, 2));
|
|
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle1, PlcTemp.Bottle1_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle2, PlcTemp.Bottle2_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle3, PlcTemp.Bottle3_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle4, PlcTemp.Bottle4_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle5, PlcTemp.Bottle5_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle6, PlcTemp.Bottle6_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle7, PlcTemp.Bottle7_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle8, PlcTemp.Bottle8_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle9, PlcTemp.Bottle9_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle10, PlcTemp.Bottle10_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle11, PlcTemp.Bottle11_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle12, PlcTemp.Bottle12_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle13, PlcTemp.Bottle13_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle14, PlcTemp.Bottle14_Set);
|
|
ControlsHelper.SetHslBottle(bottleE.Bottle15, PlcTemp.Bottle15_Set);
|
|
}
|
|
|
|
private void DB90SetData()
|
|
{
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU1DBT01, PlcTemp.BU1DBT01_Set, PlcTemp.BU1DBT01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU1DBT02, PlcTemp.BU1DBT02_Set, PlcTemp.BU1DBT02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU1DBT03, PlcTemp.BU1DBT03_Set, PlcTemp.BU1DBT03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU1DBT04, PlcTemp.BU1DBT04_Set, PlcTemp.BU1DBT04_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU1DBT06, PlcTemp.BU1DBT06_Set, PlcTemp.BU1DBT06_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU1DBT07, PlcTemp.BU1DBT07_Set, PlcTemp.BU1DBT07_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU2DBT01, PlcTemp.BU2DBT01_Set, PlcTemp.BU2DBT01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU2DBT02, PlcTemp.BU2DBT02_Set, PlcTemp.BU2DBT02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU2DBT03, PlcTemp.BU2DBT03_Set, PlcTemp.BU2DBT03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU2DBT04, PlcTemp.BU2DBT04_Set, PlcTemp.BU2DBT04_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU2DBT06, PlcTemp.BU2DBT06_Set, PlcTemp.BU2DBT06_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU2DBT07, PlcTemp.BU2DBT07_Set, PlcTemp.BU2DBT07_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU3DBT01, PlcTemp.BU3DBT01_Set, PlcTemp.BU3DBT01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU3DBT02, PlcTemp.BU3DBT02_Set, PlcTemp.BU3DBT02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU3DBT03, PlcTemp.BU3DBT03_Set, PlcTemp.BU3DBT03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU3DBT04, PlcTemp.BU3DBT04_Set, PlcTemp.BU3DBT04_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU3DBT06, PlcTemp.BU3DBT06_Set, PlcTemp.BU3DBT06_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.BU3DBT07, PlcTemp.BU3DBT07_Set, PlcTemp.BU3DBT07_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT01, PlcTemp.AS1DBT01_Set, PlcTemp.AS1DBT01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT02, PlcTemp.AS1DBT02_Set, PlcTemp.AS1DBT02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT03, PlcTemp.AS1DBT03_Set, PlcTemp.AS1DBT03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT04, PlcTemp.AS1DBT04_Set, PlcTemp.AS1DBT04_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT05, PlcTemp.AS1DBT05_Set, PlcTemp.AS1DBT05_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT06, PlcTemp.AS1DBT06_Set, PlcTemp.AS1DBT06_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DBT07, PlcTemp.AS1DBT07_Set, PlcTemp.AS1DBT07_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT01, PlcTemp.AS2DBT01_Set, PlcTemp.AS2DBT01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT02, PlcTemp.AS2DBT02_Set, PlcTemp.AS2DBT02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT03, PlcTemp.AS2DBT03_Set, PlcTemp.AS2DBT03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT04, PlcTemp.AS2DBT04_Set, PlcTemp.AS2DBT04_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT05, PlcTemp.AS2DBT05_Set, PlcTemp.AS2DBT05_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT06, PlcTemp.AS2DBT06_Set, PlcTemp.AS2DBT06_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS2DBT07, PlcTemp.AS2DBT07_Set, PlcTemp.AS2DBT07_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT01, PlcTemp.AS3DBT01_Set, PlcTemp.AS3DBT01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT02, PlcTemp.AS3DBT02_Set, PlcTemp.AS3DBT02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT03, PlcTemp.AS3DBT03_Set, PlcTemp.AS3DBT03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT04, PlcTemp.AS3DBT04_Set, PlcTemp.AS3DBT04_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT05, PlcTemp.AS3DBT05_Set, PlcTemp.AS3DBT05_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT06, PlcTemp.AS3DBT06_Set, PlcTemp.AS3DBT06_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS3DBT07, PlcTemp.AS3DBT07_Set, PlcTemp.AS3DBT07_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1PCP01, PlcTemp.AS1PCP01_Set, PlcTemp.AS1PCP01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1PCP02, PlcTemp.AS1PCP02_Set, PlcTemp.AS1PCP02_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1PCP03, PlcTemp.AS1PCP03_Set, PlcTemp.AS1PCP03_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1ASI01, PlcTemp.AS1ASI01_Set, PlcTemp.AS1ASI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1BSI01, PlcTemp.AS1BSI01_Set, PlcTemp.AS1BSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1CSI01, PlcTemp.AS1CSI01_Set, PlcTemp.AS1CSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1DSI01, PlcTemp.AS1DSI01_Set, PlcTemp.AS1DSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1ESI01, PlcTemp.AS1ESI01_Set, PlcTemp.AS1ESI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1FSI01, PlcTemp.AS1FSI01_Set, PlcTemp.AS1FSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1GSI01, PlcTemp.AS1GSI01_Set, PlcTemp.AS1GSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1HSI01, PlcTemp.AS1HSI01_Set, PlcTemp.AS1HSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1ISI01, PlcTemp.AS1ISI01_Set, PlcTemp.AS1ISI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1JSI01, PlcTemp.AS1JSI01_Set, PlcTemp.AS1JSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1KSI01, PlcTemp.AS1KSI01_Set, PlcTemp.AS1KSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1LSI01, PlcTemp.AS1LSI01_Set, PlcTemp.AS1LSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1MSI01, PlcTemp.AS1MSI01_Set, PlcTemp.AS1MSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1NSI01, PlcTemp.AS1NSI01_Set, PlcTemp.AS1NSI01_Alarm);
|
|
ControlsHelper.SetLjSwith(LjSwitchE.AS1OSI01, PlcTemp.AS1OSI01_Set, PlcTemp.AS1OSI01_Alarm);
|
|
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP01, PlcTemp.DV1PCP01_AlarmR, PlcTemp.DV1PCP01_SetR, PlcTemp.DV1PCP01_AlarmL, PlcTemp.DV1PCP01_SetL, 2);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP02, PlcTemp.DV1PCP02_AlarmR, PlcTemp.DV1PCP02_SetR, PlcTemp.DV1PCP02_AlarmL, PlcTemp.DV1PCP02_SetL, 2);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP03, PlcTemp.DV1PCP03_AlarmR, PlcTemp.DV1PCP03_SetR, PlcTemp.DV1PCP03_AlarmL, PlcTemp.DV1PCP03_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP04, PlcTemp.DV1PCP04_AlarmR, PlcTemp.DV1PCP04_SetR, PlcTemp.DV1PCP04_AlarmL, PlcTemp.DV1PCP04_SetL, 3);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP05, PlcTemp.DV1PCP05_AlarmR, PlcTemp.DV1PCP05_SetR, PlcTemp.DV1PCP05_AlarmL, PlcTemp.DV1PCP05_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP06, PlcTemp.DV1PCP06_AlarmR, PlcTemp.DV1PCP06_SetR, PlcTemp.DV1PCP06_AlarmL, PlcTemp.DV1PCP06_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP07, PlcTemp.DV1PCP07_AlarmR, PlcTemp.DV1PCP07_SetR, PlcTemp.DV1PCP07_AlarmL, PlcTemp.DV1PCP07_SetL, 2);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP08, PlcTemp.DV1PCP08_AlarmR, PlcTemp.DV1PCP08_SetR, PlcTemp.DV1PCP08_AlarmL, PlcTemp.DV1PCP08_SetL, 2);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP09, PlcTemp.DV1PCP09_AlarmR, PlcTemp.DV1PCP09_SetR, PlcTemp.DV1PCP09_AlarmL, PlcTemp.DV1PCP09_SetL, 1);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP10, PlcTemp.DV1PCP10_AlarmR, PlcTemp.DV1PCP10_SetR, PlcTemp.DV1PCP10_AlarmL, PlcTemp.DV1PCP10_SetL, 1);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP11, PlcTemp.DV1PCP11_AlarmL, PlcTemp.DV1PCP11_SetL, PlcTemp.DV1PCP11_AlarmR, PlcTemp.DV1PCP11_SetR, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP12, PlcTemp.DV1PCP12_AlarmR, PlcTemp.DV1PCP12_SetR, PlcTemp.DV1PCP12_AlarmL, PlcTemp.DV1PCP12_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP13, PlcTemp.DV1PCP13_AlarmR, PlcTemp.DV1PCP13_SetR, PlcTemp.DV1PCP13_AlarmL, PlcTemp.DV1PCP13_SetL, 1);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP14, PlcTemp.DV1PCP14_AlarmR, PlcTemp.DV1PCP14_SetR, PlcTemp.DV1PCP14_AlarmL, PlcTemp.DV1PCP14_SetL, 1);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP15, PlcTemp.DV1PCP15_AlarmR, PlcTemp.DV1PCP15_SetR, PlcTemp.DV1PCP15_AlarmL, PlcTemp.DV1PCP15_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP16, PlcTemp.DV1PCP16_AlarmR, PlcTemp.DV1PCP16_SetR, PlcTemp.DV1PCP16_AlarmL, PlcTemp.DV1PCP16_SetL, 2);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP17, PlcTemp.DV1PCP17_AlarmR, PlcTemp.DV1PCP17_SetR, PlcTemp.DV1PCP17_AlarmL, PlcTemp.DV1PCP17_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP18, PlcTemp.DV1PCP18_AlarmR, PlcTemp.DV1PCP18_SetR, PlcTemp.DV1PCP18_AlarmL, PlcTemp.DV1PCP18_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP19, PlcTemp.DV1PCP19_AlarmR, PlcTemp.DV1PCP19_SetR, PlcTemp.DV1PCP19_AlarmL, PlcTemp.DV1PCP19_SetL, 0);
|
|
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP20, PlcTemp.DV1PCP20_AlarmR, PlcTemp.DV1PCP20_SetR, PlcTemp.DV1PCP20_AlarmL, PlcTemp.DV1PCP20_SetL, 0);
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 报警管理
|
|
|
|
private void AlarmControl()
|
|
{
|
|
b1 = DB1.bytes;
|
|
b90 = DB90.bytes;
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
//报警点位遍历
|
|
foreach (DataRow rows in AllAlarmTable.Rows)
|
|
{
|
|
if ((int)rows["Alarm_Block"] == 1 && b1[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
|
|
{
|
|
sb.Append(rows["Alarm_Other_Info"].ToString());
|
|
sb.Append(" ");
|
|
sb.Append(rows["Alarm_Cn_Info"].ToString());
|
|
sb.Append(@" \ ");
|
|
}
|
|
else if ((int)rows["Alarm_Block"] == 90 && b90[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
|
|
{
|
|
sb.Append(rows["Alarm_Other_Info"].ToString());
|
|
sb.Append(" ");
|
|
sb.Append(rows["Alarm_Cn_Info"].ToString());
|
|
sb.Append(@" \ ");
|
|
}
|
|
}
|
|
|
|
string str = sb.ToString();
|
|
str = str.Replace("\r\n", string.Empty);
|
|
if (str != AlarmString)
|
|
{
|
|
AlarmString = str;
|
|
AlarmMoveText.Text = str;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 测试程序
|
|
|
|
/// <summary>
|
|
/// 测试程序
|
|
/// </summary>
|
|
private void wangsr()
|
|
{
|
|
Random rd = new Random();
|
|
|
|
bool[] bottleFlag = new bool[15];
|
|
|
|
for (int i = 0; i < bottleFlag.Length; i++)
|
|
{
|
|
bottleFlag[i] = Convert.ToBoolean(rd.Next(0, 2));
|
|
}
|
|
|
|
Type bottleType = bottleE.GetType();
|
|
PropertyInfo[] properties = bottleType.GetProperties();
|
|
|
|
ThreadStart threadStart = new ThreadStart(() =>
|
|
{
|
|
double n = 100 / 15;
|
|
|
|
int i = 0;
|
|
|
|
foreach (PropertyInfo sourceProperty in properties)
|
|
{
|
|
string name = sourceProperty.Name;
|
|
PropertyInfo property = bottleType.GetProperty(name);
|
|
HslBottle bottle = (HslBottle)property.GetValue(bottleE);
|
|
//bottle.Value = n * i++;
|
|
bottle.Value = rd.Next(100);
|
|
property.SetValue(bottleE, bottle);
|
|
}
|
|
|
|
int num;
|
|
var obj = Application.OpenForms["LjDeliver"];
|
|
while (obj != null)
|
|
{
|
|
num = 0;
|
|
|
|
foreach (PropertyInfo sourceProperty in properties)
|
|
{
|
|
string name = sourceProperty.Name;
|
|
PropertyInfo property = bottleType.GetProperty(name);
|
|
HslBottle bottle = (HslBottle)property.GetValue(bottleE);
|
|
|
|
if (bottle.Value <= 0.2)
|
|
{
|
|
bottleFlag[num] = true;
|
|
}
|
|
if (bottle.Value >= 99.8)
|
|
{
|
|
bottleFlag[num] = false;
|
|
}
|
|
|
|
if (bottleFlag[num])
|
|
{
|
|
bottle.Value += 0.2;
|
|
}
|
|
else
|
|
{
|
|
bottle.Value -= 0.2;
|
|
}
|
|
|
|
property.SetValue(bottleE, bottle);
|
|
|
|
num++;
|
|
}
|
|
Thread.Sleep(1);
|
|
|
|
obj = Application.OpenForms["LjDeliver"];
|
|
}
|
|
});
|
|
Thread thread = new Thread(threadStart);
|
|
thread.Start();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
}
|