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();
DB2103Helper DB2103 = new DB2103Helper();
byte[] b1;
byte[] b90; //db1\90\2103的byte数组
byte[] b2103;
///
/// 所有Alarm点位
///
DataTable AllAlarmTable = new DataTable();
private string AlarmString = "报警信息 ";
#region 控件属性
List Controls;
HslBottleEntity bottleE = new HslBottleEntity();
SwitchLightEntity SwitchlightE = new SwitchLightEntity();
//JzfEntity JzfE = new JzfEntity();
ThreeWayValveEntity ThreeWayValveE = new ThreeWayValveEntity();
LjSwitchEntity LjSwitchE = new LjSwitchEntity();
RSCREWBIGEntity RSCREWBIGE = new RSCREWBIGEntity();
MCLabelEntity LabelE = new MCLabelEntity();
///
/// 报警滚动条
///
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(bottleE, Controls);
ControlsHelper.ControlImport(SwitchlightE, Controls);
//ControlsHelper.ControlImport(JzfE, Controls);
ControlsHelper.ControlImport(ThreeWayValveE, Controls);
ControlsHelper.ControlImport(LjSwitchE, Controls);
ControlsHelper.ControlImport(RSCREWBIGE, Controls);
ControlsHelper.ControlImport(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();
DB2103 = new DB2103Helper();
DB1GetData();
DB90GetData();
DB2103GetData();
DB1SetData();
DB90SetData();
DB2103SetData();
AlarmControl();
}
#region plc读取前端控件值写入
private void DB2103GetData()
{
PlcTemp.DM1ASF01_Set = DB2103.DM1ASF01.Run;
PlcTemp.DM1BSF01_Set = DB2103.DM1BSF01.Run;
PlcTemp.DM1CSF01_Set = DB2103.DM1CSF01.Run;
PlcTemp.DM1DSF01_Set = DB2103.DM1DSF01.Run;
PlcTemp.DM1ESF01_Set = DB2103.DM1ESF01.Run;
PlcTemp.DM1FSF01_Set = DB2103.DM1FSF01.Run;
PlcTemp.DM1GSF01_Set = DB2103.DM1GSF01.Run;
PlcTemp.DM1HSF01_Set = DB2103.DM1HSF01.Run;
PlcTemp.DM1ISF01_Set = DB2103.DM1ISF01.Run;
PlcTemp.DM1JSF01_Set = DB2103.DM1JSF01.Run;
PlcTemp.DM1KSF01_Set = DB2103.DM1KSF01.Run;
PlcTemp.DM1LSF01_Set = DB2103.DM1LSF01.Run;
PlcTemp.DM1MSF01_Set = DB2103.DM1MSF01.Run;
PlcTemp.DM1NSF01_Set = DB2103.DM1NSF01.Run;
PlcTemp.DM1OSF01_Set = DB2103.DM1OSF01.Running;
}
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.HR1ASI02_Set = DB1.HR1ASI02.ACT_VALUE;
//PlcTemp.HR1BSI02_Set = DB1.HR1BSI02.ACT_VALUE;
//PlcTemp.HR1CSI02_Set = DB1.HR1CSI02.ACT_VALUE;
//PlcTemp.HR1DSI02_Set = DB1.HR1DSI02.ACT_VALUE;
//PlcTemp.HR1ESI02_Set = DB1.HR1ESI02.ACT_VALUE;
//PlcTemp.HR1FSI02_Set = DB1.HR1FSI02.ACT_VALUE;
//PlcTemp.HR1GSI02_Set = DB1.HR1GSI02.ACT_VALUE;
//PlcTemp.HR1HSI02_Set = DB1.HR1HSI02.ACT_VALUE;
//PlcTemp.HR1ISI02_Set = DB1.HR1ISI02.ACT_VALUE;
//PlcTemp.HR1JSI02_Set = DB1.HR1JSI02.ACT_VALUE;
//PlcTemp.HR1KSI02_Set = DB1.HR1KSI02.ACT_VALUE;
//PlcTemp.HR1LSI02_Set = DB1.HR1LSI02.ACT_VALUE;
//PlcTemp.HR1MSI02_Set = DB1.HR1MSI02.ACT_VALUE;
//PlcTemp.HR1NSI02_Set = DB1.HR1NSI02.ACT_VALUE;
//PlcTemp.HR1OSI02_Set = DB1.HR1OSI02.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.SetLeft;
PlcTemp.DV1PCP02_SetL = DB90.DV1PCP02.SetLeft;
PlcTemp.DV1PCP03_SetL = DB90.DV1PCP03.SetLeft;
PlcTemp.DV1PCP04_SetL = DB90.DV1PCP04.SetLeft;
PlcTemp.DV1PCP05_SetL = DB90.DV1PCP05.SetLeft;
PlcTemp.DV1PCP06_SetL = DB90.DV1PCP06.SetLeft;
PlcTemp.DV1PCP07_SetL = DB90.DV1PCP07.SetLeft;
PlcTemp.DV1PCP08_SetL = DB90.DV1PCP08.SetLeft;
PlcTemp.DV1PCP09_SetL = DB90.DV1PCP09.SetLeft;
PlcTemp.DV1PCP10_SetL = DB90.DV1PCP10.SetLeft;
PlcTemp.DV1PCP11_SetL = DB90.DV1PCP11.SetLeft;
PlcTemp.DV1PCP12_SetL = DB90.DV1PCP12.SetLeft;
PlcTemp.DV1PCP13_SetL = DB90.DV1PCP13.SetLeft;
PlcTemp.DV1PCP14_SetL = DB90.DV1PCP14.SetLeft;
PlcTemp.DV1PCP15_SetL = DB90.DV1PCP15.SetLeft;
PlcTemp.DV1PCP16_SetL = DB90.DV1PCP16.SetLeft;
PlcTemp.DV1PCP17_SetL = DB90.DV1PCP17.SetLeft;
PlcTemp.DV1PCP18_SetL = DB90.DV1PCP18.SetLeft;
PlcTemp.DV1PCP19_SetL = DB90.DV1PCP19.SetLeft;
PlcTemp.DV1PCP20_SetL = DB90.DV1PCP20.SetLeft;
PlcTemp.DV1PCP01_SetR = DB90.DV1PCP01.SetRight;
PlcTemp.DV1PCP02_SetR = DB90.DV1PCP02.SetRight;
PlcTemp.DV1PCP03_SetR = DB90.DV1PCP03.SetRight;
PlcTemp.DV1PCP04_SetR = DB90.DV1PCP04.SetRight;
PlcTemp.DV1PCP05_SetR = DB90.DV1PCP05.SetRight;
PlcTemp.DV1PCP06_SetR = DB90.DV1PCP06.SetRight;
PlcTemp.DV1PCP07_SetR = DB90.DV1PCP07.SetRight;
PlcTemp.DV1PCP08_SetR = DB90.DV1PCP08.SetRight;
PlcTemp.DV1PCP09_SetR = DB90.DV1PCP09.SetRight;
PlcTemp.DV1PCP10_SetR = DB90.DV1PCP10.SetRight;
PlcTemp.DV1PCP11_SetR = DB90.DV1PCP11.SetRight;
PlcTemp.DV1PCP12_SetR = DB90.DV1PCP12.SetRight;
PlcTemp.DV1PCP13_SetR = DB90.DV1PCP13.SetRight;
PlcTemp.DV1PCP14_SetR = DB90.DV1PCP14.SetRight;
PlcTemp.DV1PCP15_SetR = DB90.DV1PCP15.SetRight;
PlcTemp.DV1PCP16_SetR = DB90.DV1PCP16.SetRight;
PlcTemp.DV1PCP17_SetR = DB90.DV1PCP17.SetRight;
PlcTemp.DV1PCP18_SetR = DB90.DV1PCP18.SetRight;
PlcTemp.DV1PCP19_SetR = DB90.DV1PCP19.SetRight;
PlcTemp.DV1PCP20_SetR = DB90.DV1PCP20.SetRight;
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 DB2103SetData()
{
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1ASF01, PlcTemp.DM1ASF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1BSF01, PlcTemp.DM1BSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1CSF01, PlcTemp.DM1CSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1DSF01, PlcTemp.DM1DSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1ESF01, PlcTemp.DM1ESF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1FSF01, PlcTemp.DM1FSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1GSF01, PlcTemp.DM1GSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1HSF01, PlcTemp.DM1HSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1ISF01, PlcTemp.DM1ISF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1JSF01, PlcTemp.DM1JSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1KSF01, PlcTemp.DM1KSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1LSF01, PlcTemp.DM1LSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1MSF01, PlcTemp.DM1MSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1NSF01, PlcTemp.DM1NSF01_Set);
ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1OSF01, PlcTemp.DM1OSF01_Set);
}
private void DB1SetData()
{
ControlsHelper.SetMCLabel(LabelE.PR1ASI01, PlcTemp.PR1ASI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1BSI01, PlcTemp.PR1BSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1CSI01, PlcTemp.PR1CSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1DSI01, PlcTemp.PR1DSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1ESI01, PlcTemp.PR1ESI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1FSI01, PlcTemp.PR1FSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1GSI01, PlcTemp.PR1GSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1HSI01, PlcTemp.PR1HSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1ISI01, PlcTemp.PR1ISI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1JSI01, PlcTemp.PR1JSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1KSI01, PlcTemp.PR1KSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1LSI01, PlcTemp.PR1LSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1MSI01, PlcTemp.PR1MSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1NSI01, PlcTemp.PR1NSI01_Set);
ControlsHelper.SetMCLabel(LabelE.PR1OSI01, PlcTemp.PR1OSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1ASI01, PlcTemp.HR1ASI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1BSI01, PlcTemp.HR1BSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1CSI01, PlcTemp.HR1CSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1DSI01, PlcTemp.HR1DSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1ESI01, PlcTemp.HR1ESI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1FSI01, PlcTemp.HR1FSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1GSI01, PlcTemp.HR1GSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1HSI01, PlcTemp.HR1HSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1ISI01, PlcTemp.HR1ISI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1JSI01, PlcTemp.HR1JSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1KSI01, PlcTemp.HR1KSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1LSI01, PlcTemp.HR1LSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1MSI01, PlcTemp.HR1MSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1NSI01, PlcTemp.HR1NSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1OSI01, PlcTemp.HR1OSI01_Set);
ControlsHelper.SetMCLabel(LabelE.HR1ASI02, PlcTemp.HR1ASI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1BSI02, PlcTemp.HR1BSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1CSI02, PlcTemp.HR1CSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1DSI02, PlcTemp.HR1DSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1ESI02, PlcTemp.HR1ESI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1FSI02, PlcTemp.HR1FSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1GSI02, PlcTemp.HR1GSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1HSI02, PlcTemp.HR1HSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1ISI02, PlcTemp.HR1ISI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1JSI02, PlcTemp.HR1JSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1KSI02, PlcTemp.HR1KSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1LSI02, PlcTemp.HR1LSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1MSI02, PlcTemp.HR1MSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1NSI02, PlcTemp.HR1NSI02_Set);
ControlsHelper.SetMCLabel(LabelE.HR1OSI02, PlcTemp.HR1OSI02_Set);
ControlsHelper.SetMCLabel(LabelE.SPV1DBT01, PlcTemp.SPV1DBT01_Set);
ControlsHelper.SetMCLabel(LabelE.SPV1DBT02, PlcTemp.SPV1DBT02_Set);
ControlsHelper.SetMCLabel(LabelE.SPV2DBT01, PlcTemp.SPV2DBT01_Set);
ControlsHelper.SetMCLabel(LabelE.SPV2DBT02, PlcTemp.SPV2DBT02_Set);
ControlsHelper.SetMCLabel(LabelE.SPV3DBT01, PlcTemp.SPV3DBT01_Set);
ControlsHelper.SetMCLabel(LabelE.SPV3DBT02, PlcTemp.SPV3DBT02_Set);
ControlsHelper.SetMCLabel(LabelE.PR1DBT01, PlcTemp.PR1DBT01_Set);
ControlsHelper.SetMCLabel(LabelE.PR2DBT01, PlcTemp.PR2DBT01_Set);
ControlsHelper.SetMCLabel(LabelE.PR3DBT01, PlcTemp.PR3DBT01_Set);
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);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP02, PlcTemp.DV1PCP02_AlarmR, PlcTemp.DV1PCP02_SetR, PlcTemp.DV1PCP02_AlarmL, PlcTemp.DV1PCP02_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP03, PlcTemp.DV1PCP03_AlarmR, PlcTemp.DV1PCP03_SetR, PlcTemp.DV1PCP03_AlarmL, PlcTemp.DV1PCP03_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP04, PlcTemp.DV1PCP04_AlarmR, PlcTemp.DV1PCP04_SetR, PlcTemp.DV1PCP04_AlarmL, PlcTemp.DV1PCP04_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP05, PlcTemp.DV1PCP05_AlarmR, PlcTemp.DV1PCP05_SetR, PlcTemp.DV1PCP05_AlarmL, PlcTemp.DV1PCP05_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP06, PlcTemp.DV1PCP06_AlarmR, PlcTemp.DV1PCP06_SetR, PlcTemp.DV1PCP06_AlarmL, PlcTemp.DV1PCP06_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP07, PlcTemp.DV1PCP07_AlarmR, PlcTemp.DV1PCP07_SetR, PlcTemp.DV1PCP07_AlarmL, PlcTemp.DV1PCP07_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP08, PlcTemp.DV1PCP08_AlarmR, PlcTemp.DV1PCP08_SetR, PlcTemp.DV1PCP08_AlarmL, PlcTemp.DV1PCP08_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP09, PlcTemp.DV1PCP09_AlarmR, PlcTemp.DV1PCP09_SetR, PlcTemp.DV1PCP09_AlarmL, PlcTemp.DV1PCP09_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP10, PlcTemp.DV1PCP10_AlarmR, PlcTemp.DV1PCP10_SetR, PlcTemp.DV1PCP10_AlarmL, PlcTemp.DV1PCP10_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP11, PlcTemp.DV1PCP11_AlarmR, PlcTemp.DV1PCP11_SetR, PlcTemp.DV1PCP11_AlarmL, PlcTemp.DV1PCP11_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP12, PlcTemp.DV1PCP12_AlarmR, PlcTemp.DV1PCP12_SetR, PlcTemp.DV1PCP12_AlarmL, PlcTemp.DV1PCP12_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP13, PlcTemp.DV1PCP13_AlarmR, PlcTemp.DV1PCP13_SetR, PlcTemp.DV1PCP13_AlarmL, PlcTemp.DV1PCP13_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP14, PlcTemp.DV1PCP14_AlarmR, PlcTemp.DV1PCP14_SetR, PlcTemp.DV1PCP14_AlarmL, PlcTemp.DV1PCP14_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP15, PlcTemp.DV1PCP15_AlarmR, PlcTemp.DV1PCP15_SetR, PlcTemp.DV1PCP15_AlarmL, PlcTemp.DV1PCP15_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP16, PlcTemp.DV1PCP16_AlarmR, PlcTemp.DV1PCP16_SetR, PlcTemp.DV1PCP16_AlarmL, PlcTemp.DV1PCP16_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP17, PlcTemp.DV1PCP17_AlarmR, PlcTemp.DV1PCP17_SetR, PlcTemp.DV1PCP17_AlarmL, PlcTemp.DV1PCP17_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP18, PlcTemp.DV1PCP18_AlarmR, PlcTemp.DV1PCP18_SetR, PlcTemp.DV1PCP18_AlarmL, PlcTemp.DV1PCP18_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP19, PlcTemp.DV1PCP19_AlarmR, PlcTemp.DV1PCP19_SetR, PlcTemp.DV1PCP19_AlarmL, PlcTemp.DV1PCP19_SetL);
ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP20, PlcTemp.DV1PCP20_AlarmR, PlcTemp.DV1PCP20_SetR, PlcTemp.DV1PCP20_AlarmL, PlcTemp.DV1PCP20_SetL);
}
#endregion
#region 报警管理
private void AlarmControl()
{
b1 = DB1.bytes;
b90 = DB90.bytes;
b2103 = DB2103.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(@" \ ");
}
else if ((int)rows["Alarm_Block"] == 2103 && b2103[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true
&& (int)rows["Alarm_Word"] >= 81 && (int)rows["Alarm_Word"] <= 165)
{
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 测试程序
///
/// 测试程序
///
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
}
}