|
|
|
@ -14,6 +14,7 @@ using Microsoft.Office.Interop.Excel;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Concurrent;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data.SqlTypes;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
@ -844,6 +845,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
DB2102 = new DB2102Helper();
|
|
|
|
|
DB2103 = new DB2103Helper();
|
|
|
|
|
DB2107 = new DB2107Helper();
|
|
|
|
@ -854,7 +856,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
SetControl();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
timer = new Timer();
|
|
|
|
|
timer.Interval = 1000;
|
|
|
|
|
timer.Enabled = true;
|
|
|
|
@ -862,7 +863,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// DB2102数据读取、控件赋值
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void NewThreadDb2102()
|
|
|
|
|
{
|
|
|
|
|
BU1ASF01_Set = DB2102.BU1ASF01.Set;
|
|
|
|
@ -961,6 +964,64 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
BUWeter7_Set = DB2102.BUWeter7.Set;
|
|
|
|
|
BUWeter8_Set = DB2102.BUWeter8.Set;
|
|
|
|
|
|
|
|
|
|
BU1ASF01_Alarm = DB2102.BU1ASF01.Alarm;
|
|
|
|
|
BU1BSF01_Alarm = DB2102.BU1BSF01.Alarm;
|
|
|
|
|
BU1CSF01_Alarm = DB2102.BU1CSF01.Alarm;
|
|
|
|
|
BU1DSF01_Alarm = DB2102.BU1DSF01.Alarm;
|
|
|
|
|
BU1ESF01_Alarm = DB2102.BU1ESF01.Alarm;
|
|
|
|
|
BU1FSF01_Alarm = DB2102.BU1FSF01.Alarm;
|
|
|
|
|
BU1GSF01_Alarm = DB2102.BU1GSF01.Alarm;
|
|
|
|
|
BU1HSF01_Alarm = DB2102.BU1HSF01.Alarm;
|
|
|
|
|
BU1ISF01_Alarm = DB2102.BU1ISF01.Alarm;
|
|
|
|
|
BU1JSF01_Alarm = DB2102.BU1JSF01.Alarm;
|
|
|
|
|
BU1KSF01_Alarm = DB2102.BU1KSF01.Alarm;
|
|
|
|
|
BU1LSF01_Alarm = DB2102.BU1LSF01.Alarm;
|
|
|
|
|
BU1MSF01_Alarm = DB2102.BU1MSF01.Alarm;
|
|
|
|
|
BU1NSF01_Alarm = DB2102.BU1NSF01.Alarm;
|
|
|
|
|
BU1OSF01_Alarm = DB2102.BU1OSF01.Alarm;
|
|
|
|
|
BU1BLT01_Alarm = DB2102.BU1BLT01.Alarm;
|
|
|
|
|
BU1BLT02_Alarm = DB2102.BU1BLT02.Alarm;
|
|
|
|
|
BU1BLT03_Alarm = DB2102.BU1BLT03.Alarm;
|
|
|
|
|
BU1BLT04_Alarm = DB2102.BU1BLT04.Alarm;
|
|
|
|
|
BU1BLT05_Alarm = DB2102.BU1BLT05.Alarm;
|
|
|
|
|
BU1BLT06_Alarm = DB2102.BU1BLT06.Alarm;
|
|
|
|
|
BU1BLT07_Alarm = DB2102.BU1BLT07.Alarm;
|
|
|
|
|
BU2BLT01_Alarm = DB2102.BU2BLT01.Alarm;
|
|
|
|
|
BU2BLT02_Alarm = DB2102.BU2BLT02.Alarm;
|
|
|
|
|
BU2BLT03_Alarm = DB2102.BU2BLT03.Alarm;
|
|
|
|
|
BU2BLT04_Alarm = DB2102.BU2BLT04.Alarm;
|
|
|
|
|
BU2BLT05_Alarm = DB2102.BU2BLT05.Alarm;
|
|
|
|
|
BU3BLT01_Alarm = DB2102.BU3BLT01.Alarm;
|
|
|
|
|
BU3BLT02_Alarm = DB2102.BU3BLT02.Alarm;
|
|
|
|
|
BU3BLT03_Alarm = DB2102.BU3BLT03.Alarm;
|
|
|
|
|
BU3BLT04_Alarm = DB2102.BU3BLT04.Alarm;
|
|
|
|
|
BU3BLT05_Alarm = DB2102.BU3BLT05.Alarm;
|
|
|
|
|
BU3BLT06_Alarm = DB2102.BU3BLT06.Alarm;
|
|
|
|
|
BU3BLT07_Alarm = DB2102.BU3BLT07.Alarm;
|
|
|
|
|
BU4BLT01_Alarm = DB2102.BU4BLT01.Alarm;
|
|
|
|
|
BU4BLT02_Alarm = DB2102.BU4BLT02.Alarm;
|
|
|
|
|
BU4BLT03_Alarm = DB2102.BU4BLT03.Alarm;
|
|
|
|
|
BU4BLT04_Alarm = DB2102.BU4BLT04.Alarm;
|
|
|
|
|
BU4BLT05_Alarm = DB2102.BU4BLT05.Alarm;
|
|
|
|
|
BU4BLT06_Alarm = DB2102.BU4BLT06.Alarm;
|
|
|
|
|
BU4BLT07_Alarm = DB2102.BU4BLT07.Alarm;
|
|
|
|
|
BU5BLT01_Alarm = DB2102.BU5BLT01.Alarm;
|
|
|
|
|
BU5BLT02_Alarm = DB2102.BU5BLT02.Alarm;
|
|
|
|
|
BU5BLT03_Alarm = DB2102.BU5BLT03.Alarm;
|
|
|
|
|
BU5BLT04_Alarm = DB2102.BU5BLT04.Alarm;
|
|
|
|
|
BU1ADB01_Alarm = DB2102.BU1ADB01.Alarm;
|
|
|
|
|
BU1BDB01_Alarm = DB2102.BU1BDB01.Alarm;
|
|
|
|
|
BU1CDB01_Alarm = DB2102.BU1CDB01.Alarm;
|
|
|
|
|
BU1DDB01_Alarm = DB2102.BU1DDB01.Alarm;
|
|
|
|
|
BU1EDB01_Alarm = DB2102.BU1EDB01.Alarm;
|
|
|
|
|
BU1FDB01_Alarm = DB2102.BU1FDB01.Alarm;
|
|
|
|
|
BU1GDB01_Alarm = DB2102.BU1GDB01.Alarm;
|
|
|
|
|
BU1HDB01_Alarm = DB2102.BU1HDB01.Alarm;
|
|
|
|
|
BU1IDB01_Alarm = DB2102.BU1IDB01.Alarm;
|
|
|
|
|
BU1JDB01_Alarm = DB2102.BU1JDB01.Alarm;
|
|
|
|
|
BU1KDB01_Alarm = DB2102.BU1KDB01.Alarm;
|
|
|
|
|
BU1LDB01_Alarm = DB2102.BU1LDB01.Alarm;
|
|
|
|
|
|
|
|
|
|
BU1GEB02_Alarm = DB2102.BU1GEB02.Alarm;
|
|
|
|
|
BU2GEB02_Alarm = DB2102.BU2GEB02.Alarm;
|
|
|
|
|
BU3GEB02_Alarm = DB2102.BU3GEB02.Alarm;
|
|
|
|
@ -1055,8 +1116,120 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
DV2PCP11_AlarmR = DB2102.DV2PCP11.AlarmRightPosition;
|
|
|
|
|
DV2PCP12_AlarmR = DB2102.DV2PCP12.AlarmRightPosition;
|
|
|
|
|
DV2PCP13_AlarmR = DB2102.DV2PCP13.AlarmRightPosition;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// DB2103数据读取、控件赋值
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void NewThreadDb2103()
|
|
|
|
|
{
|
|
|
|
|
DM1DRY1_ACT_Speed_Set = DB2103.DM1DRY1.ACT_Speed;
|
|
|
|
@ -1198,9 +1371,86 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
DM1DRY3_Running_Set = DB2103.DM1DRY3.Running;
|
|
|
|
|
DM1DRY4_Running_Set = DB2103.DM1DRY4.Running;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SetMCLabel(DM1DRY1_ACT_Speed, (float)Math.Round(DM1DRY1_ACT_Speed_Set, 2));
|
|
|
|
|
SetMCLabel(DM1DRY2_ACT_Speed, (float)Math.Round(DM1DRY2_ACT_Speed_Set, 2));
|
|
|
|
|
SetMCLabel(DM1DRY3_ACT_Speed, (float)Math.Round(DM1DRY3_ACT_Speed_Set, 2));
|
|
|
|
|
SetMCLabel(DM1DRY4_ACT_Speed, (float)Math.Round(DM1DRY4_ACT_Speed_Set, 2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetMCLabel(DM1GEM, (float)Math.Round(DM1GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM2GEM, (float)Math.Round(DM2GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM3GEM, (float)Math.Round(DM3GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM4GEM, (float)Math.Round(DM4GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM5GEM, (float)Math.Round(DM5GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM6GEM, (float)Math.Round(DM6GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM7GEM, (float)Math.Round(DM7GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM8GEM, (float)Math.Round(DM8GEM_Set, 2));
|
|
|
|
|
SetMCLabel(DM2ASF01, (float)Math.Round(DM2ASF01_Set, 2));
|
|
|
|
|
SetMCLabel(DM2BSF01, (float)Math.Round(DM2BSF01_Set, 2));
|
|
|
|
|
SetMCLabel(DM2CSF01, (float)Math.Round(DM2CSF01_Set, 2));
|
|
|
|
|
SetMCLabel(DM2DSF01, (float)Math.Round(DM2DSF01_Set, 2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// DB2107数据读取、控件赋值
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void NewThreadDb2107()
|
|
|
|
|
{
|
|
|
|
|
WatchDog_Set = DB2107.NormalStatus.WatchDog >= 1 ? true : false;
|
|
|
|
@ -1283,7 +1533,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
Hopper_1_ActWeight_Set = DB2107.Weight.Hopper_1.ActWeight;
|
|
|
|
|
Hopper_2_ActWeight_Set = DB2107.Weight.Hopper_2.ActWeight;
|
|
|
|
|
Hopper_3_ActWeight_Set = DB2107.Weight.Hopper_3.ActWeight;
|
|
|
|
|
Hopper_4_ActWeight_Set = DB2107.Weight.Hopper_4.ActWeight;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AS1BLT01_Set = DB2107.Valve.AS1BLT01;
|
|
|
|
@ -1353,37 +1606,197 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
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();
|
|
|
|
|
SetStateButton(WatchDog, WatchDog_Set);
|
|
|
|
|
SetSystemStateShow(EMStop, EMStop_Set);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conCurrentCache.TryAdd("plc", DateTime.Now);
|
|
|
|
|
NewThreadDb2102();
|
|
|
|
|
NewThreadDb2107();
|
|
|
|
|
NewThreadDb2103();
|
|
|
|
|
SetControlValue();
|
|
|
|
|
conCurrentCache.Clear();
|
|
|
|
|
stopwatch.Stop();
|
|
|
|
|
var send = stopwatch.ElapsedMilliseconds;
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("线束"+ send);
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conCurrentCache.Clear();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("被过滤");
|
|
|
|
|
}
|
|
|
|
|
SetMCLabel(topPressure_V1, (float)Math.Round(topPressure_V2_Set, 2));
|
|
|
|
|
SetMCLabel(topPressure_V2, (float)Math.Round(topPressure_V2_Set, 2));
|
|
|
|
|
SetMCLabel(topPressure_V3, (float)Math.Round(topPressure_V3_Set, 2));
|
|
|
|
|
SetMCLabel(topPressure_V4, (float)Math.Round(topPressure_V4_Set, 2));
|
|
|
|
|
SetMCLabel(topPressure_V5, (float)Math.Round(topPressure_V5_Set, 2));
|
|
|
|
|
SetMCLabel(Vessel_1_ActWeight, (float)Math.Round(Vessel_1_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Vessel_2_ActWeight, (float)Math.Round(Vessel_2_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Vessel_3_ActWeight, (float)Math.Round(Vessel_3_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Vessel_4_ActWeight, (float)Math.Round(Vessel_4_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Vessel_5_ActWeight, (float)Math.Round(Vessel_5_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(conveyV1_PV, (float)Math.Round(conveyV1_PV_Set, 2));
|
|
|
|
|
SetMCLabel(conveyV2_PV, (float)Math.Round(conveyV2_PV_Set, 2));
|
|
|
|
|
SetMCLabel(conveyV3_PV, (float)Math.Round(conveyV3_PV_Set, 2));
|
|
|
|
|
SetMCLabel(conveyV5_PV, (float)Math.Round(conveyV5_PV_Set, 2));
|
|
|
|
|
SetMCLabel(mainPress_V1_ActualValue, (float)Math.Round(mainPress_V1_ActualValue_Set, 2));
|
|
|
|
|
SetMCLabel(mainPress_V2_ActualValue, (float)Math.Round(mainPress_V2_ActualValue_Set, 2));
|
|
|
|
|
SetMCLabel(mainPress_V3_ActualValue, (float)Math.Round(mainPress_V3_ActualValue_Set, 2));
|
|
|
|
|
SetMCLabel(mainPress_V5_ActualValue, (float)Math.Round(mainPress_V5_ActualValue_Set, 2));
|
|
|
|
|
SetMCLabel(purgeV1_PV, (float)Math.Round(purgeV1_PV_Set, 2));
|
|
|
|
|
SetMCLabel(purgeV2_PV, (float)Math.Round(purgeV2_PV_Set, 2));
|
|
|
|
|
SetMCLabel(purgeV3_PV, (float)Math.Round(purgeV3_PV_Set, 2));
|
|
|
|
|
SetMCLabel(purgeV5_PV, (float)Math.Round(purgeV5_PV_Set, 2));
|
|
|
|
|
SetMCLabel(WScale_1_ActWeight, (float)Math.Round(WScale_1_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(WScale_2_ActWeight, (float)Math.Round(WScale_2_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(WScale_3_ActWeight, (float)Math.Round(WScale_3_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(WScale_4_ActWeight, (float)Math.Round(WScale_4_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Hopper_1_ActWeight, (float)Math.Round(Hopper_1_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Hopper_2_ActWeight, (float)Math.Round(Hopper_2_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Hopper_3_ActWeight, (float)Math.Round(Hopper_3_ActWeight_Set, 2));
|
|
|
|
|
SetMCLabel(Hopper_4_ActWeight, (float)Math.Round(Hopper_4_ActWeight_Set, 2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 新建PLC读取线程
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="obj"></param>
|
|
|
|
|
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();
|
|
|
|
|
conCurrentCache.Clear();
|
|
|
|
|
stopwatch.Stop();
|
|
|
|
|
var send = stopwatch.ElapsedMilliseconds;
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("线束"+ send);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conCurrentCache.Clear();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("被过滤");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(Exception)
|
|
|
|
|
{
|
|
|
|
@ -1732,12 +2145,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Plc读数
|
|
|
|
|
/// Plc读数线程池,定时器退出删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void GetPlcValue(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (GetAllDbMCControlsByOption(DbOptionTypes.None).Count == 0)
|
|
|
|
|
int x = GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count;
|
|
|
|
|
if (GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count == 0)
|
|
|
|
|
{
|
|
|
|
|
timer.Stop();
|
|
|
|
|
timer.Dispose();
|
|
|
|
@ -1745,356 +2158,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#region 控件交互
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 看门狗
|
|
|
|
@ -2148,7 +2215,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
/// <param name="alarm"></param>
|
|
|
|
|
public void SetSwitchLight(SwitchLight obj, bool set, bool alarm)
|
|
|
|
|
{
|
|
|
|
|
if (set == true || alarm == false)
|
|
|
|
|
if (set == true && alarm == false)
|
|
|
|
|
{
|
|
|
|
|
obj.Status = SwitchLight.Statuses.ylMove;
|
|
|
|
|
}
|
|
|
|
@ -2175,8 +2242,21 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
/// <param name="alarm"></param>
|
|
|
|
|
public void SetLjSwith(LjSwith obj, bool set, bool alarm)
|
|
|
|
|
{
|
|
|
|
|
obj.Alarm = alarm;
|
|
|
|
|
obj.Set = set;
|
|
|
|
|
if (set == true && alarm == false)
|
|
|
|
|
{
|
|
|
|
|
obj.Set = true;
|
|
|
|
|
obj.Alarm = false;
|
|
|
|
|
}
|
|
|
|
|
else if(alarm == true)
|
|
|
|
|
{
|
|
|
|
|
obj.Set = false;
|
|
|
|
|
obj.Alarm = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
obj.Set = false;
|
|
|
|
|
obj.Alarm = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LjSwith GetLjSwith(string name)
|
|
|
|
@ -2329,5 +2409,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
|
|
|
|
|
{
|
|
|
|
|
return Controls.First(x => x.Name == name) as ControlCabinet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|