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.
993 lines
55 KiB
C#
993 lines
55 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.Action.ChemicalWeighing.Util;
|
|
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();
|
|
DB91Helper DB91 = new DB91Helper();
|
|
DB137Helper DB137 = new DB137Helper();
|
|
DB120Helper DB120 = new DB120Helper();
|
|
DB141Helper DB141 = new DB141Helper();
|
|
DB191Helper DB191 = new DB191Helper();
|
|
|
|
byte[] b1;
|
|
byte[] b90; //db1/90/91的byte数组
|
|
byte[] b91;
|
|
byte[] b141;
|
|
|
|
/// <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();
|
|
ControlCabinetEntity CabinetE = new ControlCabinetEntity();
|
|
FanEntity FanE = new FanEntity();
|
|
SpecialLabelBlueEntity TubeE = new SpecialLabelBlueEntity();
|
|
|
|
/// <summary>
|
|
/// 报警滚动条
|
|
/// </summary>
|
|
HslMoveText AlarmMoveText;
|
|
|
|
/// <summary>
|
|
/// 曲线图
|
|
/// </summary>
|
|
MultiCurve PressureCurve;
|
|
|
|
#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;
|
|
PressureCurve = Controls.FirstOrDefault(x => x.Name == "PressureCurve") as MultiCurve;
|
|
|
|
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 方法
|
|
|
|
/// <summary>
|
|
/// 连接所有控件
|
|
/// </summary>
|
|
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);
|
|
ControlsHelper.ControlImport<ControlCabinet>(CabinetE, Controls);
|
|
ControlsHelper.ControlImport<Fan>(FanE, Controls);
|
|
ControlsHelper.ControlImport<SpecialLabelBlue>(TubeE, 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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Plc数据刷新
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void GetPlcValue(object sender, EventArgs e)
|
|
{
|
|
if (GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count == 0)
|
|
{
|
|
timer.Stop();
|
|
timer.Dispose();
|
|
}
|
|
|
|
DB1 = new DB1Helper();
|
|
DB90 = new DB90Helper();
|
|
DB91 = new DB91Helper();
|
|
DB137 = new DB137Helper();
|
|
DB191 = new DB191Helper();
|
|
DB120 = new DB120Helper();
|
|
DB141 = new DB141Helper();
|
|
|
|
DB1GetData();
|
|
DB90GetData();
|
|
DB91GetData();
|
|
DBOtherGetData();
|
|
|
|
DB1SetData();
|
|
DB90SetData();
|
|
DB91SetData();
|
|
DBOtherSetData();
|
|
|
|
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.PR1DBT02_Set = DB1.PR1DBT02.ACT_VALUE;
|
|
PlcTemp.PR1DBT03_Set = DB1.PR1DBT03.ACT_VALUE;
|
|
PlcTemp.PR1DBT04_Set = DB1.PR1DBT04.ACT_VALUE;
|
|
PlcTemp.PR2DBT01_Set = DB1.PR2DBT01.ACT_VALUE;
|
|
PlcTemp.PR2DBT02_Set = DB1.PR2DBT02.ACT_VALUE;
|
|
PlcTemp.PR2DBT03_Set = DB1.PR2DBT03.ACT_VALUE;
|
|
PlcTemp.PR2DBT04_Set = DB1.PR2DBT04.ACT_VALUE;
|
|
PlcTemp.PR3DBT01_Set = DB1.PR3DBT01.ACT_VALUE;
|
|
PlcTemp.PR3DBT02_Set = DB1.PR3DBT02.ACT_VALUE;
|
|
PlcTemp.PR3DBT03_Set = DB1.PR3DBT03.ACT_VALUE;
|
|
PlcTemp.PR3DBT04_Set = DB1.PR3DBT04.ACT_VALUE;
|
|
|
|
PlcTemp.PR1PCP01_Set = DB1.PR1PCP01.ACT_VALUE;
|
|
PlcTemp.PR1PCP02_Set = DB1.PR1PCP02.ACT_VALUE;
|
|
PlcTemp.PR1PCP03_Set = DB1.PR1PCP03.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 DB91GetData()
|
|
{
|
|
PlcTemp.DM1DSM01_Set = DB91.DM1DSM01.Running;
|
|
PlcTemp.DM2DSM01_Set = DB91.DM2DSM01.Running;
|
|
PlcTemp.DM3DSM01_Set = DB91.DM3DSM01.Running;
|
|
PlcTemp.DM1DSM01_Alarm = DB91.DM1DSM01.Alarm;
|
|
PlcTemp.DM2DSM01_Alarm = DB91.DM2DSM01.Alarm;
|
|
PlcTemp.DM3DSM01_Alarm = DB91.DM3DSM01.Alarm;
|
|
|
|
PlcTemp.DM1GDP01_Set = DB91.DM1GDP01.Running;
|
|
PlcTemp.DM1ASIG01_Set = DB91.DM1ASIG01.Running;
|
|
PlcTemp.DM1BSIG01_Set = DB91.DM1BSIG01.Running;
|
|
PlcTemp.DM1CSIG01_Set = DB91.DM1CSIG01.Running;
|
|
PlcTemp.DM1DSIG01_Set = DB91.DM1DSIG01.Running;
|
|
PlcTemp.DM1ESIG01_Set = DB91.DM1ESIG01.Running;
|
|
|
|
PlcTemp.DM1GDP01_Alarm = DB91.DM1GDP01.Alarm;
|
|
PlcTemp.DM1ASIG01_Alarm = DB91.DM1ASIG01.Alarm;
|
|
PlcTemp.DM1BSIG01_Alarm = DB91.DM1BSIG01.Alarm;
|
|
PlcTemp.DM1CSIG01_Alarm = DB91.DM1CSIG01.Alarm;
|
|
PlcTemp.DM1DSIG01_Alarm = DB91.DM1DSIG01.Alarm;
|
|
PlcTemp.DM1ESIG01_Alarm = DB91.DM1ESIG01.Alarm;
|
|
|
|
}
|
|
|
|
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];
|
|
|
|
|
|
PlcTemp.Bottle1_Set = DB120.SiloA;
|
|
PlcTemp.Bottle2_Set = DB120.SiloB;
|
|
PlcTemp.Bottle3_Set = DB120.SiloC;
|
|
PlcTemp.Bottle4_Set = DB120.SiloD;
|
|
PlcTemp.Bottle5_Set = DB120.SiloE;
|
|
PlcTemp.Bottle6_Set = DB120.SiloF;
|
|
PlcTemp.Bottle7_Set = DB120.SiloG;
|
|
PlcTemp.Bottle8_Set = DB120.SiloH;
|
|
PlcTemp.Bottle9_Set = DB120.SiloI;
|
|
PlcTemp.Bottle10_Set = DB120.SiloJ;
|
|
PlcTemp.Bottle11_Set = DB120.SiloK;
|
|
PlcTemp.Bottle12_Set = DB120.SiloL;
|
|
PlcTemp.Bottle13_Set = DB120.SiloM;
|
|
PlcTemp.Bottle14_Set = DB120.SiloN;
|
|
PlcTemp.Bottle15_Set = DB120.SiloO;
|
|
|
|
PlcTemp.Cabinet1 = MReadHelp.ReadCabinet()[0];
|
|
PlcTemp.Cabinet2 = MReadHelp.ReadCabinet()[1];
|
|
PlcTemp.Cabinet3 = MReadHelp.ReadCabinet()[2];
|
|
PlcTemp.Cabinet4 = MReadHelp.ReadCabinet()[3];
|
|
PlcTemp.Cabinet5 = MReadHelp.ReadCabinet()[4];
|
|
PlcTemp.Cabinet6 = MReadHelp.ReadCabinet()[5];
|
|
PlcTemp.Cabinet7 = MReadHelp.ReadCabinet()[6];
|
|
PlcTemp.Cabinet8 = MReadHelp.ReadCabinet()[7];
|
|
PlcTemp.Cabinet9 = MReadHelp.ReadCabinet()[8];
|
|
PlcTemp.Cabinet10 = MReadHelp.ReadCabinet()[9];
|
|
PlcTemp.Cabinet11 = MReadHelp.ReadCabinet()[10];
|
|
PlcTemp.Cabinet12 = MReadHelp.ReadCabinet()[11];
|
|
PlcTemp.Cabinet13 = MReadHelp.ReadCabinet()[12];
|
|
PlcTemp.Cabinet14 = MReadHelp.ReadCabinet()[13];
|
|
PlcTemp.Cabinet15 = MReadHelp.ReadCabinet()[14];
|
|
|
|
PlcTemp.Steps1 = new bool[7]
|
|
{
|
|
DB191.ConveyStep_A.Step1t1,
|
|
DB191.ConveyStep_A.Step2t1,
|
|
DB191.ConveyStep_A.Step3t1,
|
|
DB191.ConveyStep_A.Step4t1,
|
|
DB191.ConveyStep_A.Step5t1,
|
|
DB191.ConveyStep_A.Step6t1,
|
|
DB191.ConveyStep_A.Step7t1,
|
|
};
|
|
PlcTemp.Steps2 = new bool[7]
|
|
{
|
|
DB191.ConveyStep_A.Step1t2,
|
|
DB191.ConveyStep_A.Step2t2,
|
|
DB191.ConveyStep_A.Step3t2,
|
|
DB191.ConveyStep_A.Step4t2,
|
|
DB191.ConveyStep_A.Step5t2,
|
|
DB191.ConveyStep_A.Step6t2,
|
|
DB191.ConveyStep_A.Step7t2,
|
|
};
|
|
PlcTemp.Steps3 = new bool[7]
|
|
{
|
|
DB191.ConveyStep_B.Step1t1,
|
|
DB191.ConveyStep_B.Step2t1,
|
|
DB191.ConveyStep_B.Step3t1,
|
|
DB191.ConveyStep_B.Step4t1,
|
|
DB191.ConveyStep_B.Step5t1,
|
|
DB191.ConveyStep_B.Step6t1,
|
|
DB191.ConveyStep_B.Step7t1,
|
|
};
|
|
PlcTemp.Steps4 = new bool[7]
|
|
{
|
|
DB191.ConveyStep_B.Step1t2,
|
|
DB191.ConveyStep_B.Step2t2,
|
|
DB191.ConveyStep_B.Step3t2,
|
|
DB191.ConveyStep_B.Step4t2,
|
|
DB191.ConveyStep_B.Step5t2,
|
|
DB191.ConveyStep_B.Step6t2,
|
|
DB191.ConveyStep_B.Step7t2,
|
|
};
|
|
PlcTemp.Steps5 = new bool[7]
|
|
{
|
|
DB191.ConveyStep_C.Step1t1,
|
|
DB191.ConveyStep_C.Step2t1,
|
|
DB191.ConveyStep_C.Step3t1,
|
|
DB191.ConveyStep_C.Step4t1,
|
|
DB191.ConveyStep_C.Step5t1,
|
|
DB191.ConveyStep_C.Step6t1,
|
|
DB191.ConveyStep_C.Step7t1,
|
|
};
|
|
PlcTemp.Steps6 = new bool[7]
|
|
{
|
|
DB191.ConveyStep_C.Step1t2,
|
|
DB191.ConveyStep_C.Step2t2,
|
|
DB191.ConveyStep_C.Step3t2,
|
|
DB191.ConveyStep_C.Step4t2,
|
|
DB191.ConveyStep_C.Step5t2,
|
|
DB191.ConveyStep_C.Step6t2,
|
|
DB191.ConveyStep_C.Step7t2,
|
|
};
|
|
|
|
PlcTemp.Status = DB191.GetVesselMode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private void DB1SetData()
|
|
{
|
|
ControlsHelper.SetMCLabel(LabelE.PR1ASI01, (float)Math.Round(PlcTemp.PR1ASI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1BSI01, (float)Math.Round(PlcTemp.PR1BSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1CSI01, (float)Math.Round(PlcTemp.PR1CSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DSI01, (float)Math.Round(PlcTemp.PR1DSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1ESI01, (float)Math.Round(PlcTemp.PR1ESI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1FSI01, (float)Math.Round(PlcTemp.PR1FSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1GSI01, (float)Math.Round(PlcTemp.PR1GSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1HSI01, (float)Math.Round(PlcTemp.PR1HSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1ISI01, (float)Math.Round(PlcTemp.PR1ISI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1JSI01, (float)Math.Round(PlcTemp.PR1JSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1KSI01, (float)Math.Round(PlcTemp.PR1KSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1LSI01, (float)Math.Round(PlcTemp.PR1LSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1MSI01, (float)Math.Round(PlcTemp.PR1MSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1NSI01, (float)Math.Round(PlcTemp.PR1NSI01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1OSI01, (float)Math.Round(PlcTemp.PR1OSI01_Set, 2) + " MPa");
|
|
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) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.SPV1DBT02, (float)Math.Round(PlcTemp.SPV1DBT02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.SPV2DBT01, (float)Math.Round(PlcTemp.SPV2DBT01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.SPV2DBT02, (float)Math.Round(PlcTemp.SPV2DBT02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.SPV3DBT01, (float)Math.Round(PlcTemp.SPV3DBT01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.SPV3DBT02, (float)Math.Round(PlcTemp.SPV3DBT02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DBT01, (float)Math.Round(PlcTemp.PR1DBT01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DBT02, (float)Math.Round(PlcTemp.PR1DBT02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DBT03, (float)Math.Round(PlcTemp.PR1DBT03_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1DBT04, (float)Math.Round(PlcTemp.PR1DBT04_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR2DBT01, (float)Math.Round(PlcTemp.PR2DBT01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR2DBT02, (float)Math.Round(PlcTemp.PR2DBT02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR2DBT03, (float)Math.Round(PlcTemp.PR2DBT03_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR2DBT04, (float)Math.Round(PlcTemp.PR2DBT04_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR3DBT01, (float)Math.Round(PlcTemp.PR3DBT01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR3DBT02, (float)Math.Round(PlcTemp.PR3DBT02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR3DBT03, (float)Math.Round(PlcTemp.PR3DBT03_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR3DBT04, (float)Math.Round(PlcTemp.PR3DBT04_Set, 2) + " MPa");
|
|
|
|
ControlsHelper.SetMCLabel(LabelE.PR1PCP01, (float)Math.Round(PlcTemp.PR1PCP01_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1PCP02, (float)Math.Round(PlcTemp.PR1PCP02_Set, 2) + " MPa");
|
|
ControlsHelper.SetMCLabel(LabelE.PR1PCP03, (float)Math.Round(PlcTemp.PR1PCP03_Set, 2) + " MPa");
|
|
|
|
PressureCurve.PointValue1 = ControlsHelper.SetPressureCurve(PlcTemp.PR1DBT02_Set);
|
|
PressureCurve.PointValue2 = ControlsHelper.SetPressureCurve(PlcTemp.PR1DBT03_Set);
|
|
PressureCurve.PointValue3 = ControlsHelper.SetPressureCurve(PlcTemp.PR1DBT04_Set);
|
|
PressureCurve.PointValue4 = ControlsHelper.SetPressureCurve(PlcTemp.PR2DBT02_Set);
|
|
PressureCurve.PointValue5 = ControlsHelper.SetPressureCurve(PlcTemp.PR2DBT03_Set);
|
|
PressureCurve.PointValue6 = ControlsHelper.SetPressureCurve(PlcTemp.PR2DBT04_Set);
|
|
PressureCurve.PointValue7 = ControlsHelper.SetPressureCurve(PlcTemp.PR3DBT02_Set);
|
|
PressureCurve.PointValue8 = ControlsHelper.SetPressureCurve(PlcTemp.PR3DBT03_Set);
|
|
PressureCurve.PointValue9 = ControlsHelper.SetPressureCurve(PlcTemp.PR3DBT04_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, 6);
|
|
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, 6);
|
|
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, 5);
|
|
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, 5);
|
|
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);
|
|
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeA1, PlcTemp.DV1PCP02_SetR, PlcTemp.DV1PCP09_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeA2, PlcTemp.DV1PCP02_SetR, PlcTemp.DV1PCP09_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeA3, PlcTemp.DV1PCP02_SetR, PlcTemp.DV1PCP09_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeB, PlcTemp.DV1PCP01_SetR, PlcTemp.DV1PCP10_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeC1, PlcTemp.DV1PCP08_SetR, PlcTemp.DV1PCP13_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeC2, PlcTemp.DV1PCP08_SetR, PlcTemp.DV1PCP13_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeC3, PlcTemp.DV1PCP08_SetR, PlcTemp.DV1PCP13_SetR);
|
|
ControlsHelper.SetTubeColor(TubeE.CrossTubeD, PlcTemp.DV1PCP07_SetR, PlcTemp.DV1PCP14_SetR);
|
|
}
|
|
|
|
private void DB91SetData()
|
|
{
|
|
ControlsHelper.SetFan(FanE.DM1DSM01, PlcTemp.DM1DSM01_Set, PlcTemp.DM1DSM01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM2DSM01, PlcTemp.DM2DSM01_Set, PlcTemp.DM2DSM01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM3DSM01, PlcTemp.DM3DSM01_Set, PlcTemp.DM3DSM01_Alarm);
|
|
|
|
ControlsHelper.SetFan(FanE.DM1ASIG01, PlcTemp.DM1ASIG01_Set, PlcTemp.DM1ASIG01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM1BSIG01, PlcTemp.DM1BSIG01_Set, PlcTemp.DM1BSIG01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM1CSIG01, PlcTemp.DM1CSIG01_Set, PlcTemp.DM1CSIG01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM1DSIG01, PlcTemp.DM1DSIG01_Set, PlcTemp.DM1DSIG01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM1ESIG01, PlcTemp.DM1ESIG01_Set, PlcTemp.DM1ESIG01_Alarm);
|
|
ControlsHelper.SetFan(FanE.DM1GDP01, PlcTemp.DM1GDP01_Set, PlcTemp.DM1GDP01_Alarm);
|
|
|
|
}
|
|
|
|
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);
|
|
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
ControlsImprot.SetControlCabinet(CabinetE.Cabinet1, PlcTemp.Cabinet1);
|
|
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStatus1, PlcTemp.Status[0], 3);
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStatus2, PlcTemp.Status[1], 3);
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStatus3, PlcTemp.Status[2], 3);
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStatus4, PlcTemp.Status[3], 3);
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStatus5, PlcTemp.Status[4], 3);
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStatus6, PlcTemp.Status[5], 3);
|
|
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepCode1, ControlsHelper.JudgePFTStatus(PlcTemp.Steps1));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepCode2, ControlsHelper.JudgePFTStatus(PlcTemp.Steps2));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepCode3, ControlsHelper.JudgePFTStatus(PlcTemp.Steps3));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepCode4, ControlsHelper.JudgePFTStatus(PlcTemp.Steps4));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepCode5, ControlsHelper.JudgePFTStatus(PlcTemp.Steps5));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepCode6, ControlsHelper.JudgePFTStatus(PlcTemp.Steps6));
|
|
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepName1, ControlsHelper.ConvertStepName(ControlsHelper.JudgePFTStatus(PlcTemp.Steps1)));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepName2, ControlsHelper.ConvertStepName(ControlsHelper.JudgePFTStatus(PlcTemp.Steps2)));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepName3, ControlsHelper.ConvertStepName(ControlsHelper.JudgePFTStatus(PlcTemp.Steps3)));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepName4, ControlsHelper.ConvertStepName(ControlsHelper.JudgePFTStatus(PlcTemp.Steps4)));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepName5, ControlsHelper.ConvertStepName(ControlsHelper.JudgePFTStatus(PlcTemp.Steps5)));
|
|
ControlsImprot.SetMCLabel(LabelE.PFTStepName6, ControlsHelper.ConvertStepName(ControlsHelper.JudgePFTStatus(PlcTemp.Steps6)));
|
|
|
|
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);
|
|
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue1, Math.Round(PlcTemp.Bottle1_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue2, Math.Round(PlcTemp.Bottle2_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue3, Math.Round(PlcTemp.Bottle3_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue4, Math.Round(PlcTemp.Bottle4_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue5, Math.Round(PlcTemp.Bottle5_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue6, Math.Round(PlcTemp.Bottle6_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue7, Math.Round(PlcTemp.Bottle7_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue8, Math.Round(PlcTemp.Bottle8_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue9, Math.Round(PlcTemp.Bottle9_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue10, Math.Round(PlcTemp.Bottle10_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue11, Math.Round(PlcTemp.Bottle11_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue12, Math.Round(PlcTemp.Bottle12_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue13, Math.Round(PlcTemp.Bottle13_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue14, Math.Round(PlcTemp.Bottle14_Set, 1) + " %");
|
|
ControlsImprot.SetMCLabel(LabelE.HslBottleValue15, Math.Round(PlcTemp.Bottle15_Set, 1) + " %");
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 报警管理
|
|
|
|
private void AlarmControl()
|
|
{
|
|
b1 = DB1.bytes;
|
|
b90 = DB90.bytes;
|
|
b91 = DB91.bytes;
|
|
b141 = DB141.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"] == 91 && b91[(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"] == 141 && b141[(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();
|
|
if (string.IsNullOrWhiteSpace(str))
|
|
{
|
|
ControlsHelper.SetSwitchLight(SwitchlightE.AlarmIndicate, true, false);
|
|
}
|
|
else
|
|
{
|
|
ControlsHelper.SetSwitchLight(SwitchlightE.AlarmIndicate, false, true);
|
|
}
|
|
SwitchlightE.AlarmIndicate.BackColor = Color.Transparent;
|
|
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
|
|
}
|
|
}
|