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.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs

2334 lines
89 KiB
C#

using DataBlockHelper;
using DataBlockHelper.DBHelpers;
using DevExpress.XtraEditors.Filtering.Templates;
using Mesnac.Action.Base;
using Mesnac.Controls.Base;
using Mesnac.Controls.ChemicalWeighing;
using Mesnac.Controls.Default;
using Mesnac.Controls.Feeding;
using Mesnac.Core.Service;
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using IAction = Mesnac.Action.Base.IAction;
using Timer = System.Windows.Forms.Timer;
namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
{
public class MainDetailControlAction : ChemicalWeighingAction, IAction
{
List<Control> Controls;
DB2102Helper DB2102;
DB2103Helper DB2103;
DB2107Helper DB2107;
ConcurrentDictionary<string, object> conCurrentCache = new ConcurrentDictionary<string, object>();
Timer timer;
#region 控件声明
StateButton WatchDog;
SystemStateShow EMStop;
SwitchLight Vessel_1_HighLevel;
SwitchLight Vessel_2_HighLevel;
SwitchLight Vessel_3_HighLevel;
SwitchLight Vessel_4_HighLevel;
SwitchLight Vessel_5_HighLevel;
SwitchLight Vessel_1_LowLevel;
SwitchLight Vessel_2_LowLevel;
SwitchLight Vessel_3_LowLevel;
SwitchLight Vessel_4_LowLevel;
SwitchLight Vessel_5_LowLevel;
SwitchLight highLevel_D1;
SwitchLight highLevel_D2;
SwitchLight highLevel_D3;
SwitchLight highLevel_D4;
SwitchLight highLevel_D5;
SwitchLight highLevel_D6;
SwitchLight highLevel_D7;
SwitchLight highLevel_D8;
SwitchLight highLevel_D9;
SwitchLight highLevel_D10;
SwitchLight highLevel_D11;
SwitchLight highLevel_D12;
SwitchLight lowLevel_D1;
SwitchLight lowLevel_D2;
SwitchLight lowLevel_D3;
SwitchLight lowLevel_D4;
SwitchLight lowLevel_D5;
SwitchLight lowLevel_D6;
SwitchLight lowLevel_D7;
SwitchLight lowLevel_D8;
SwitchLight lowLevel_D9;
SwitchLight lowLevel_D10;
SwitchLight lowLevel_D11;
SwitchLight lowLevel_D12;
SwitchLight Hopper_1_HighLevel;
SwitchLight Hopper_2_HighLevel;
SwitchLight Hopper_3_HighLevel;
SwitchLight Hopper_4_HighLevel;
SwitchLight Hopper_1_LowLevel;
SwitchLight Hopper_2_LowLevel;
SwitchLight Hopper_3_LowLevel;
SwitchLight Hopper_4_LowLevel;
SwitchLight WScale_1_HighLevel;
SwitchLight WScale_2_HighLevel;
SwitchLight WScale_3_HighLevel;
SwitchLight WScale_4_HighLevel;
SwitchLight WScale_1_LowLevel;
SwitchLight WScale_2_LowLevel;
SwitchLight WScale_3_LowLevel;
SwitchLight WScale_4_LowLevel;
MCLabel topPressure_V1;
MCLabel topPressure_V2;
MCLabel topPressure_V3;
MCLabel topPressure_V4;
MCLabel topPressure_V5;
MCLabel Vessel_1_ActWeight;
MCLabel Vessel_2_ActWeight;
MCLabel Vessel_3_ActWeight;
MCLabel Vessel_4_ActWeight;
MCLabel Vessel_5_ActWeight;
MCLabel conveyV1_PV;
MCLabel conveyV2_PV;
MCLabel conveyV3_PV;
MCLabel conveyV5_PV;
MCLabel mainPress_V1_ActualValue;
MCLabel mainPress_V2_ActualValue;
MCLabel mainPress_V3_ActualValue;
MCLabel mainPress_V5_ActualValue;
MCLabel purgeV1_PV;
MCLabel purgeV2_PV;
MCLabel purgeV3_PV;
MCLabel purgeV5_PV;
MCLabel WScale_1_ActWeight;
MCLabel WScale_2_ActWeight;
MCLabel WScale_3_ActWeight;
MCLabel WScale_4_ActWeight;
MCLabel DM1DRY1_ACT_Speed;
MCLabel DM1DRY2_ACT_Speed;
MCLabel DM1DRY3_ACT_Speed;
MCLabel DM1DRY4_ACT_Speed;
MCLabel Hopper_1_ActWeight;
MCLabel Hopper_2_ActWeight;
MCLabel Hopper_3_ActWeight;
MCLabel Hopper_4_ActWeight;
MCLabel DM1GEM;
MCLabel DM2GEM;
MCLabel DM3GEM;
MCLabel DM4GEM;
MCLabel DM5GEM;
MCLabel DM6GEM;
MCLabel DM7GEM;
MCLabel DM8GEM;
MCLabel DM2ASF01;
MCLabel DM2BSF01;
MCLabel DM2CSF01;
MCLabel DM2DSF01;
RSCREWBIG DM1ASF01;
RSCREWBIG DM1BSF01;
LSCREWBIG DM1CSF01;
LSCREWBIG DM1DSF01;
RSCREWBIG DM1ESF01;
LSCREWBIG DM1FSF01;
RSCREWBIG DM1GSF01;
RSCREWBIG DM1HSF01;
LSCREWBIG DM1ISF01;
LSCREWBIG DM1JSF01;
RSCREWBIG DM1KSF01;
RSCREWBIG DM1LSF01;
LSCREWBIG DM1MSF01;
LSCREWBIG DM1NSF01;
RSCREWBIG DM1OSF01;
LSCREWBIG DM2ASF01L;
LSCREWBIG DM2BSF01L;
LSCREWBIG DM2CSF01L;
LSCREWBIG DM2DSF01L;
RSCREWBIG DM2ASF01R;
RSCREWBIG DM2BSF01R;
RSCREWBIG DM2CSF01R;
RSCREWBIG DM2DSF01R;
Jzf AS1BLT01;
Jzf AS1BLT02;
Jzf AS1BLT03;
Jzf AS1BLT04;
Jzf AS1BLT05;
Jzf AS2BLT01;
Jzf AS2BLT02;
Jzf AS2BLT03;
Jzf AS2BLT04;
Jzf AS2BLT05;
Jzf AS3BLT01;
Jzf AS3BLT02;
Jzf AS3BLT03;
Jzf AS3BLT04;
Jzf AS3BLT05;
Jzf AS4BLT01;
Jzf AS4BLT03;
Jzf AS5BLT01;
Jzf AS5BLT02;
Jzf AS5BLT03;
Jzf AS5BLT04;
Jzf AS5BLT05;
Jzf AS2PCP01;
Jzf AS2PCP02;
Jzf AS2PCP03;
Jzf AS1OIS01;
Jzf AS1OIS02;
Jzf AS1OIS03;
Jzf AS2OIS01;
Jzf AS2OIS02;
Jzf AS2OIS03;
Jzf AS3OIS01;
Jzf AS3OIS02;
Jzf AS3OIS03;
Jzf AS4OIS01;
Jzf AS4OIS02;
Jzf AS4OIS03;
Jzf AS1GET01;
Jzf AS1GET02;
Jzf AS2GET01;
Jzf AS2GET02;
Jzf AS3GET01;
Jzf AS3GET02;
Jzf AS4GET01;
Jzf AS4GET02;
Jzf AS5GET01;
Jzf AS5GET02;
Jzf AS6GET01;
Jzf AS6GET02;
Jzf AS7GET01;
Jzf AS7GET02;
Jzf AS8GET01;
Jzf AS8GET02;
Fan DM1ADF01;
Fan DM1BDF01;
Fan DM1CDF01;
Fan DM1DDF01;
Fan DM1EDF01;
Fan DM1FDF01;
Fan DM1GDF01;
Fan DM1HDF01;
Fan DM1IDF01;
Fan DM1JDF01;
Fan DM1KDF01;
Fan DM1LDF01;
Fan DM1ADB01;
Fan DM1BDB01;
Fan DM1CDB01;
Fan DM1DDB01;
Fan DM1EDB01;
Fan DM1FDB01;
Fan DM1GDB01;
Fan DM1HDB01;
Fan DM1IDB01;
Fan DM1JDB01;
Fan DM1KDB01;
Fan DM1LDB01;
Fan DM1DRY1_Running;
Fan DM1DRY2_Running;
Fan DM1DRY3_Running;
Fan DM1DRY4_Running;
Fan PM3ADF01;
ControlCabinet PM1ADF01;
ControlCabinet PM1BDF01;
ControlCabinet PM1CDF01;
ControlCabinet PM1DDF01;
ControlCabinet PM1EDF01;
ControlCabinet PM1FDF01;
ControlCabinet PM1GDF01;
ControlCabinet PM1HDF01;
ControlCabinet PM1IDF01;
ControlCabinet PM1JDF01;
ControlCabinet PM1KDF01;
ControlCabinet PM1LDF01;
LjSwith BU1ASF01;
LjSwith BU1BSF01;
LjSwith BU1CSF01;
LjSwith BU1DSF01;
LjSwith BU1ESF01;
LjSwith BU1FSF01;
LjSwith BU1GSF01;
LjSwith BU1HSF01;
LjSwith BU1ISF01;
LjSwith BU1JSF01;
LjSwith BU1KSF01;
LjSwith BU1LSF01;
LjSwith BU1MSF01;
LjSwith BU1NSF01;
LjSwith BU1OSF01;
LjSwith BU1BLT01;
LjSwith BU1BLT02;
LjSwith BU1BLT03;
LjSwith BU1BLT04;
LjSwith BU1BLT05;
LjSwith BU1BLT06;
LjSwith BU1BLT07;
LjSwith BU2BLT01;
LjSwith BU2BLT02;
LjSwith BU2BLT03;
LjSwith BU2BLT04;
LjSwith BU2BLT05;
LjSwith BU3BLT01;
LjSwith BU3BLT02;
LjSwith BU3BLT03;
LjSwith BU3BLT04;
LjSwith BU3BLT05;
LjSwith BU3BLT06;
LjSwith BU3BLT07;
LjSwith BU4BLT01;
LjSwith BU4BLT02;
LjSwith BU4BLT03;
LjSwith BU4BLT04;
LjSwith BU4BLT05;
LjSwith BU4BLT06;
LjSwith BU4BLT07;
LjSwith BU5BLT01;
LjSwith BU5BLT02;
LjSwith BU5BLT03;
LjSwith BU5BLT04;
LjSwith BU1ADB01;
LjSwith BU1BDB01;
LjSwith BU1CDB01;
LjSwith BU1DDB01;
LjSwith BU1EDB01;
LjSwith BU1FDB01;
LjSwith BU1GDB01;
LjSwith BU1HDB01;
LjSwith BU1IDB01;
LjSwith BU1JDB01;
LjSwith BU1KDB01;
LjSwith BU1LDB01;
LjSwith BU1GEB02;
LjSwith BU2GEB02;
LjSwith BU3GEB02;
LjSwith BU4GEB02;
LjSwith BU5GEB02;
LjSwith BU6GEB02;
LjSwith BU7GEB02;
LjSwith BU8GEB02;
LjSwith BU1DRB01;
LjSwith BU2DRB01;
LjSwith BU3DRB01;
LjSwith BU4DRB01;
LjSwith BU1GEB01;
LjSwith BU2GEB01;
LjSwith BU3GEB01;
LjSwith BU4GEB01;
LjSwith BU5GEB01;
LjSwith BU6GEB01;
LjSwith BU7GEB01;
LjSwith BU8GEB01;
LjSwith BU2ASF01;
LjSwith BU2ASF02;
LjSwith BU2BSF01;
LjSwith BU2BSF02;
LjSwith BU2CSF01;
LjSwith BU2CSF02;
LjSwith BU2DSF01;
LjSwith BU2DSF02;
LjSwith BUWeter1;
LjSwith BUWeter2;
LjSwith BUWeter3;
LjSwith BUWeter4;
LjSwith BUWeter5;
LjSwith BUWeter6;
LjSwith BUWeter7;
LjSwith BUWeter8;
ThreeWayValve DV2PCP01;
ThreeWayValve DV2PCP02;
ThreeWayValve DV2PCP03;
ThreeWayValve DV2PCP04;
ThreeWayValve DV2PCP05;
ThreeWayValve DV2PCP06;
ThreeWayValve DV2PCP07;
ThreeWayValve DV2PCP08;
ThreeWayValve DV2PCP09;
ThreeWayValve DV2PCP10;
ThreeWayValve DV2PCP11;
ThreeWayValve DV2PCP12;
ThreeWayValve DV2PCP13;
#endregion
#region Plc读数变量
bool WatchDog_Set;
bool EMStop_Set;
bool Vessel_1_HighLevel_Set;
bool Vessel_2_HighLevel_Set;
bool Vessel_3_HighLevel_Set;
bool Vessel_4_HighLevel_Set;
bool Vessel_5_HighLevel_Set;
bool Vessel_1_LowLevel_Set;
bool Vessel_2_LowLevel_Set;
bool Vessel_3_LowLevel_Set;
bool Vessel_4_LowLevel_Set;
bool Vessel_5_LowLevel_Set;
bool highLevel_D1_Set;
bool highLevel_D2_Set;
bool highLevel_D3_Set;
bool highLevel_D4_Set;
bool highLevel_D5_Set;
bool highLevel_D6_Set;
bool highLevel_D7_Set;
bool highLevel_D8_Set;
bool highLevel_D9_Set;
bool highLevel_D10_Set;
bool highLevel_D11_Set;
bool highLevel_D12_Set;
bool lowLevel_D1_Set;
bool lowLevel_D2_Set;
bool lowLevel_D3_Set;
bool lowLevel_D4_Set;
bool lowLevel_D5_Set;
bool lowLevel_D6_Set;
bool lowLevel_D7_Set;
bool lowLevel_D8_Set;
bool lowLevel_D9_Set;
bool lowLevel_D10_Set;
bool lowLevel_D11_Set;
bool lowLevel_D12_Set;
bool Hopper_1_HighLevel_Set;
bool Hopper_2_HighLevel_Set;
bool Hopper_3_HighLevel_Set;
bool Hopper_4_HighLevel_Set;
bool Hopper_1_LowLevel_Set;
bool Hopper_2_LowLevel_Set;
bool Hopper_3_LowLevel_Set;
bool Hopper_4_LowLevel_Set;
bool WScale_1_HighLevel_Set;
bool WScale_2_HighLevel_Set;
bool WScale_3_HighLevel_Set;
bool WScale_4_HighLevel_Set;
bool WScale_1_LowLevel_Set;
bool WScale_2_LowLevel_Set;
bool WScale_3_LowLevel_Set;
bool WScale_4_LowLevel_Set;
float topPressure_V1_Set;
float topPressure_V2_Set;
float topPressure_V3_Set;
float topPressure_V4_Set;
float topPressure_V5_Set;
float Vessel_1_ActWeight_Set;
float Vessel_2_ActWeight_Set;
float Vessel_3_ActWeight_Set;
float Vessel_4_ActWeight_Set;
float Vessel_5_ActWeight_Set;
float conveyV1_PV_Set;
float conveyV2_PV_Set;
float conveyV3_PV_Set;
float conveyV5_PV_Set;
float mainPress_V1_ActualValue_Set;
float mainPress_V2_ActualValue_Set;
float mainPress_V3_ActualValue_Set;
float mainPress_V5_ActualValue_Set;
float purgeV1_PV_Set;
float purgeV2_PV_Set;
float purgeV3_PV_Set;
float purgeV5_PV_Set;
float WScale_1_ActWeight_Set;
float WScale_2_ActWeight_Set;
float WScale_3_ActWeight_Set;
float WScale_4_ActWeight_Set;
float DM1DRY1_ACT_Speed_Set;
float DM1DRY2_ACT_Speed_Set;
float DM1DRY3_ACT_Speed_Set;
float DM1DRY4_ACT_Speed_Set;
float Hopper_1_ActWeight_Set;
float Hopper_2_ActWeight_Set;
float Hopper_3_ActWeight_Set;
float Hopper_4_ActWeight_Set;
float DM1GEM_Set;
float DM2GEM_Set;
float DM3GEM_Set;
float DM4GEM_Set;
float DM5GEM_Set;
float DM6GEM_Set;
float DM7GEM_Set;
float DM8GEM_Set;
float DM2ASF01_Set;
float DM2BSF01_Set;
float DM2CSF01_Set;
float DM2DSF01_Set;
bool DM1ASF01_Set;
bool DM1BSF01_Set;
bool DM1CSF01_Set;
bool DM1DSF01_Set;
bool DM1ESF01_Set;
bool DM1FSF01_Set;
bool DM1GSF01_Set;
bool DM1HSF01_Set;
bool DM1ISF01_Set;
bool DM1JSF01_Set;
bool DM1KSF01_Set;
bool DM1LSF01_Set;
bool DM1MSF01_Set;
bool DM1NSF01_Set;
bool DM1OSF01_Set;
bool DM2ASF01L_Set;
bool DM2BSF01L_Set;
bool DM2CSF01L_Set;
bool DM2DSF01L_Set;
bool DM2ASF01R_Set;
bool DM2BSF01R_Set;
bool DM2CSF01R_Set;
bool DM2DSF01R_Set;
bool AS1BLT01_Set;
bool AS1BLT02_Set;
bool AS1BLT03_Set;
bool AS1BLT04_Set;
bool AS1BLT05_Set;
bool AS2BLT01_Set;
bool AS2BLT02_Set;
bool AS2BLT03_Set;
bool AS2BLT04_Set;
bool AS2BLT05_Set;
bool AS3BLT01_Set;
bool AS3BLT02_Set;
bool AS3BLT03_Set;
bool AS3BLT04_Set;
bool AS3BLT05_Set;
bool AS4BLT01_Set;
bool AS4BLT03_Set;
bool AS5BLT01_Set;
bool AS5BLT02_Set;
bool AS5BLT03_Set;
bool AS5BLT04_Set;
bool AS5BLT05_Set;
bool AS2PCP01_Set;
bool AS2PCP02_Set;
bool AS2PCP03_Set;
bool AS1OIS01_Set;
bool AS1OIS02_Set;
bool AS1OIS03_Set;
bool AS2OIS01_Set;
bool AS2OIS02_Set;
bool AS2OIS03_Set;
bool AS3OIS01_Set;
bool AS3OIS02_Set;
bool AS3OIS03_Set;
bool AS4OIS01_Set;
bool AS4OIS02_Set;
bool AS4OIS03_Set;
bool AS1GET01_Set;
bool AS1GET02_Set;
bool AS2GET01_Set;
bool AS2GET02_Set;
bool AS3GET01_Set;
bool AS3GET02_Set;
bool AS4GET01_Set;
bool AS4GET02_Set;
bool AS5GET01_Set;
bool AS5GET02_Set;
bool AS6GET01_Set;
bool AS6GET02_Set;
bool AS7GET01_Set;
bool AS7GET02_Set;
bool AS8GET01_Set;
bool AS8GET02_Set;
bool DM1ADF01_Set;
bool DM1BDF01_Set;
bool DM1CDF01_Set;
bool DM1DDF01_Set;
bool DM1EDF01_Set;
bool DM1FDF01_Set;
bool DM1GDF01_Set;
bool DM1HDF01_Set;
bool DM1IDF01_Set;
bool DM1JDF01_Set;
bool DM1KDF01_Set;
bool DM1LDF01_Set;
bool DM1ADB01_Set;
bool DM1BDB01_Set;
bool DM1CDB01_Set;
bool DM1DDB01_Set;
bool DM1EDB01_Set;
bool DM1FDB01_Set;
bool DM1GDB01_Set;
bool DM1HDB01_Set;
bool DM1IDB01_Set;
bool DM1JDB01_Set;
bool DM1KDB01_Set;
bool DM1LDB01_Set;
bool DM1DRY1_Running_Set;
bool DM1DRY2_Running_Set;
bool DM1DRY3_Running_Set;
bool DM1DRY4_Running_Set;
bool PM3ADF01_Set;
bool PM1ADF01_Set;
bool PM1BDF01_Set;
bool PM1CDF01_Set;
bool PM1DDF01_Set;
bool PM1EDF01_Set;
bool PM1FDF01_Set;
bool PM1GDF01_Set;
bool PM1HDF01_Set;
bool PM1IDF01_Set;
bool PM1JDF01_Set;
bool PM1KDF01_Set;
bool PM1LDF01_Set;
bool BU1ASF01_Set;
bool BU1BSF01_Set;
bool BU1CSF01_Set;
bool BU1DSF01_Set;
bool BU1ESF01_Set;
bool BU1FSF01_Set;
bool BU1GSF01_Set;
bool BU1HSF01_Set;
bool BU1ISF01_Set;
bool BU1JSF01_Set;
bool BU1KSF01_Set;
bool BU1LSF01_Set;
bool BU1MSF01_Set;
bool BU1NSF01_Set;
bool BU1OSF01_Set;
bool BU1BLT01_Set;
bool BU1BLT02_Set;
bool BU1BLT03_Set;
bool BU1BLT04_Set;
bool BU1BLT05_Set;
bool BU1BLT06_Set;
bool BU1BLT07_Set;
bool BU2BLT01_Set;
bool BU2BLT02_Set;
bool BU2BLT03_Set;
bool BU2BLT04_Set;
bool BU2BLT05_Set;
bool BU3BLT01_Set;
bool BU3BLT02_Set;
bool BU3BLT03_Set;
bool BU3BLT04_Set;
bool BU3BLT05_Set;
bool BU3BLT06_Set;
bool BU3BLT07_Set;
bool BU4BLT01_Set;
bool BU4BLT02_Set;
bool BU4BLT03_Set;
bool BU4BLT04_Set;
bool BU4BLT05_Set;
bool BU4BLT06_Set;
bool BU4BLT07_Set;
bool BU5BLT01_Set;
bool BU5BLT02_Set;
bool BU5BLT03_Set;
bool BU5BLT04_Set;
bool BU1ADB01_Set;
bool BU1BDB01_Set;
bool BU1CDB01_Set;
bool BU1DDB01_Set;
bool BU1EDB01_Set;
bool BU1FDB01_Set;
bool BU1GDB01_Set;
bool BU1HDB01_Set;
bool BU1IDB01_Set;
bool BU1JDB01_Set;
bool BU1KDB01_Set;
bool BU1LDB01_Set;
bool BU1GEB02_Set;
bool BU2GEB02_Set;
bool BU3GEB02_Set;
bool BU4GEB02_Set;
bool BU5GEB02_Set;
bool BU6GEB02_Set;
bool BU7GEB02_Set;
bool BU8GEB02_Set;
bool BU1DRB01_Set;
bool BU2DRB01_Set;
bool BU3DRB01_Set;
bool BU4DRB01_Set;
bool BU1GEB01_Set;
bool BU2GEB01_Set;
bool BU3GEB01_Set;
bool BU4GEB01_Set;
bool BU5GEB01_Set;
bool BU6GEB01_Set;
bool BU7GEB01_Set;
bool BU8GEB01_Set;
bool BU2ASF01_Set;
bool BU2ASF02_Set;
bool BU2BSF01_Set;
bool BU2BSF02_Set;
bool BU2CSF01_Set;
bool BU2CSF02_Set;
bool BU2DSF01_Set;
bool BU2DSF02_Set;
bool BUWeter1_Set;
bool BUWeter2_Set;
bool BUWeter3_Set;
bool BUWeter4_Set;
bool BUWeter5_Set;
bool BUWeter6_Set;
bool BUWeter7_Set;
bool BUWeter8_Set;
bool BU1ASF01_Alarm;
bool BU1BSF01_Alarm;
bool BU1CSF01_Alarm;
bool BU1DSF01_Alarm;
bool BU1ESF01_Alarm;
bool BU1FSF01_Alarm;
bool BU1GSF01_Alarm;
bool BU1HSF01_Alarm;
bool BU1ISF01_Alarm;
bool BU1JSF01_Alarm;
bool BU1KSF01_Alarm;
bool BU1LSF01_Alarm;
bool BU1MSF01_Alarm;
bool BU1NSF01_Alarm;
bool BU1OSF01_Alarm;
bool BU1BLT01_Alarm;
bool BU1BLT02_Alarm;
bool BU1BLT03_Alarm;
bool BU1BLT04_Alarm;
bool BU1BLT05_Alarm;
bool BU1BLT06_Alarm;
bool BU1BLT07_Alarm;
bool BU2BLT01_Alarm;
bool BU2BLT02_Alarm;
bool BU2BLT03_Alarm;
bool BU2BLT04_Alarm;
bool BU2BLT05_Alarm;
bool BU3BLT01_Alarm;
bool BU3BLT02_Alarm;
bool BU3BLT03_Alarm;
bool BU3BLT04_Alarm;
bool BU3BLT05_Alarm;
bool BU3BLT06_Alarm;
bool BU3BLT07_Alarm;
bool BU4BLT01_Alarm;
bool BU4BLT02_Alarm;
bool BU4BLT03_Alarm;
bool BU4BLT04_Alarm;
bool BU4BLT05_Alarm;
bool BU4BLT06_Alarm;
bool BU4BLT07_Alarm;
bool BU5BLT01_Alarm;
bool BU5BLT02_Alarm;
bool BU5BLT03_Alarm;
bool BU5BLT04_Alarm;
bool BU1ADB01_Alarm;
bool BU1BDB01_Alarm;
bool BU1CDB01_Alarm;
bool BU1DDB01_Alarm;
bool BU1EDB01_Alarm;
bool BU1FDB01_Alarm;
bool BU1GDB01_Alarm;
bool BU1HDB01_Alarm;
bool BU1IDB01_Alarm;
bool BU1JDB01_Alarm;
bool BU1KDB01_Alarm;
bool BU1LDB01_Alarm;
bool BU1GEB02_Alarm;
bool BU2GEB02_Alarm;
bool BU3GEB02_Alarm;
bool BU4GEB02_Alarm;
bool BU5GEB02_Alarm;
bool BU6GEB02_Alarm;
bool BU7GEB02_Alarm;
bool BU8GEB02_Alarm;
bool BU1DRB01_Alarm;
bool BU2DRB01_Alarm;
bool BU3DRB01_Alarm;
bool BU4DRB01_Alarm;
bool BU1GEB01_Alarm;
bool BU2GEB01_Alarm;
bool BU3GEB01_Alarm;
bool BU4GEB01_Alarm;
bool BU5GEB01_Alarm;
bool BU6GEB01_Alarm;
bool BU7GEB01_Alarm;
bool BU8GEB01_Alarm;
bool BU2ASF01_Alarm;
bool BU2ASF02_Alarm;
bool BU2BSF01_Alarm;
bool BU2BSF02_Alarm;
bool BU2CSF01_Alarm;
bool BU2CSF02_Alarm;
bool BU2DSF01_Alarm;
bool BU2DSF02_Alarm;
bool BUWeter1_Alarm;
bool BUWeter2_Alarm;
bool BUWeter3_Alarm;
bool BUWeter4_Alarm;
bool BUWeter5_Alarm;
bool BUWeter6_Alarm;
bool BUWeter7_Alarm;
bool BUWeter8_Alarm;
bool DV2PCP01_SetL;
bool DV2PCP02_SetL;
bool DV2PCP03_SetL;
bool DV2PCP04_SetL;
bool DV2PCP05_SetL;
bool DV2PCP06_SetL;
bool DV2PCP07_SetL;
bool DV2PCP08_SetL;
bool DV2PCP09_SetL;
bool DV2PCP10_SetL;
bool DV2PCP11_SetL;
bool DV2PCP12_SetL;
bool DV2PCP13_SetL;
bool DV2PCP01_SetR;
bool DV2PCP02_SetR;
bool DV2PCP03_SetR;
bool DV2PCP04_SetR;
bool DV2PCP05_SetR;
bool DV2PCP06_SetR;
bool DV2PCP07_SetR;
bool DV2PCP08_SetR;
bool DV2PCP09_SetR;
bool DV2PCP10_SetR;
bool DV2PCP11_SetR;
bool DV2PCP12_SetR;
bool DV2PCP13_SetR;
bool DV2PCP01_AlarmL;
bool DV2PCP02_AlarmL;
bool DV2PCP03_AlarmL;
bool DV2PCP04_AlarmL;
bool DV2PCP05_AlarmL;
bool DV2PCP06_AlarmL;
bool DV2PCP07_AlarmL;
bool DV2PCP08_AlarmL;
bool DV2PCP09_AlarmL;
bool DV2PCP10_AlarmL;
bool DV2PCP11_AlarmL;
bool DV2PCP12_AlarmL;
bool DV2PCP13_AlarmL;
bool DV2PCP01_AlarmR;
bool DV2PCP02_AlarmR;
bool DV2PCP03_AlarmR;
bool DV2PCP04_AlarmR;
bool DV2PCP05_AlarmR;
bool DV2PCP06_AlarmR;
bool DV2PCP07_AlarmR;
bool DV2PCP08_AlarmR;
bool DV2PCP09_AlarmR;
bool DV2PCP10_AlarmR;
bool DV2PCP11_AlarmR;
bool DV2PCP12_AlarmR;
bool DV2PCP13_AlarmR;
#endregion
public void Run(RuntimeParameter runtime)
{
DB2102 = new DB2102Helper();
DB2103 = new DB2103Helper();
DB2107 = new DB2107Helper();
base.RunIni(runtime); //必须要调用
Controls = GetAllControls();
SetControl();
timer = new Timer();
timer.Interval = 1000;
timer.Enabled = true;
timer.Tick += new EventHandler(GetPlcValue);//添加事件
}
private void NewThreadDb2102()
{
BU1ASF01_Set = DB2102.BU1ASF01.Set;
BU1BSF01_Set = DB2102.BU1BSF01.Set;
BU1CSF01_Set = DB2102.BU1CSF01.Set;
BU1DSF01_Set = DB2102.BU1DSF01.Set;
BU1ESF01_Set = DB2102.BU1ESF01.Set;
BU1FSF01_Set = DB2102.BU1FSF01.Set;
BU1GSF01_Set = DB2102.BU1GSF01.Set;
BU1HSF01_Set = DB2102.BU1HSF01.Set;
BU1ISF01_Set = DB2102.BU1ISF01.Set;
BU1JSF01_Set = DB2102.BU1JSF01.Set;
BU1KSF01_Set = DB2102.BU1KSF01.Set;
BU1LSF01_Set = DB2102.BU1LSF01.Set;
BU1MSF01_Set = DB2102.BU1MSF01.Set;
BU1NSF01_Set = DB2102.BU1NSF01.Set;
BU1OSF01_Set = DB2102.BU1OSF01.Set;
BU1BLT01_Set = DB2102.BU1BLT01.Set;
BU1BLT02_Set = DB2102.BU1BLT02.Set;
BU1BLT03_Set = DB2102.BU1BLT03.Set;
BU1BLT04_Set = DB2102.BU1BLT04.Set;
BU1BLT05_Set = DB2102.BU1BLT05.Set;
BU1BLT06_Set = DB2102.BU1BLT06.Set;
BU1BLT07_Set = DB2102.BU1BLT07.Set;
BU2BLT01_Set = DB2102.BU2BLT01.Set;
BU2BLT02_Set = DB2102.BU2BLT02.Set;
BU2BLT03_Set = DB2102.BU2BLT03.Set;
BU2BLT04_Set = DB2102.BU2BLT04.Set;
BU2BLT05_Set = DB2102.BU2BLT05.Set;
BU3BLT01_Set = DB2102.BU3BLT01.Set;
BU3BLT02_Set = DB2102.BU3BLT02.Set;
BU3BLT03_Set = DB2102.BU3BLT03.Set;
BU3BLT04_Set = DB2102.BU3BLT04.Set;
BU3BLT05_Set = DB2102.BU3BLT05.Set;
BU3BLT06_Set = DB2102.BU3BLT06.Set;
BU3BLT07_Set = DB2102.BU3BLT07.Set;
BU4BLT01_Set = DB2102.BU4BLT01.Set;
BU4BLT02_Set = DB2102.BU4BLT02.Set;
BU4BLT03_Set = DB2102.BU4BLT03.Set;
BU4BLT04_Set = DB2102.BU4BLT04.Set;
BU4BLT05_Set = DB2102.BU4BLT05.Set;
BU4BLT06_Set = DB2102.BU4BLT06.Set;
BU4BLT07_Set = DB2102.BU4BLT07.Set;
BU5BLT01_Set = DB2102.BU5BLT01.Set;
BU5BLT02_Set = DB2102.BU5BLT02.Set;
BU5BLT03_Set = DB2102.BU5BLT03.Set;
BU5BLT04_Set = DB2102.BU5BLT04.Set;
BU1ADB01_Set = DB2102.BU1ADB01.Set;
BU1BDB01_Set = DB2102.BU1BDB01.Set;
BU1CDB01_Set = DB2102.BU1CDB01.Set;
BU1DDB01_Set = DB2102.BU1DDB01.Set;
BU1EDB01_Set = DB2102.BU1EDB01.Set;
BU1FDB01_Set = DB2102.BU1FDB01.Set;
BU1GDB01_Set = DB2102.BU1GDB01.Set;
BU1HDB01_Set = DB2102.BU1HDB01.Set;
BU1IDB01_Set = DB2102.BU1IDB01.Set;
BU1JDB01_Set = DB2102.BU1JDB01.Set;
BU1KDB01_Set = DB2102.BU1KDB01.Set;
BU1LDB01_Set = DB2102.BU1LDB01.Set;
BU1GEB02_Set = DB2102.BU1GEB02.Set;
BU2GEB02_Set = DB2102.BU2GEB02.Set;
BU3GEB02_Set = DB2102.BU3GEB02.Set;
BU4GEB02_Set = DB2102.BU4GEB02.Set;
BU5GEB02_Set = DB2102.BU5GEB02.Set;
BU6GEB02_Set = DB2102.BU6GEB02.Set;
BU7GEB02_Set = DB2102.BU7GEB02.Set;
BU8GEB02_Set = DB2102.BU8GEB02.Set;
BU1DRB01_Set = DB2102.BU1DRB01.Set;
BU2DRB01_Set = DB2102.BU2DRB01.Set;
BU3DRB01_Set = DB2102.BU3DRB01.Set;
BU4DRB01_Set = DB2102.BU4DRB01.Set;
BU1GEB01_Set = DB2102.BU1GEB01.Set;
BU2GEB01_Set = DB2102.BU2GEB01.Set;
BU3GEB01_Set = DB2102.BU3GEB01.Set;
BU4GEB01_Set = DB2102.BU4GEB01.Set;
BU5GEB01_Set = DB2102.BU5GEB01.Set;
BU6GEB01_Set = DB2102.BU6GEB01.Set;
BU7GEB01_Set = DB2102.BU7GEB01.Set;
BU8GEB01_Set = DB2102.BU8GEB01.Set;
BU2ASF01_Set = DB2102.BU2ASF01.Set;
BU2ASF02_Set = DB2102.BU2ASF02.Set;
BU2BSF01_Set = DB2102.BU2BSF01.Set;
BU2BSF02_Set = DB2102.BU2BSF02.Set;
BU2CSF01_Set = DB2102.BU2CSF01.Set;
BU2CSF02_Set = DB2102.BU2CSF02.Set;
BU2DSF01_Set = DB2102.BU2DSF01.Set;
BU2DSF02_Set = DB2102.BU2DSF02.Set;
BUWeter1_Set = DB2102.BUWeter1.Set;
BUWeter2_Set = DB2102.BUWeter2.Set;
BUWeter3_Set = DB2102.BUWeter3.Set;
BUWeter4_Set = DB2102.BUWeter4.Set;
BUWeter5_Set = DB2102.BUWeter5.Set;
BUWeter6_Set = DB2102.BUWeter6.Set;
BUWeter7_Set = DB2102.BUWeter7.Set;
BUWeter8_Set = DB2102.BUWeter8.Set;
BU1GEB02_Alarm = DB2102.BU1GEB02.Alarm;
BU2GEB02_Alarm = DB2102.BU2GEB02.Alarm;
BU3GEB02_Alarm = DB2102.BU3GEB02.Alarm;
BU4GEB02_Alarm = DB2102.BU4GEB02.Alarm;
BU5GEB02_Alarm = DB2102.BU5GEB02.Alarm;
BU6GEB02_Alarm = DB2102.BU6GEB02.Alarm;
BU7GEB02_Alarm = DB2102.BU7GEB02.Alarm;
BU8GEB02_Alarm = DB2102.BU8GEB02.Alarm;
BU1DRB01_Alarm = DB2102.BU1DRB01.Alarm;
BU2DRB01_Alarm = DB2102.BU2DRB01.Alarm;
BU3DRB01_Alarm = DB2102.BU3DRB01.Alarm;
BU4DRB01_Alarm = DB2102.BU4DRB01.Alarm;
BU1GEB01_Alarm = DB2102.BU1GEB01.Alarm;
BU2GEB01_Alarm = DB2102.BU2GEB01.Alarm;
BU3GEB01_Alarm = DB2102.BU3GEB01.Alarm;
BU4GEB01_Alarm = DB2102.BU4GEB01.Alarm;
BU5GEB01_Alarm = DB2102.BU5GEB01.Alarm;
BU6GEB01_Alarm = DB2102.BU6GEB01.Alarm;
BU7GEB01_Alarm = DB2102.BU7GEB01.Alarm;
BU8GEB01_Alarm = DB2102.BU8GEB01.Alarm;
BU2ASF01_Alarm = DB2102.BU2ASF01.Alarm;
BU2ASF02_Alarm = DB2102.BU2ASF02.Alarm;
BU2BSF01_Alarm = DB2102.BU2BSF01.Alarm;
BU2BSF02_Alarm = DB2102.BU2BSF02.Alarm;
BU2CSF01_Alarm = DB2102.BU2CSF01.Alarm;
BU2CSF02_Alarm = DB2102.BU2CSF02.Alarm;
BU2DSF01_Alarm = DB2102.BU2DSF01.Alarm;
BU2DSF02_Alarm = DB2102.BU2DSF02.Alarm;
BUWeter1_Alarm = DB2102.BUWeter1.Alarm;
BUWeter2_Alarm = DB2102.BUWeter2.Alarm;
BUWeter3_Alarm = DB2102.BUWeter3.Alarm;
BUWeter4_Alarm = DB2102.BUWeter4.Alarm;
BUWeter5_Alarm = DB2102.BUWeter5.Alarm;
BUWeter6_Alarm = DB2102.BUWeter6.Alarm;
BUWeter7_Alarm = DB2102.BUWeter7.Alarm;
BUWeter8_Alarm = DB2102.BUWeter8.Alarm;
DV2PCP01_SetL = DB2102.DV2PCP01.SetLeft;
DV2PCP02_SetL = DB2102.DV2PCP02.SetLeft;
DV2PCP03_SetL = DB2102.DV2PCP03.SetLeft;
DV2PCP04_SetL = DB2102.DV2PCP04.SetLeft;
DV2PCP05_SetL = DB2102.DV2PCP05.SetLeft;
DV2PCP06_SetL = DB2102.DV2PCP06.SetLeft;
DV2PCP07_SetL = DB2102.DV2PCP07.SetLeft;
DV2PCP08_SetL = DB2102.DV2PCP08.SetLeft;
DV2PCP09_SetL = DB2102.DV2PCP09.SetLeft;
DV2PCP10_SetL = DB2102.DV2PCP10.SetLeft;
DV2PCP11_SetL = DB2102.DV2PCP11.SetLeft;
DV2PCP12_SetL = DB2102.DV2PCP12.SetLeft;
DV2PCP13_SetL = DB2102.DV2PCP13.SetLeft;
DV2PCP01_SetR = DB2102.DV2PCP01.SetRight;
DV2PCP02_SetR = DB2102.DV2PCP02.SetRight;
DV2PCP03_SetR = DB2102.DV2PCP03.SetRight;
DV2PCP04_SetR = DB2102.DV2PCP04.SetRight;
DV2PCP05_SetR = DB2102.DV2PCP05.SetRight;
DV2PCP06_SetR = DB2102.DV2PCP06.SetRight;
DV2PCP07_SetR = DB2102.DV2PCP07.SetRight;
DV2PCP08_SetR = DB2102.DV2PCP08.SetRight;
DV2PCP09_SetR = DB2102.DV2PCP09.SetRight;
DV2PCP10_SetR = DB2102.DV2PCP10.SetRight;
DV2PCP11_SetR = DB2102.DV2PCP11.SetRight;
DV2PCP12_SetR = DB2102.DV2PCP12.SetRight;
DV2PCP13_SetR = DB2102.DV2PCP13.SetRight;
DV2PCP01_AlarmL = DB2102.DV2PCP01.AlarmLeftPosition;
DV2PCP02_AlarmL = DB2102.DV2PCP02.AlarmLeftPosition;
DV2PCP03_AlarmL = DB2102.DV2PCP03.AlarmLeftPosition;
DV2PCP04_AlarmL = DB2102.DV2PCP04.AlarmLeftPosition;
DV2PCP05_AlarmL = DB2102.DV2PCP05.AlarmLeftPosition;
DV2PCP06_AlarmL = DB2102.DV2PCP06.AlarmLeftPosition;
DV2PCP07_AlarmL = DB2102.DV2PCP07.AlarmLeftPosition;
DV2PCP08_AlarmL = DB2102.DV2PCP08.AlarmLeftPosition;
DV2PCP09_AlarmL = DB2102.DV2PCP09.AlarmLeftPosition;
DV2PCP10_AlarmL = DB2102.DV2PCP10.AlarmLeftPosition;
DV2PCP11_AlarmL = DB2102.DV2PCP11.AlarmLeftPosition;
DV2PCP12_AlarmL = DB2102.DV2PCP12.AlarmLeftPosition;
DV2PCP13_AlarmL = DB2102.DV2PCP13.AlarmLeftPosition;
DV2PCP01_AlarmR = DB2102.DV2PCP01.AlarmRightPosition;
DV2PCP02_AlarmR = DB2102.DV2PCP02.AlarmRightPosition;
DV2PCP03_AlarmR = DB2102.DV2PCP03.AlarmRightPosition;
DV2PCP04_AlarmR = DB2102.DV2PCP04.AlarmRightPosition;
DV2PCP05_AlarmR = DB2102.DV2PCP05.AlarmRightPosition;
DV2PCP06_AlarmR = DB2102.DV2PCP06.AlarmRightPosition;
DV2PCP07_AlarmR = DB2102.DV2PCP07.AlarmRightPosition;
DV2PCP08_AlarmR = DB2102.DV2PCP08.AlarmRightPosition;
DV2PCP09_AlarmR = DB2102.DV2PCP09.AlarmRightPosition;
DV2PCP10_AlarmR = DB2102.DV2PCP10.AlarmRightPosition;
DV2PCP11_AlarmR = DB2102.DV2PCP11.AlarmRightPosition;
DV2PCP12_AlarmR = DB2102.DV2PCP12.AlarmRightPosition;
DV2PCP13_AlarmR = DB2102.DV2PCP13.AlarmRightPosition;
}
private void NewThreadDb2103()
{
DM1DRY1_ACT_Speed_Set = DB2103.DM1DRY1.ACT_Speed;
DM1DRY2_ACT_Speed_Set = DB2103.DM1DRY2.ACT_Speed;
DM1DRY3_ACT_Speed_Set = DB2103.DM1DRY3.ACT_Speed;
DM1DRY4_ACT_Speed_Set = DB2103.DM1DRY4.ACT_Speed;
DM1GEM_Set = DB2103.DM1GEM.ACT_Speed;
DM2GEM_Set = DB2103.DM2GEM.ACT_Speed;
DM3GEM_Set = DB2103.DM3GEM.ACT_Speed;
DM4GEM_Set = DB2103.DM4GEM.ACT_Speed;
DM5GEM_Set = DB2103.DM5GEM.ACT_Speed;
DM6GEM_Set = DB2103.DM6GEM.ACT_Speed;
DM7GEM_Set = DB2103.DM7GEM.ACT_Speed;
DM8GEM_Set = DB2103.DM8GEM.ACT_Speed;
DM2ASF01_Set = DB2103.DM2ASF01.ACT_Speed;
DM2BSF01_Set = DB2103.DM2BSF01.ACT_Speed;
DM2CSF01_Set = DB2103.DM2CSF01.ACT_Speed;
DM2DSF01_Set = DB2103.DM2DSF01.ACT_Speed;
DM1ASF01_Set = DB2103.DM1ASF01.Run;
DM1BSF01_Set = DB2103.DM1BSF01.Run;
DM1CSF01_Set = DB2103.DM1CSF01.Run;
DM1DSF01_Set = DB2103.DM1DSF01.Run;
DM1ESF01_Set = DB2103.DM1ESF01.Run;
DM1FSF01_Set = DB2103.DM1FSF01.Run;
DM1GSF01_Set = DB2103.DM1GSF01.Run;
DM1HSF01_Set = DB2103.DM1HSF01.Run;
DM1ISF01_Set = DB2103.DM1ISF01.Run;
DM1JSF01_Set = DB2103.DM1JSF01.Run;
DM1KSF01_Set = DB2103.DM1KSF01.Run;
DM1LSF01_Set = DB2103.DM1LSF01.Run;
DM1MSF01_Set = DB2103.DM1MSF01.Run;
DM1NSF01_Set = DB2103.DM1NSF01.Run;
DM1OSF01_Set = DB2103.DM1OSF01.Running;
if (DB2103.DM2ASF01.Running)
{
if (DB2103.DM2ASF01.Polarity)
{
DM2ASF01L_Set = true;
DM2ASF01R_Set = false;
}
else
{
DM2ASF01L_Set = false;
DM2ASF01R_Set = true;
}
}
else
{
DM2ASF01L_Set = false;
DM2ASF01R_Set = false;
}
if (DB2103.DM2BSF01.Running)
{
if (DB2103.DM2BSF01.Polarity)
{
DM2BSF01L_Set = true;
DM2BSF01R_Set = false;
}
else
{
DM2BSF01L_Set = false;
DM2BSF01R_Set = true;
}
}
else
{
DM2BSF01L_Set = false;
DM2BSF01R_Set = false;
}
if (DB2103.DM2CSF01.Running)
{
if (DB2103.DM2CSF01.Polarity)
{
DM2CSF01L_Set = true;
DM2CSF01R_Set = false;
}
else
{
DM2CSF01L_Set = false;
DM2CSF01R_Set = true;
}
}
else
{
DM2CSF01L_Set = false;
DM2CSF01R_Set = false;
}
if (DB2103.DM2DSF01.Running)
{
if (DB2103.DM2DSF01.Polarity)
{
DM2DSF01L_Set = true;
DM2DSF01R_Set = false;
}
else
{
DM2DSF01L_Set = false;
DM2DSF01R_Set = true;
}
}
else
{
DM2DSF01L_Set = false;
DM2DSF01R_Set = false;
}
DM1ADF01_Set = DB2103.DM1ADF01.Run;
DM1BDF01_Set = DB2103.DM1BDF01.Run;
DM1CDF01_Set = DB2103.DM1CDF01.Run;
DM1DDF01_Set = DB2103.DM1DDF01.Run;
DM1EDF01_Set = DB2103.DM1EDF01.Run;
DM1FDF01_Set = DB2103.DM1FDF01.Run;
DM1GDF01_Set = DB2103.DM1GDF01.Run;
DM1HDF01_Set = DB2103.DM1HDF01.Run;
DM1IDF01_Set = DB2103.DM1IDF01.Run;
DM1JDF01_Set = DB2103.DM1JDF01.Run;
DM1KDF01_Set = DB2103.DM1KDF01.Run;
DM1LDF01_Set = DB2103.DM1LDF01.Run;
DM1ADB01_Set = DB2103.DM1ADB01.Run;
DM1BDB01_Set = DB2103.DM1BDB01.Run;
DM1CDB01_Set = DB2103.DM1CDB01.Run;
DM1DDB01_Set = DB2103.DM1DDB01.Run;
DM1EDB01_Set = DB2103.DM1EDB01.Run;
DM1FDB01_Set = DB2103.DM1FDB01.Run;
DM1GDB01_Set = DB2103.DM1GDB01.Run;
DM1HDB01_Set = DB2103.DM1HDB01.Run;
DM1IDB01_Set = DB2103.DM1IDB01.Run;
DM1JDB01_Set = DB2103.DM1JDB01.Run;
DM1KDB01_Set = DB2103.DM1KDB01.Run;
DM1LDB01_Set = DB2103.DM1LDB01.Run;
DM1DRY1_Running_Set = DB2103.DM1DRY1.Running;
DM1DRY2_Running_Set = DB2103.DM1DRY2.Running;
DM1DRY3_Running_Set = DB2103.DM1DRY3.Running;
DM1DRY4_Running_Set = DB2103.DM1DRY4.Running;
}
private void NewThreadDb2107()
{
WatchDog_Set = DB2107.NormalStatus.WatchDog >= 1 ? true : false;
EMStop_Set = DB2107.NormalStatus.EMStop;
Vessel_1_HighLevel_Set = DB2107.Weight.Vessel_1.HighLevel;
Vessel_2_HighLevel_Set = DB2107.Weight.Vessel_2.HighLevel;
Vessel_3_HighLevel_Set = DB2107.Weight.Vessel_3.HighLevel;
Vessel_4_HighLevel_Set = DB2107.Weight.Vessel_4.HighLevel;
Vessel_5_HighLevel_Set = DB2107.Weight.Vessel_5.HighLevel;
Vessel_1_LowLevel_Set = DB2107.Weight.Vessel_1.Lowlevel;
Vessel_2_LowLevel_Set = DB2107.Weight.Vessel_2.Lowlevel;
Vessel_3_LowLevel_Set = DB2107.Weight.Vessel_3.Lowlevel;
Vessel_4_LowLevel_Set = DB2107.Weight.Vessel_4.Lowlevel;
Vessel_5_LowLevel_Set = DB2107.Weight.Vessel_5.Lowlevel;
highLevel_D1_Set = DB2107.Level.HighLevel_D1;
highLevel_D2_Set = DB2107.Level.HighLevel_D2;
highLevel_D3_Set = DB2107.Level.HighLevel_D3;
highLevel_D4_Set = DB2107.Level.HighLevel_D4;
highLevel_D5_Set = DB2107.Level.HighLevel_D5;
highLevel_D6_Set = DB2107.Level.HighLevel_D6;
highLevel_D7_Set = DB2107.Level.HighLevel_D7;
highLevel_D8_Set = DB2107.Level.HighLevel_D8;
highLevel_D9_Set = DB2107.Level.HighLevel_D9;
highLevel_D10_Set = DB2107.Level.HighLevel_D10;
highLevel_D11_Set = DB2107.Level.HighLevel_D11;
highLevel_D12_Set = DB2107.Level.HighLevel_D12;
lowLevel_D1_Set = DB2107.Level.LowLevel_D1;
lowLevel_D2_Set = DB2107.Level.LowLevel_D2;
lowLevel_D3_Set = DB2107.Level.LowLevel_D3;
lowLevel_D4_Set = DB2107.Level.LowLevel_D4;
lowLevel_D5_Set = DB2107.Level.LowLevel_D5;
lowLevel_D6_Set = DB2107.Level.LowLevel_D6;
lowLevel_D7_Set = DB2107.Level.LowLevel_D7;
lowLevel_D8_Set = DB2107.Level.LowLevel_D8;
lowLevel_D9_Set = DB2107.Level.LowLevel_D9;
lowLevel_D10_Set = DB2107.Level.LowLevel_D10;
lowLevel_D11_Set = DB2107.Level.LowLevel_D11;
lowLevel_D12_Set = DB2107.Level.LowLevel_D12;
Hopper_1_HighLevel_Set = DB2107.Weight.Hopper_1.HighLevel;
Hopper_2_HighLevel_Set = DB2107.Weight.Hopper_2.HighLevel;
Hopper_3_HighLevel_Set = DB2107.Weight.Hopper_3.HighLevel;
Hopper_4_HighLevel_Set = DB2107.Weight.Hopper_4.HighLevel;
Hopper_1_LowLevel_Set = DB2107.Weight.Hopper_1.Lowlevel;
Hopper_2_LowLevel_Set = DB2107.Weight.Hopper_2.Lowlevel;
Hopper_3_LowLevel_Set = DB2107.Weight.Hopper_3.Lowlevel;
Hopper_4_LowLevel_Set = DB2107.Weight.Hopper_4.Lowlevel;
WScale_1_HighLevel_Set = DB2107.Weight.WScale_1.HighLevel;
WScale_2_HighLevel_Set = DB2107.Weight.WScale_2.HighLevel;
WScale_3_HighLevel_Set = DB2107.Weight.WScale_3.HighLevel;
WScale_4_HighLevel_Set = DB2107.Weight.WScale_4.HighLevel;
WScale_1_LowLevel_Set = DB2107.Weight.WScale_1.Lowlevel;
WScale_2_LowLevel_Set = DB2107.Weight.WScale_2.Lowlevel;
WScale_3_LowLevel_Set = DB2107.Weight.WScale_3.Lowlevel;
WScale_4_LowLevel_Set = DB2107.Weight.WScale_4.Lowlevel;
topPressure_V1_Set = DB2107.Pressure.TopPressure_V1.ActualValue;
topPressure_V2_Set = DB2107.Pressure.TopPressure_V2.ActualValue;
topPressure_V3_Set = DB2107.Pressure.TopPressure_V3.ActualValue;
topPressure_V4_Set = DB2107.Pressure.TopPressure_V4.ActualValue;
topPressure_V5_Set = DB2107.Pressure.TopPressure_V5.ActualValue;
Vessel_1_ActWeight_Set = DB2107.Weight.Vessel_1.ActWeight;
Vessel_2_ActWeight_Set = DB2107.Weight.Vessel_2.ActWeight;
Vessel_3_ActWeight_Set = DB2107.Weight.Vessel_3.ActWeight;
Vessel_4_ActWeight_Set = DB2107.Weight.Vessel_4.ActWeight;
Vessel_5_ActWeight_Set = DB2107.Weight.Vessel_5.ActWeight;
conveyV1_PV_Set = DB2107.PID.Convey_V1.PV;
conveyV2_PV_Set = DB2107.PID.Convey_V2.PV;
conveyV3_PV_Set = DB2107.PID.Convey_V3.PV;
conveyV5_PV_Set = DB2107.PID.Convey_V5.PV;
mainPress_V1_ActualValue_Set = DB2107.Pressure.MainPress_V1.ActualValue;
mainPress_V2_ActualValue_Set = DB2107.Pressure.MainPress_V2.ActualValue;
mainPress_V3_ActualValue_Set = DB2107.Pressure.MainPress_V3.ActualValue;
mainPress_V5_ActualValue_Set = DB2107.Pressure.MainPress_V5.ActualValue;
purgeV1_PV_Set = DB2107.PID.Purge_V1.PV;
purgeV2_PV_Set = DB2107.PID.Purge_V2.PV;
purgeV3_PV_Set = DB2107.PID.Purge_V3.PV;
purgeV5_PV_Set = DB2107.PID.Purge_V5.PV;
WScale_1_ActWeight_Set = DB2107.Weight.WScale_1.ActWeight;
WScale_2_ActWeight_Set = DB2107.Weight.WScale_2.ActWeight;
WScale_3_ActWeight_Set = DB2107.Weight.WScale_3.ActWeight;
WScale_4_ActWeight_Set = DB2107.Weight.WScale_4.ActWeight;
AS1BLT01_Set = DB2107.Valve.AS1BLT01;
AS1BLT02_Set = DB2107.Valve.AS1BLT02;
AS1BLT03_Set = DB2107.Valve.AS1BLT03;
AS1BLT04_Set = DB2107.Valve.AS1BLT04;
AS1BLT05_Set = DB2107.Valve.AS1BLT05;
AS2BLT01_Set = DB2107.Valve.AS2BLT01;
AS2BLT02_Set = DB2107.Valve.AS2BLT02;
AS2BLT03_Set = DB2107.Valve.AS2BLT03;
AS2BLT04_Set = DB2107.Valve.AS2BLT04;
AS2BLT05_Set = DB2107.Valve.AS2BLT05;
AS3BLT01_Set = DB2107.Valve.AS3BLT01;
AS3BLT02_Set = DB2107.Valve.AS3BLT02;
AS3BLT03_Set = DB2107.Valve.AS3BLT03;
AS3BLT04_Set = DB2107.Valve.AS3BLT04;
AS3BLT05_Set = DB2107.Valve.AS3BLT05;
AS4BLT01_Set = DB2107.Valve.AS4BLT01;
AS4BLT03_Set = DB2107.Valve.AS4BLT03;
AS5BLT01_Set = DB2107.Valve.AS5BLT01;
AS5BLT02_Set = DB2107.Valve.AS5BLT02;
AS5BLT03_Set = DB2107.Valve.AS5BLT03;
AS5BLT04_Set = DB2107.Valve.AS5BLT04;
AS5BLT05_Set = DB2107.Valve.AS5BLT05;
AS2PCP01_Set = DB2107.Valve.AS2PCP01;
AS2PCP02_Set = DB2107.Valve.AS2PCP02;
AS2PCP03_Set = DB2107.Valve.AS2PCP03;
AS1OIS01_Set = DB2107.Valve.AS1OIS01;
AS1OIS02_Set = DB2107.Valve.AS1OIS02;
AS1OIS03_Set = DB2107.Valve.AS1OIS03;
AS2OIS01_Set = DB2107.Valve.AS2OIS01;
AS2OIS02_Set = DB2107.Valve.AS2OIS02;
AS2OIS03_Set = DB2107.Valve.AS2OIS03;
AS3OIS01_Set = DB2107.Valve.AS3OIS01;
AS3OIS02_Set = DB2107.Valve.AS3OIS02;
AS3OIS03_Set = DB2107.Valve.AS3OIS03;
AS4OIS01_Set = DB2107.Valve.AS4OIS01;
AS4OIS02_Set = DB2107.Valve.AS4OIS02;
AS4OIS03_Set = DB2107.Valve.AS4OIS03;
AS1GET01_Set = DB2107.Valve.AS1GET01;
AS1GET02_Set = DB2107.Valve.AS1GET02;
AS2GET01_Set = DB2107.Valve.AS2GET01;
AS2GET02_Set = DB2107.Valve.AS2GET02;
AS3GET01_Set = DB2107.Valve.AS3GET01;
AS3GET02_Set = DB2107.Valve.AS3GET02;
AS4GET01_Set = DB2107.Valve.AS4GET01;
AS4GET02_Set = DB2107.Valve.AS4GET02;
AS5GET01_Set = DB2107.Valve.AS5GET01;
AS5GET02_Set = DB2107.Valve.AS5GET02;
AS6GET01_Set = DB2107.Valve.AS6GET01;
AS6GET02_Set = DB2107.Valve.AS6GET02;
AS7GET01_Set = DB2107.Valve.AS7GET01;
AS7GET02_Set = DB2107.Valve.AS7GET02;
AS8GET01_Set = DB2107.Valve.AS8GET01;
AS8GET02_Set = DB2107.Valve.AS8GET02;
PM1ADF01_Set = DB2107.Valve.PM1ADF01;
PM1BDF01_Set = DB2107.Valve.PM1BDF01;
PM1CDF01_Set = DB2107.Valve.PM1CDF01;
PM1DDF01_Set = DB2107.Valve.PM1DDF01;
PM1EDF01_Set = DB2107.Valve.PM1EDF01;
PM1FDF01_Set = DB2107.Valve.PM1FDF01;
PM1GDF01_Set = DB2107.Valve.PM1GDF01;
PM1HDF01_Set = DB2107.Valve.PM1HDF01;
PM1IDF01_Set = DB2107.Valve.PM1IDF01;
PM1JDF01_Set = DB2107.Valve.PM1JDF01;
PM1KDF01_Set = DB2107.Valve.PM1KDF01;
PM1LDF01_Set = DB2107.Valve.PM1LDF01;
}
private void NewThread(object obj)
{
try
{
if (conCurrentCache.Count == 0)
{
MesnacServiceManager.Instance.LoggingService.Info("开始");
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
conCurrentCache.TryAdd("plc", DateTime.Now);
NewThreadDb2102();
NewThreadDb2107();
NewThreadDb2103();
SetControlValue();
conCurrentCache.Clear();
stopwatch.Stop();
var send = stopwatch.ElapsedMilliseconds;
MesnacServiceManager.Instance.LoggingService.Info("线束"+ send);
conCurrentCache.Clear();
}
else
{
MesnacServiceManager.Instance.LoggingService.Info("被过滤");
}
}
catch(Exception)
{
conCurrentCache.Clear();
}
}
/// <summary>
/// 控件获取
/// </summary>
private void SetControl()
{
WatchDog = GetStateButton("WatchDog");
EMStop = GetSystemStateShow("EMStop");
Vessel_1_HighLevel = GetSwitchLight("Vessel_1_HighLevel");
Vessel_2_HighLevel = GetSwitchLight("Vessel_2_HighLevel");
Vessel_3_HighLevel = GetSwitchLight("Vessel_3_HighLevel");
Vessel_4_HighLevel = GetSwitchLight("Vessel_4_HighLevel");
Vessel_5_HighLevel = GetSwitchLight("Vessel_5_HighLevel");
Vessel_1_LowLevel = GetSwitchLight("Vessel_1_LowLevel");
Vessel_2_LowLevel = GetSwitchLight("Vessel_2_LowLevel");
Vessel_3_LowLevel = GetSwitchLight("Vessel_3_LowLevel");
Vessel_4_LowLevel = GetSwitchLight("Vessel_4_LowLevel");
Vessel_5_LowLevel = GetSwitchLight("Vessel_5_LowLevel");
highLevel_D1 = GetSwitchLight("highLevel_D1");
highLevel_D2 = GetSwitchLight("highLevel_D2");
highLevel_D3 = GetSwitchLight("highLevel_D3");
highLevel_D4 = GetSwitchLight("highLevel_D4");
highLevel_D5 = GetSwitchLight("highLevel_D5");
highLevel_D6 = GetSwitchLight("highLevel_D6");
highLevel_D7 = GetSwitchLight("highLevel_D7");
highLevel_D8 = GetSwitchLight("highLevel_D8");
highLevel_D9 = GetSwitchLight("highLevel_D9");
highLevel_D10 = GetSwitchLight("highLevel_D10");
highLevel_D11 = GetSwitchLight("highLevel_D11");
highLevel_D12 = GetSwitchLight("highLevel_D12");
lowLevel_D1 = GetSwitchLight("lowLevel_D1");
lowLevel_D2 = GetSwitchLight("lowLevel_D2");
lowLevel_D3 = GetSwitchLight("lowLevel_D3");
lowLevel_D4 = GetSwitchLight("lowLevel_D4");
lowLevel_D5 = GetSwitchLight("lowLevel_D5");
lowLevel_D6 = GetSwitchLight("lowLevel_D6");
lowLevel_D7 = GetSwitchLight("lowLevel_D7");
lowLevel_D8 = GetSwitchLight("lowLevel_D8");
lowLevel_D9 = GetSwitchLight("lowLevel_D9");
lowLevel_D10 = GetSwitchLight("lowLevel_D10");
lowLevel_D11 = GetSwitchLight("lowLevel_D11");
lowLevel_D12 = GetSwitchLight("lowLevel_D12");
Hopper_1_HighLevel = GetSwitchLight("Hopper_1_HighLevel");
Hopper_2_HighLevel = GetSwitchLight("Hopper_2_HighLevel");
Hopper_3_HighLevel = GetSwitchLight("Hopper_3_HighLevel");
Hopper_4_HighLevel = GetSwitchLight("Hopper_4_HighLevel");
Hopper_1_LowLevel = GetSwitchLight("Hopper_1_LowLevel");
Hopper_2_LowLevel = GetSwitchLight("Hopper_2_LowLevel");
Hopper_3_LowLevel = GetSwitchLight("Hopper_3_LowLevel");
Hopper_4_LowLevel = GetSwitchLight("Hopper_4_LowLevel");
WScale_1_HighLevel = GetSwitchLight("WScale_1_HighLevel");
WScale_2_HighLevel = GetSwitchLight("WScale_2_HighLevel");
WScale_3_HighLevel = GetSwitchLight("WScale_3_HighLevel");
WScale_4_HighLevel = GetSwitchLight("WScale_4_HighLevel");
WScale_1_LowLevel = GetSwitchLight("WScale_1_LowLevel");
WScale_2_LowLevel = GetSwitchLight("WScale_2_LowLevel");
WScale_3_LowLevel = GetSwitchLight("WScale_3_LowLevel");
WScale_4_LowLevel = GetSwitchLight("WScale_4_LowLevel");
topPressure_V1 = GetMCLabel("topPressure_V1");
topPressure_V2 = GetMCLabel("topPressure_V2");
topPressure_V3 = GetMCLabel("topPressure_V3");
topPressure_V4 = GetMCLabel("topPressure_V4");
topPressure_V5 = GetMCLabel("topPressure_V5");
Vessel_1_ActWeight = GetMCLabel("Vessel_1_ActWeight");
Vessel_2_ActWeight = GetMCLabel("Vessel_2_ActWeight");
Vessel_3_ActWeight = GetMCLabel("Vessel_3_ActWeight");
Vessel_4_ActWeight = GetMCLabel("Vessel_4_ActWeight");
Vessel_5_ActWeight = GetMCLabel("Vessel_5_ActWeight");
conveyV1_PV = GetMCLabel("conveyV1_PV");
conveyV2_PV = GetMCLabel("conveyV2_PV");
conveyV3_PV = GetMCLabel("conveyV3_PV");
conveyV5_PV = GetMCLabel("conveyV5_PV");
mainPress_V1_ActualValue = GetMCLabel("mainPress_V1_ActualValue");
mainPress_V2_ActualValue = GetMCLabel("mainPress_V2_ActualValue");
mainPress_V3_ActualValue = GetMCLabel("mainPress_V3_ActualValue");
mainPress_V5_ActualValue = GetMCLabel("mainPress_V5_ActualValue");
purgeV1_PV = GetMCLabel("purgeV1_PV");
purgeV2_PV = GetMCLabel("purgeV2_PV");
purgeV3_PV = GetMCLabel("purgeV3_PV");
purgeV5_PV = GetMCLabel("purgeV5_PV");
WScale_1_ActWeight = GetMCLabel("WScale_1_ActWeight");
WScale_2_ActWeight = GetMCLabel("WScale_2_ActWeight");
WScale_3_ActWeight = GetMCLabel("WScale_3_ActWeight");
WScale_4_ActWeight = GetMCLabel("WScale_4_ActWeight");
DM1DRY1_ACT_Speed = GetMCLabel("DM1DRY1_ACT_Speed");
DM1DRY2_ACT_Speed = GetMCLabel("DM1DRY2_ACT_Speed");
DM1DRY3_ACT_Speed = GetMCLabel("DM1DRY3_ACT_Speed");
DM1DRY4_ACT_Speed = GetMCLabel("DM1DRY4_ACT_Speed");
Hopper_1_ActWeight = GetMCLabel("Hopper_1_ActWeight");
Hopper_2_ActWeight = GetMCLabel("Hopper_2_ActWeight");
Hopper_3_ActWeight = GetMCLabel("Hopper_3_ActWeight");
Hopper_4_ActWeight = GetMCLabel("Hopper_4_ActWeight");
DM1GEM = GetMCLabel("DM1GEM");
DM2GEM = GetMCLabel("DM2GEM");
DM3GEM = GetMCLabel("DM3GEM");
DM4GEM = GetMCLabel("DM4GEM");
DM5GEM = GetMCLabel("DM5GEM");
DM6GEM = GetMCLabel("DM6GEM");
DM7GEM = GetMCLabel("DM7GEM");
DM8GEM = GetMCLabel("DM8GEM");
DM2ASF01 = GetMCLabel("DM2ASF01");
DM2BSF01 = GetMCLabel("DM2BSF01");
DM2CSF01 = GetMCLabel("DM2CSF01");
DM2DSF01 = GetMCLabel("DM2DSF01");
DM1ASF01 = GetRSCREWBIG("DM1ASF01");
DM1BSF01 = GetRSCREWBIG("DM1BSF01");
DM1CSF01 = GetLSCREWBIG("DM1CSF01");
DM1DSF01 = GetLSCREWBIG("DM1DSF01");
DM1ESF01 = GetRSCREWBIG("DM1ESF01");
DM1FSF01 = GetLSCREWBIG("DM1FSF01");
DM1GSF01 = GetRSCREWBIG("DM1GSF01");
DM1HSF01 = GetRSCREWBIG("DM1HSF01");
DM1ISF01 = GetLSCREWBIG("DM1ISF01");
DM1JSF01 = GetLSCREWBIG("DM1JSF01");
DM1KSF01 = GetRSCREWBIG("DM1KSF01");
DM1LSF01 = GetRSCREWBIG("DM1LSF01");
DM1MSF01 = GetLSCREWBIG("DM1MSF01");
DM1NSF01 = GetLSCREWBIG("DM1NSF01");
DM1OSF01 = GetRSCREWBIG("DM1OSF01");
DM2ASF01L = GetLSCREWBIG("DM2ASF01L");
DM2BSF01L = GetLSCREWBIG("DM2BSF01L");
DM2CSF01L = GetLSCREWBIG("DM2CSF01L");
DM2DSF01L = GetLSCREWBIG("DM2DSF01L");
DM2ASF01R = GetRSCREWBIG("DM2ASF01R");
DM2BSF01R = GetRSCREWBIG("DM2BSF01R");
DM2CSF01R = GetRSCREWBIG("DM2CSF01R");
DM2DSF01R = GetRSCREWBIG("DM2DSF01R");
AS1BLT01 = GetJzf("AS1BLT01");
AS1BLT02 = GetJzf("AS1BLT02");
AS1BLT03 = GetJzf("AS1BLT03");
AS1BLT04 = GetJzf("AS1BLT04");
AS1BLT05 = GetJzf("AS1BLT05");
AS2BLT01 = GetJzf("AS2BLT01");
AS2BLT02 = GetJzf("AS2BLT02");
AS2BLT03 = GetJzf("AS2BLT03");
AS2BLT04 = GetJzf("AS2BLT04");
AS2BLT05 = GetJzf("AS2BLT05");
AS3BLT01 = GetJzf("AS3BLT01");
AS3BLT02 = GetJzf("AS3BLT02");
AS3BLT03 = GetJzf("AS3BLT03");
AS3BLT04 = GetJzf("AS3BLT04");
AS3BLT05 = GetJzf("AS3BLT05");
AS4BLT01 = GetJzf("AS4BLT01");
AS4BLT03 = GetJzf("AS4BLT03");
AS5BLT01 = GetJzf("AS5BLT01");
AS5BLT02 = GetJzf("AS5BLT02");
AS5BLT03 = GetJzf("AS5BLT03");
AS5BLT04 = GetJzf("AS5BLT04");
AS5BLT05 = GetJzf("AS5BLT05");
AS2PCP01 = GetJzf("AS2PCP01");
AS2PCP02 = GetJzf("AS2PCP02");
AS2PCP03 = GetJzf("AS2PCP03");
AS1OIS01 = GetJzf("AS1OIS01");
AS1OIS02 = GetJzf("AS1OIS02");
AS1OIS03 = GetJzf("AS1OIS03");
AS2OIS01 = GetJzf("AS2OIS01");
AS2OIS02 = GetJzf("AS2OIS02");
AS2OIS03 = GetJzf("AS2OIS03");
AS3OIS01 = GetJzf("AS3OIS01");
AS3OIS02 = GetJzf("AS3OIS02");
AS3OIS03 = GetJzf("AS3OIS03");
AS4OIS01 = GetJzf("AS4OIS01");
AS4OIS02 = GetJzf("AS4OIS02");
AS4OIS03 = GetJzf("AS4OIS03");
AS1GET01 = GetJzf("AS1GET01");
AS1GET02 = GetJzf("AS1GET02");
AS2GET01 = GetJzf("AS2GET01");
AS2GET02 = GetJzf("AS2GET02");
AS3GET01 = GetJzf("AS3GET01");
AS3GET02 = GetJzf("AS3GET02");
AS4GET01 = GetJzf("AS4GET01");
AS4GET02 = GetJzf("AS4GET02");
AS5GET01 = GetJzf("AS5GET01");
AS5GET02 = GetJzf("AS5GET02");
AS6GET01 = GetJzf("AS6GET01");
AS6GET02 = GetJzf("AS6GET02");
AS7GET01 = GetJzf("AS7GET01");
AS7GET02 = GetJzf("AS7GET02");
AS8GET01 = GetJzf("AS8GET01");
AS8GET02 = GetJzf("AS8GET02");
DM1ADF01 = GetFan("DM1ADF01");
DM1BDF01 = GetFan("DM1BDF01");
DM1CDF01 = GetFan("DM1CDF01");
DM1DDF01 = GetFan("DM1DDF01");
DM1EDF01 = GetFan("DM1EDF01");
DM1FDF01 = GetFan("DM1FDF01");
DM1GDF01 = GetFan("DM1GDF01");
DM1HDF01 = GetFan("DM1HDF01");
DM1IDF01 = GetFan("DM1IDF01");
DM1JDF01 = GetFan("DM1JDF01");
DM1KDF01 = GetFan("DM1KDF01");
DM1LDF01 = GetFan("DM1LDF01");
DM1ADB01 = GetFan("DM1ADB01");
DM1BDB01 = GetFan("DM1BDB01");
DM1CDB01 = GetFan("DM1CDB01");
DM1DDB01 = GetFan("DM1DDB01");
DM1EDB01 = GetFan("DM1EDB01");
DM1FDB01 = GetFan("DM1FDB01");
DM1GDB01 = GetFan("DM1GDB01");
DM1HDB01 = GetFan("DM1HDB01");
DM1IDB01 = GetFan("DM1IDB01");
DM1JDB01 = GetFan("DM1JDB01");
DM1KDB01 = GetFan("DM1KDB01");
DM1LDB01 = GetFan("DM1LDB01");
DM1DRY1_Running = GetFan("DM1DRY1_Running");
DM1DRY2_Running = GetFan("DM1DRY2_Running");
DM1DRY3_Running = GetFan("DM1DRY3_Running");
DM1DRY4_Running = GetFan("DM1DRY4_Running");
PM3ADF01 = GetFan("PM3ADF01");
PM1ADF01 = GetControlCabinet("PM1ADF01");
PM1BDF01 = GetControlCabinet("PM1BDF01");
PM1CDF01 = GetControlCabinet("PM1CDF01");
PM1DDF01 = GetControlCabinet("PM1DDF01");
PM1EDF01 = GetControlCabinet("PM1EDF01");
PM1FDF01 = GetControlCabinet("PM1FDF01");
PM1GDF01 = GetControlCabinet("PM1GDF01");
PM1HDF01 = GetControlCabinet("PM1HDF01");
PM1IDF01 = GetControlCabinet("PM1IDF01");
PM1JDF01 = GetControlCabinet("PM1JDF01");
PM1KDF01 = GetControlCabinet("PM1KDF01");
PM1LDF01 = GetControlCabinet("PM1LDF01");
BU1ASF01 = GetLjSwith("BU1ASF01");
BU1BSF01 = GetLjSwith("BU1BSF01");
BU1CSF01 = GetLjSwith("BU1CSF01");
BU1DSF01 = GetLjSwith("BU1DSF01");
BU1ESF01 = GetLjSwith("BU1ESF01");
BU1FSF01 = GetLjSwith("BU1FSF01");
BU1GSF01 = GetLjSwith("BU1GSF01");
BU1HSF01 = GetLjSwith("BU1HSF01");
BU1ISF01 = GetLjSwith("BU1ISF01");
BU1JSF01 = GetLjSwith("BU1JSF01");
BU1KSF01 = GetLjSwith("BU1KSF01");
BU1LSF01 = GetLjSwith("BU1LSF01");
BU1MSF01 = GetLjSwith("BU1MSF01");
BU1NSF01 = GetLjSwith("BU1NSF01");
BU1OSF01 = GetLjSwith("BU1OSF01");
BU1BLT01 = GetLjSwith("BU1BLT01");
BU1BLT02 = GetLjSwith("BU1BLT02");
BU1BLT03 = GetLjSwith("BU1BLT03");
BU1BLT04 = GetLjSwith("BU1BLT04");
BU1BLT05 = GetLjSwith("BU1BLT05");
BU1BLT06 = GetLjSwith("BU1BLT06");
BU1BLT07 = GetLjSwith("BU1BLT07");
BU2BLT01 = GetLjSwith("BU2BLT01");
BU2BLT02 = GetLjSwith("BU2BLT02");
BU2BLT03 = GetLjSwith("BU2BLT03");
BU2BLT04 = GetLjSwith("BU2BLT04");
BU2BLT05 = GetLjSwith("BU2BLT05");
BU3BLT01 = GetLjSwith("BU3BLT01");
BU3BLT02 = GetLjSwith("BU3BLT02");
BU3BLT03 = GetLjSwith("BU3BLT03");
BU3BLT04 = GetLjSwith("BU3BLT04");
BU3BLT05 = GetLjSwith("BU3BLT05");
BU3BLT06 = GetLjSwith("BU3BLT06");
BU3BLT07 = GetLjSwith("BU3BLT07");
BU4BLT01 = GetLjSwith("BU4BLT01");
BU4BLT02 = GetLjSwith("BU4BLT02");
BU4BLT03 = GetLjSwith("BU4BLT03");
BU4BLT04 = GetLjSwith("BU4BLT04");
BU4BLT05 = GetLjSwith("BU4BLT05");
BU4BLT06 = GetLjSwith("BU4BLT06");
BU4BLT07 = GetLjSwith("BU4BLT07");
BU5BLT01 = GetLjSwith("BU5BLT01");
BU5BLT02 = GetLjSwith("BU5BLT02");
BU5BLT03 = GetLjSwith("BU5BLT03");
BU5BLT04 = GetLjSwith("BU5BLT04");
BU1ADB01 = GetLjSwith("BU1ADB01");
BU1BDB01 = GetLjSwith("BU1BDB01");
BU1CDB01 = GetLjSwith("BU1CDB01");
BU1DDB01 = GetLjSwith("BU1DDB01");
BU1EDB01 = GetLjSwith("BU1EDB01");
BU1FDB01 = GetLjSwith("BU1FDB01");
BU1GDB01 = GetLjSwith("BU1GDB01");
BU1HDB01 = GetLjSwith("BU1HDB01");
BU1IDB01 = GetLjSwith("BU1IDB01");
BU1JDB01 = GetLjSwith("BU1JDB01");
BU1KDB01 = GetLjSwith("BU1KDB01");
BU1LDB01 = GetLjSwith("BU1LDB01");
BU1GEB02 = GetLjSwith("BU1GEB02");
BU2GEB02 = GetLjSwith("BU2GEB02");
BU3GEB02 = GetLjSwith("BU3GEB02");
BU4GEB02 = GetLjSwith("BU4GEB02");
BU5GEB02 = GetLjSwith("BU5GEB02");
BU6GEB02 = GetLjSwith("BU6GEB02");
BU7GEB02 = GetLjSwith("BU7GEB02");
BU8GEB02 = GetLjSwith("BU8GEB02");
BU1DRB01 = GetLjSwith("BU1DRB01");
BU2DRB01 = GetLjSwith("BU2DRB01");
BU3DRB01 = GetLjSwith("BU3DRB01");
BU4DRB01 = GetLjSwith("BU4DRB01");
BU1GEB01 = GetLjSwith("BU1GEB01");
BU2GEB01 = GetLjSwith("BU2GEB01");
BU3GEB01 = GetLjSwith("BU3GEB01");
BU4GEB01 = GetLjSwith("BU4GEB01");
BU5GEB01 = GetLjSwith("BU5GEB01");
BU6GEB01 = GetLjSwith("BU6GEB01");
BU7GEB01 = GetLjSwith("BU7GEB01");
BU8GEB01 = GetLjSwith("BU8GEB01");
BU2ASF01 = GetLjSwith("BU2ASF01");
BU2ASF02 = GetLjSwith("BU2ASF02");
BU2BSF01 = GetLjSwith("BU2BSF01");
BU2BSF02 = GetLjSwith("BU2BSF02");
BU2CSF01 = GetLjSwith("BU2CSF01");
BU2CSF02 = GetLjSwith("BU2CSF02");
BU2DSF01 = GetLjSwith("BU2DSF01");
BU2DSF02 = GetLjSwith("BU2DSF02");
BUWeter1 = GetLjSwith("BUWeter1");
BUWeter2 = GetLjSwith("BUWeter2");
BUWeter3 = GetLjSwith("BUWeter3");
BUWeter4 = GetLjSwith("BUWeter4");
BUWeter5 = GetLjSwith("BUWeter5");
BUWeter6 = GetLjSwith("BUWeter6");
BUWeter7 = GetLjSwith("BUWeter7");
BUWeter8 = GetLjSwith("BUWeter8");
DV2PCP01 = GetThreeWayValve("DV2PCP01");
DV2PCP02 = GetThreeWayValve("DV2PCP02");
DV2PCP03 = GetThreeWayValve("DV2PCP03");
DV2PCP04 = GetThreeWayValve("DV2PCP04");
DV2PCP05 = GetThreeWayValve("DV2PCP05");
DV2PCP06 = GetThreeWayValve("DV2PCP06");
DV2PCP07 = GetThreeWayValve("DV2PCP07");
DV2PCP08 = GetThreeWayValve("DV2PCP08");
DV2PCP09 = GetThreeWayValve("DV2PCP09");
DV2PCP10 = GetThreeWayValve("DV2PCP10");
DV2PCP11 = GetThreeWayValve("DV2PCP11");
DV2PCP12 = GetThreeWayValve("DV2PCP12");
DV2PCP13 = GetThreeWayValve("DV2PCP13");
}
/// <summary>
/// Plc读数
/// </summary>
private void GetPlcValue(object sender, EventArgs e)
{
if (GetAllDbMCControlsByOption(DbOptionTypes.None).Count == 0)
{
timer.Stop();
timer.Dispose();
}
ThreadPool.QueueUserWorkItem(new WaitCallback(NewThread));
}
/// <summary>
/// 控件赋值
/// </summary>
private void SetControlValue()
{
SetStateButton(WatchDog, WatchDog_Set);
SetSystemStateShow(EMStop, EMStop_Set);
SetSwitchLight(Vessel_1_HighLevel, Vessel_1_HighLevel_Set, false);
SetSwitchLight(Vessel_2_HighLevel, Vessel_2_HighLevel_Set, false);
SetSwitchLight(Vessel_3_HighLevel, Vessel_3_HighLevel_Set, false);
SetSwitchLight(Vessel_4_HighLevel, Vessel_4_HighLevel_Set, false);
SetSwitchLight(Vessel_5_HighLevel, Vessel_5_HighLevel_Set, false);
SetSwitchLight(Vessel_1_LowLevel, Vessel_1_LowLevel_Set, false);
SetSwitchLight(Vessel_2_LowLevel, Vessel_2_LowLevel_Set, false);
SetSwitchLight(Vessel_3_LowLevel, Vessel_3_LowLevel_Set, false);
SetSwitchLight(Vessel_4_LowLevel, Vessel_4_LowLevel_Set, false);
SetSwitchLight(Vessel_5_LowLevel, Vessel_5_LowLevel_Set, false);
SetSwitchLight(highLevel_D1, highLevel_D1_Set, false);
SetSwitchLight(highLevel_D2, highLevel_D2_Set, false);
SetSwitchLight(highLevel_D3, highLevel_D3_Set, false);
SetSwitchLight(highLevel_D4, highLevel_D4_Set, false);
SetSwitchLight(highLevel_D5, highLevel_D5_Set, false);
SetSwitchLight(highLevel_D6, highLevel_D6_Set, false);
SetSwitchLight(highLevel_D7, highLevel_D7_Set, false);
SetSwitchLight(highLevel_D8, highLevel_D8_Set, false);
SetSwitchLight(highLevel_D9, highLevel_D9_Set, false);
SetSwitchLight(highLevel_D10, highLevel_D10_Set, false);
SetSwitchLight(highLevel_D11, highLevel_D11_Set, false);
SetSwitchLight(highLevel_D12, highLevel_D12_Set, false);
SetSwitchLight(lowLevel_D1, lowLevel_D1_Set, false);
SetSwitchLight(lowLevel_D2, lowLevel_D2_Set, false);
SetSwitchLight(lowLevel_D3, lowLevel_D3_Set, false);
SetSwitchLight(lowLevel_D4, lowLevel_D4_Set, false);
SetSwitchLight(lowLevel_D5, lowLevel_D5_Set, false);
SetSwitchLight(lowLevel_D6, lowLevel_D6_Set, false);
SetSwitchLight(lowLevel_D7, lowLevel_D7_Set, false);
SetSwitchLight(lowLevel_D8, lowLevel_D8_Set, false);
SetSwitchLight(lowLevel_D9, lowLevel_D9_Set, false);
SetSwitchLight(lowLevel_D10, lowLevel_D10_Set, false);
SetSwitchLight(lowLevel_D11, lowLevel_D11_Set, false);
SetSwitchLight(lowLevel_D12, lowLevel_D12_Set, false);
SetSwitchLight(Hopper_1_HighLevel, Hopper_1_HighLevel_Set, false);
SetSwitchLight(Hopper_2_HighLevel, Hopper_2_HighLevel_Set, false);
SetSwitchLight(Hopper_3_HighLevel, Hopper_3_HighLevel_Set, false);
SetSwitchLight(Hopper_4_HighLevel, Hopper_4_HighLevel_Set, false);
SetSwitchLight(Hopper_1_LowLevel, Hopper_1_LowLevel_Set, false);
SetSwitchLight(Hopper_2_LowLevel, Hopper_2_LowLevel_Set, false);
SetSwitchLight(Hopper_3_LowLevel, Hopper_3_LowLevel_Set, false);
SetSwitchLight(Hopper_4_LowLevel, Hopper_4_LowLevel_Set, false);
SetSwitchLight(WScale_1_HighLevel, WScale_1_HighLevel_Set, false);
SetSwitchLight(WScale_2_HighLevel, WScale_2_HighLevel_Set, false);
SetSwitchLight(WScale_3_HighLevel, WScale_3_HighLevel_Set, false);
SetSwitchLight(WScale_4_HighLevel, WScale_4_HighLevel_Set, false);
SetSwitchLight(WScale_1_LowLevel, WScale_1_LowLevel_Set, false);
SetSwitchLight(WScale_2_LowLevel, WScale_2_LowLevel_Set, false);
SetSwitchLight(WScale_3_LowLevel, WScale_3_LowLevel_Set, false);
SetSwitchLight(WScale_4_LowLevel, WScale_4_LowLevel_Set, false);
SetMCLabel(topPressure_V1, topPressure_V1_Set);
SetMCLabel(topPressure_V2, topPressure_V2_Set);
SetMCLabel(topPressure_V3, topPressure_V3_Set);
SetMCLabel(topPressure_V4, topPressure_V4_Set);
SetMCLabel(topPressure_V5, topPressure_V5_Set);
SetMCLabel(Vessel_1_ActWeight, Vessel_1_ActWeight_Set);
SetMCLabel(Vessel_2_ActWeight, Vessel_2_ActWeight_Set);
SetMCLabel(Vessel_3_ActWeight, Vessel_3_ActWeight_Set);
SetMCLabel(Vessel_4_ActWeight, Vessel_4_ActWeight_Set);
SetMCLabel(Vessel_5_ActWeight, Vessel_5_ActWeight_Set);
SetMCLabel(conveyV1_PV, conveyV1_PV_Set);
SetMCLabel(conveyV2_PV, conveyV2_PV_Set);
SetMCLabel(conveyV3_PV, conveyV3_PV_Set);
SetMCLabel(conveyV5_PV, conveyV5_PV_Set);
SetMCLabel(mainPress_V1_ActualValue, mainPress_V1_ActualValue_Set);
SetMCLabel(mainPress_V2_ActualValue, mainPress_V2_ActualValue_Set);
SetMCLabel(mainPress_V3_ActualValue, mainPress_V3_ActualValue_Set);
SetMCLabel(mainPress_V5_ActualValue, mainPress_V5_ActualValue_Set);
SetMCLabel(purgeV1_PV, purgeV1_PV_Set);
SetMCLabel(purgeV2_PV, purgeV2_PV_Set);
SetMCLabel(purgeV3_PV, purgeV3_PV_Set);
SetMCLabel(purgeV5_PV, purgeV5_PV_Set);
SetMCLabel(WScale_1_ActWeight, WScale_1_ActWeight_Set);
SetMCLabel(WScale_2_ActWeight, WScale_2_ActWeight_Set);
SetMCLabel(WScale_3_ActWeight, WScale_3_ActWeight_Set);
SetMCLabel(WScale_4_ActWeight, WScale_4_ActWeight_Set);
SetMCLabel(DM1DRY1_ACT_Speed, DM1DRY1_ACT_Speed_Set);
SetMCLabel(DM1DRY2_ACT_Speed, DM1DRY2_ACT_Speed_Set);
SetMCLabel(DM1DRY3_ACT_Speed, DM1DRY3_ACT_Speed_Set);
SetMCLabel(DM1DRY4_ACT_Speed, DM1DRY4_ACT_Speed_Set);
SetMCLabel(Hopper_1_ActWeight, Hopper_1_ActWeight_Set);
SetMCLabel(Hopper_2_ActWeight, Hopper_2_ActWeight_Set);
SetMCLabel(Hopper_3_ActWeight, Hopper_3_ActWeight_Set);
SetMCLabel(Hopper_4_ActWeight, Hopper_4_ActWeight_Set);
SetMCLabel(DM1GEM, DM1GEM_Set);
SetMCLabel(DM2GEM, DM2GEM_Set);
SetMCLabel(DM3GEM, DM3GEM_Set);
SetMCLabel(DM4GEM, DM4GEM_Set);
SetMCLabel(DM5GEM, DM5GEM_Set);
SetMCLabel(DM6GEM, DM6GEM_Set);
SetMCLabel(DM7GEM, DM7GEM_Set);
SetMCLabel(DM8GEM, DM8GEM_Set);
SetMCLabel(DM2ASF01, DM2ASF01_Set);
SetMCLabel(DM2BSF01, DM2BSF01_Set);
SetMCLabel(DM2CSF01, DM2CSF01_Set);
SetMCLabel(DM2DSF01, DM2DSF01_Set);
SetRSCREWBIG(DM1ASF01, DM1ASF01_Set);
SetRSCREWBIG(DM1BSF01, DM1BSF01_Set);
SetLSCREWBIG(DM1CSF01, DM1CSF01_Set);
SetLSCREWBIG(DM1DSF01, DM1DSF01_Set);
SetRSCREWBIG(DM1ESF01, DM1ESF01_Set);
SetLSCREWBIG(DM1FSF01, DM1FSF01_Set);
SetRSCREWBIG(DM1GSF01, DM1GSF01_Set);
SetRSCREWBIG(DM1HSF01, DM1HSF01_Set);
SetLSCREWBIG(DM1ISF01, DM1ISF01_Set);
SetLSCREWBIG(DM1JSF01, DM1JSF01_Set);
SetRSCREWBIG(DM1KSF01, DM1KSF01_Set);
SetRSCREWBIG(DM1LSF01, DM1LSF01_Set);
SetLSCREWBIG(DM1MSF01, DM1MSF01_Set);
SetLSCREWBIG(DM1NSF01, DM1NSF01_Set);
SetRSCREWBIG(DM1OSF01, DM1OSF01_Set);
SetLSCREWBIG(DM2ASF01L, DM2ASF01L_Set);
SetLSCREWBIG(DM2BSF01L, DM2BSF01L_Set);
SetLSCREWBIG(DM2CSF01L, DM2CSF01L_Set);
SetLSCREWBIG(DM2DSF01L, DM2DSF01L_Set);
SetRSCREWBIG(DM2ASF01R, DM2ASF01R_Set);
SetRSCREWBIG(DM2BSF01R, DM2BSF01R_Set);
SetRSCREWBIG(DM2CSF01R, DM2CSF01R_Set);
SetRSCREWBIG(DM2DSF01R, DM2DSF01R_Set);
SetJzf(AS1BLT01, AS1BLT01_Set);
SetJzf(AS1BLT02, AS1BLT02_Set);
SetJzf(AS1BLT03, AS1BLT03_Set);
SetJzf(AS1BLT04, AS1BLT04_Set);
SetJzf(AS1BLT05, AS1BLT05_Set);
SetJzf(AS2BLT01, AS2BLT01_Set);
SetJzf(AS2BLT02, AS2BLT02_Set);
SetJzf(AS2BLT03, AS2BLT03_Set);
SetJzf(AS2BLT04, AS2BLT04_Set);
SetJzf(AS2BLT05, AS2BLT05_Set);
SetJzf(AS3BLT01, AS3BLT01_Set);
SetJzf(AS3BLT02, AS3BLT02_Set);
SetJzf(AS3BLT03, AS3BLT03_Set);
SetJzf(AS3BLT04, AS3BLT04_Set);
SetJzf(AS3BLT05, AS3BLT05_Set);
SetJzf(AS4BLT01, AS4BLT01_Set);
SetJzf(AS4BLT03, AS4BLT03_Set);
SetJzf(AS5BLT01, AS5BLT01_Set);
SetJzf(AS5BLT02, AS5BLT02_Set);
SetJzf(AS5BLT03, AS5BLT03_Set);
SetJzf(AS5BLT04, AS5BLT04_Set);
SetJzf(AS5BLT05, AS5BLT05_Set);
SetJzf(AS2PCP01, AS2PCP01_Set);
SetJzf(AS2PCP02, AS2PCP02_Set);
SetJzf(AS2PCP03, AS2PCP03_Set);
SetJzf(AS1OIS01, AS1OIS01_Set);
SetJzf(AS1OIS02, AS1OIS02_Set);
SetJzf(AS1OIS03, AS1OIS03_Set);
SetJzf(AS2OIS01, AS2OIS01_Set);
SetJzf(AS2OIS02, AS2OIS02_Set);
SetJzf(AS2OIS03, AS2OIS03_Set);
SetJzf(AS3OIS01, AS3OIS01_Set);
SetJzf(AS3OIS02, AS3OIS02_Set);
SetJzf(AS3OIS03, AS3OIS03_Set);
SetJzf(AS4OIS01, AS4OIS01_Set);
SetJzf(AS4OIS02, AS4OIS02_Set);
SetJzf(AS4OIS03, AS4OIS03_Set);
SetJzf(AS1GET01, AS1GET01_Set);
SetJzf(AS1GET02, AS1GET02_Set);
SetJzf(AS2GET01, AS2GET01_Set);
SetJzf(AS2GET02, AS2GET02_Set);
SetJzf(AS3GET01, AS3GET01_Set);
SetJzf(AS3GET02, AS3GET02_Set);
SetJzf(AS4GET01, AS4GET01_Set);
SetJzf(AS4GET02, AS4GET02_Set);
SetJzf(AS5GET01, AS5GET01_Set);
SetJzf(AS5GET02, AS5GET02_Set);
SetJzf(AS6GET01, AS6GET01_Set);
SetJzf(AS6GET02, AS6GET02_Set);
SetJzf(AS7GET01, AS7GET01_Set);
SetJzf(AS7GET02, AS7GET02_Set);
SetJzf(AS8GET01, AS8GET01_Set);
SetJzf(AS8GET02, AS8GET02_Set);
SetFan(DM1ADF01, DM1ADF01_Set);
SetFan(DM1BDF01, DM1BDF01_Set);
SetFan(DM1CDF01, DM1CDF01_Set);
SetFan(DM1DDF01, DM1DDF01_Set);
SetFan(DM1EDF01, DM1EDF01_Set);
SetFan(DM1FDF01, DM1FDF01_Set);
SetFan(DM1GDF01, DM1GDF01_Set);
SetFan(DM1HDF01, DM1HDF01_Set);
SetFan(DM1IDF01, DM1IDF01_Set);
SetFan(DM1JDF01, DM1JDF01_Set);
SetFan(DM1KDF01, DM1KDF01_Set);
SetFan(DM1LDF01, DM1LDF01_Set);
SetFan(DM1ADB01, DM1ADB01_Set);
SetFan(DM1BDB01, DM1BDB01_Set);
SetFan(DM1CDB01, DM1CDB01_Set);
SetFan(DM1DDB01, DM1DDB01_Set);
SetFan(DM1EDB01, DM1EDB01_Set);
SetFan(DM1FDB01, DM1FDB01_Set);
SetFan(DM1GDB01, DM1GDB01_Set);
SetFan(DM1HDB01, DM1HDB01_Set);
SetFan(DM1IDB01, DM1IDB01_Set);
SetFan(DM1JDB01, DM1JDB01_Set);
SetFan(DM1KDB01, DM1KDB01_Set);
SetFan(DM1LDB01, DM1LDB01_Set);
SetFan(DM1DRY1_Running, DM1DRY1_Running_Set);
SetFan(DM1DRY2_Running, DM1DRY2_Running_Set);
SetFan(DM1DRY3_Running, DM1DRY3_Running_Set);
SetFan(DM1DRY4_Running, DM1DRY4_Running_Set);
SetFan(PM3ADF01, PM3ADF01_Set);
SetControlCabinet(PM1ADF01, PM1ADF01_Set);
SetControlCabinet(PM1BDF01, PM1BDF01_Set);
SetControlCabinet(PM1CDF01, PM1CDF01_Set);
SetControlCabinet(PM1DDF01, PM1DDF01_Set);
SetControlCabinet(PM1EDF01, PM1EDF01_Set);
SetControlCabinet(PM1FDF01, PM1FDF01_Set);
SetControlCabinet(PM1GDF01, PM1GDF01_Set);
SetControlCabinet(PM1HDF01, PM1HDF01_Set);
SetControlCabinet(PM1IDF01, PM1IDF01_Set);
SetControlCabinet(PM1JDF01, PM1JDF01_Set);
SetControlCabinet(PM1KDF01, PM1KDF01_Set);
SetControlCabinet(PM1LDF01, PM1LDF01_Set);
SetLjSwith(BU1ASF01, BU1ASF01_Set, BU1ASF01_Alarm);
SetLjSwith(BU1BSF01, BU1BSF01_Set, BU1BSF01_Alarm);
SetLjSwith(BU1CSF01, BU1CSF01_Set, BU1CSF01_Alarm);
SetLjSwith(BU1DSF01, BU1DSF01_Set, BU1DSF01_Alarm);
SetLjSwith(BU1ESF01, BU1ESF01_Set, BU1ESF01_Alarm);
SetLjSwith(BU1FSF01, BU1FSF01_Set, BU1FSF01_Alarm);
SetLjSwith(BU1GSF01, BU1GSF01_Set, BU1GSF01_Alarm);
SetLjSwith(BU1HSF01, BU1HSF01_Set, BU1HSF01_Alarm);
SetLjSwith(BU1ISF01, BU1ISF01_Set, BU1ISF01_Alarm);
SetLjSwith(BU1JSF01, BU1JSF01_Set, BU1JSF01_Alarm);
SetLjSwith(BU1KSF01, BU1KSF01_Set, BU1KSF01_Alarm);
SetLjSwith(BU1LSF01, BU1LSF01_Set, BU1LSF01_Alarm);
SetLjSwith(BU1MSF01, BU1MSF01_Set, BU1MSF01_Alarm);
SetLjSwith(BU1NSF01, BU1NSF01_Set, BU1NSF01_Alarm);
SetLjSwith(BU1OSF01, BU1OSF01_Set, BU1OSF01_Alarm);
SetLjSwith(BU1BLT01, BU1BLT01_Set, BU1BLT01_Alarm);
SetLjSwith(BU1BLT02, BU1BLT02_Set, BU1BLT02_Alarm);
SetLjSwith(BU1BLT03, BU1BLT03_Set, BU1BLT03_Alarm);
SetLjSwith(BU1BLT04, BU1BLT04_Set, BU1BLT04_Alarm);
SetLjSwith(BU1BLT05, BU1BLT05_Set, BU1BLT05_Alarm);
SetLjSwith(BU1BLT06, BU1BLT06_Set, BU1BLT06_Alarm);
SetLjSwith(BU1BLT07, BU1BLT07_Set, BU1BLT07_Alarm);
SetLjSwith(BU2BLT01, BU2BLT01_Set, BU2BLT01_Alarm);
SetLjSwith(BU2BLT02, BU2BLT02_Set, BU2BLT02_Alarm);
SetLjSwith(BU2BLT03, BU2BLT03_Set, BU2BLT03_Alarm);
SetLjSwith(BU2BLT04, BU2BLT04_Set, BU2BLT04_Alarm);
SetLjSwith(BU2BLT05, BU2BLT05_Set, BU2BLT05_Alarm);
SetLjSwith(BU3BLT01, BU3BLT01_Set, BU3BLT01_Alarm);
SetLjSwith(BU3BLT02, BU3BLT02_Set, BU3BLT02_Alarm);
SetLjSwith(BU3BLT03, BU3BLT03_Set, BU3BLT03_Alarm);
SetLjSwith(BU3BLT04, BU3BLT04_Set, BU3BLT04_Alarm);
SetLjSwith(BU3BLT05, BU3BLT05_Set, BU3BLT05_Alarm);
SetLjSwith(BU3BLT06, BU3BLT06_Set, BU3BLT06_Alarm);
SetLjSwith(BU3BLT07, BU3BLT07_Set, BU3BLT07_Alarm);
SetLjSwith(BU4BLT01, BU4BLT01_Set, BU4BLT01_Alarm);
SetLjSwith(BU4BLT02, BU4BLT02_Set, BU4BLT02_Alarm);
SetLjSwith(BU4BLT03, BU4BLT03_Set, BU4BLT03_Alarm);
SetLjSwith(BU4BLT04, BU4BLT04_Set, BU4BLT04_Alarm);
SetLjSwith(BU4BLT05, BU4BLT05_Set, BU4BLT05_Alarm);
SetLjSwith(BU4BLT06, BU4BLT06_Set, BU4BLT06_Alarm);
SetLjSwith(BU4BLT07, BU4BLT07_Set, BU4BLT07_Alarm);
SetLjSwith(BU5BLT01, BU5BLT01_Set, BU5BLT01_Alarm);
SetLjSwith(BU5BLT02, BU5BLT02_Set, BU5BLT02_Alarm);
SetLjSwith(BU5BLT03, BU5BLT03_Set, BU5BLT03_Alarm);
SetLjSwith(BU5BLT04, BU5BLT04_Set, BU5BLT04_Alarm);
SetLjSwith(BU1ADB01, BU1ADB01_Set, BU1ADB01_Alarm);
SetLjSwith(BU1BDB01, BU1BDB01_Set, BU1BDB01_Alarm);
SetLjSwith(BU1CDB01, BU1CDB01_Set, BU1CDB01_Alarm);
SetLjSwith(BU1DDB01, BU1DDB01_Set, BU1DDB01_Alarm);
SetLjSwith(BU1EDB01, BU1EDB01_Set, BU1EDB01_Alarm);
SetLjSwith(BU1FDB01, BU1FDB01_Set, BU1FDB01_Alarm);
SetLjSwith(BU1GDB01, BU1GDB01_Set, BU1GDB01_Alarm);
SetLjSwith(BU1HDB01, BU1HDB01_Set, BU1HDB01_Alarm);
SetLjSwith(BU1IDB01, BU1IDB01_Set, BU1IDB01_Alarm);
SetLjSwith(BU1JDB01, BU1JDB01_Set, BU1JDB01_Alarm);
SetLjSwith(BU1KDB01, BU1KDB01_Set, BU1KDB01_Alarm);
SetLjSwith(BU1LDB01, BU1LDB01_Set, BU1LDB01_Alarm);
SetLjSwith(BU1GEB02, BU1GEB02_Set, BU1GEB02_Alarm);
SetLjSwith(BU2GEB02, BU2GEB02_Set, BU2GEB02_Alarm);
SetLjSwith(BU3GEB02, BU3GEB02_Set, BU3GEB02_Alarm);
SetLjSwith(BU4GEB02, BU4GEB02_Set, BU4GEB02_Alarm);
SetLjSwith(BU5GEB02, BU5GEB02_Set, BU5GEB02_Alarm);
SetLjSwith(BU6GEB02, BU6GEB02_Set, BU6GEB02_Alarm);
SetLjSwith(BU7GEB02, BU7GEB02_Set, BU7GEB02_Alarm);
SetLjSwith(BU8GEB02, BU8GEB02_Set, BU8GEB02_Alarm);
SetLjSwith(BU1DRB01, BU1DRB01_Set, BU1DRB01_Alarm);
SetLjSwith(BU2DRB01, BU2DRB01_Set, BU2DRB01_Alarm);
SetLjSwith(BU3DRB01, BU3DRB01_Set, BU3DRB01_Alarm);
SetLjSwith(BU4DRB01, BU4DRB01_Set, BU4DRB01_Alarm);
SetLjSwith(BU1GEB01, BU1GEB01_Set, BU1GEB01_Alarm);
SetLjSwith(BU2GEB01, BU2GEB01_Set, BU2GEB01_Alarm);
SetLjSwith(BU3GEB01, BU3GEB01_Set, BU3GEB01_Alarm);
SetLjSwith(BU4GEB01, BU4GEB01_Set, BU4GEB01_Alarm);
SetLjSwith(BU5GEB01, BU5GEB01_Set, BU5GEB01_Alarm);
SetLjSwith(BU6GEB01, BU6GEB01_Set, BU6GEB01_Alarm);
SetLjSwith(BU7GEB01, BU7GEB01_Set, BU7GEB01_Alarm);
SetLjSwith(BU8GEB01, BU8GEB01_Set, BU8GEB01_Alarm);
SetLjSwith(BU2ASF01, BU2ASF01_Set, BU2ASF01_Alarm);
SetLjSwith(BU2ASF02, BU2ASF02_Set, BU2ASF02_Alarm);
SetLjSwith(BU2BSF01, BU2BSF01_Set, BU2BSF01_Alarm);
SetLjSwith(BU2BSF02, BU2BSF02_Set, BU2BSF02_Alarm);
SetLjSwith(BU2CSF01, BU2CSF01_Set, BU2CSF01_Alarm);
SetLjSwith(BU2CSF02, BU2CSF02_Set, BU2CSF02_Alarm);
SetLjSwith(BU2DSF01, BU2DSF01_Set, BU2DSF01_Alarm);
SetLjSwith(BU2DSF02, BU2DSF02_Set, BU2DSF02_Alarm);
SetLjSwith(BUWeter1, BUWeter1_Set, BUWeter1_Alarm);
SetLjSwith(BUWeter2, BUWeter2_Set, BUWeter2_Alarm);
SetLjSwith(BUWeter3, BUWeter3_Set, BUWeter3_Alarm);
SetLjSwith(BUWeter4, BUWeter4_Set, BUWeter4_Alarm);
SetLjSwith(BUWeter5, BUWeter5_Set, BUWeter5_Alarm);
SetLjSwith(BUWeter6, BUWeter6_Set, BUWeter6_Alarm);
SetLjSwith(BUWeter7, BUWeter7_Set, BUWeter7_Alarm);
SetLjSwith(BUWeter8, BUWeter8_Set, BUWeter8_Alarm);
SetThreeWayValve(DV2PCP01, DV2PCP01_AlarmR, DV2PCP01_SetR, DV2PCP01_AlarmL, DV2PCP01_SetL);
SetThreeWayValve(DV2PCP02, DV2PCP02_AlarmR, DV2PCP02_SetR, DV2PCP02_AlarmL, DV2PCP02_SetL);
SetThreeWayValve(DV2PCP03, DV2PCP03_AlarmR, DV2PCP03_SetR, DV2PCP03_AlarmL, DV2PCP03_SetL);
SetThreeWayValve(DV2PCP04, DV2PCP04_AlarmR, DV2PCP04_SetR, DV2PCP04_AlarmL, DV2PCP04_SetL);
SetThreeWayValve(DV2PCP05, DV2PCP05_AlarmR, DV2PCP05_SetR, DV2PCP05_AlarmL, DV2PCP05_SetL);
SetThreeWayValve(DV2PCP06, DV2PCP06_AlarmR, DV2PCP06_SetR, DV2PCP06_AlarmL, DV2PCP06_SetL);
SetThreeWayValve(DV2PCP07, DV2PCP07_AlarmR, DV2PCP07_SetR, DV2PCP07_AlarmL, DV2PCP07_SetL);
SetThreeWayValve(DV2PCP08, DV2PCP08_AlarmR, DV2PCP08_SetR, DV2PCP08_AlarmL, DV2PCP08_SetL);
SetThreeWayValve(DV2PCP09, DV2PCP09_AlarmR, DV2PCP09_SetR, DV2PCP09_AlarmL, DV2PCP09_SetL);
SetThreeWayValve(DV2PCP10, DV2PCP10_AlarmR, DV2PCP10_SetR, DV2PCP10_AlarmL, DV2PCP10_SetL);
SetThreeWayValve(DV2PCP11, DV2PCP11_AlarmR, DV2PCP11_SetR, DV2PCP11_AlarmL, DV2PCP11_SetL);
SetThreeWayValve(DV2PCP12, DV2PCP12_AlarmR, DV2PCP12_SetR, DV2PCP12_AlarmL, DV2PCP12_SetL);
SetThreeWayValve(DV2PCP13, DV2PCP13_AlarmR, DV2PCP13_SetR, DV2PCP13_AlarmL, DV2PCP13_SetL);
}
/// <summary>
/// 看门狗
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetStateButton(StateButton obj, bool set)
{
if (set == true)
{
obj.Status = StateButton.Statuses.sssRun;
}
else
{
obj.Status = StateButton.Statuses.sssStop;
}
}
public StateButton GetStateButton(string name)
{
return Controls.First(x => x.Name == name) as StateButton;
}
/// <summary>
/// 停止状态
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetSystemStateShow(SystemStateShow obj, bool set)
{
if (set == true)
{
obj.Status = SystemStateShow.Statuses.sssRun;
}
else
{
obj.Status = SystemStateShow.Statuses.sssStop;
}
}
public SystemStateShow GetSystemStateShow(string name)
{
return Controls.First(x => x.Name == name) as SystemStateShow;
}
/// <summary>
/// 指示灯
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
/// <param name="alarm"></param>
public void SetSwitchLight(SwitchLight obj, bool set, bool alarm)
{
if (set == true || alarm == false)
{
obj.Status = SwitchLight.Statuses.ylMove;
}
else if(alarm == true)
{
obj.Status = SwitchLight.Statuses.ylAlarm;
}
else
{
obj.Status = SwitchLight.Statuses.ylNormal;
}
}
public SwitchLight GetSwitchLight(string name)
{
return Controls.First(x => x.Name == name) as SwitchLight;
}
/// <summary>
/// 阀门
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
/// <param name="alarm"></param>
public void SetLjSwith(LjSwith obj, bool set, bool alarm)
{
obj.Alarm = alarm;
obj.Set = set;
}
public LjSwith GetLjSwith(string name)
{
return Controls.First(x => x.Name == name) as LjSwith;
}
/// <summary>
/// 螺旋给料器R
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetRSCREWBIG(RSCREWBIG obj, bool set)
{
if (set == true)
{
obj.Status = RSCREWBIG.Statuses.ylMove;
}
else
{
obj.Status = RSCREWBIG.Statuses.ylNormal;
}
}
public RSCREWBIG GetRSCREWBIG(string name)
{
return Controls.First(x => x.Name == name) as RSCREWBIG;
}
/// <summary>
/// 螺旋给料器L
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetLSCREWBIG(LSCREWBIG obj, bool set)
{
if (set == true)
{
obj.Status = LSCREWBIG.Statuses.ylMove;
}
else
{
obj.Status = LSCREWBIG.Statuses.ylNormal;
}
}
public LSCREWBIG GetLSCREWBIG(string name)
{
return Controls.First(x => x.Name == name) as LSCREWBIG;
}
/// <summary>
/// 脚座阀
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetJzf(Jzf obj, bool set)
{
if (set == true)
{
obj.Status = Jzf.Statuses.TurnOn;
}
else
{
obj.Status = Jzf.Statuses.TurnOff;
}
}
public Jzf GetJzf(string name)
{
return Controls.First(x => x.Name == name) as Jzf;
}
/// <summary>
/// 文本标签
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetMCLabel(MCLabel obj, float set)
{
obj.Text = Convert.ToString(set);
}
public MCLabel GetMCLabel(string name)
{
return Controls.First(x => x.Name == name) as MCLabel;
}
/// <summary>
/// 三通
/// </summary>
/// <param name="obj"></param>
/// <param name="alarmr"></param>
/// <param name="setr"></param>
/// <param name="alarml"></param>
/// <param name="setl"></param>
public void SetThreeWayValve(ThreeWayValve obj, bool alarmr, bool setr, bool alarml, bool setl)
{
obj.ZLTValue = setr;
obj.ZLDValue = setl;
obj.ALMTValue = alarmr;
obj.ALMDValue = alarml;
}
public ThreeWayValve GetThreeWayValve(string name)
{
return Controls.First(x => x.Name == name) as ThreeWayValve;
}
/// <summary>
/// 风扇电机
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetFan(Fan obj, bool set)
{
if (set == true)
{
obj.Status = Fan.Statuses.zsTurnOn;
}
else
{
obj.Status = Fan.Statuses.zsTurnOff;
}
}
public Fan GetFan(string name)
{
return Controls.First(x => x.Name == name) as Fan;
}
/// <summary>
/// 称量柜
/// </summary>
/// <param name="obj"></param>
/// <param name="set"></param>
public void SetControlCabinet(ControlCabinet obj, bool set)
{
if (set == true)
{
obj.Status = ControlCabinet.Statuses.TurnOn;
}
else
{
obj.Status = ControlCabinet.Statuses.TurnOff;
}
}
public ControlCabinet GetControlCabinet(string name)
{
return Controls.First(x => x.Name == name) as ControlCabinet;
}
}
}