|
@@ -1,7 +1,12 @@
|
|
using System;
|
|
using System;
|
|
|
|
+using System.Reflection;
|
|
using Aitex.Core.RT.Log;
|
|
using Aitex.Core.RT.Log;
|
|
using Aitex.Core.RT.Routine;
|
|
using Aitex.Core.RT.Routine;
|
|
using Aitex.Core.RT.SCCore;
|
|
using Aitex.Core.RT.SCCore;
|
|
|
|
+using Virgo_DCommon;
|
|
|
|
+using Virgo_DRT.Devices;
|
|
|
|
+using Virgo_DRT.Modules.PMs;
|
|
|
|
+using Virgo_DCommon;
|
|
using Virgo_DRT.Devices;
|
|
using Virgo_DRT.Devices;
|
|
|
|
|
|
namespace Virgo_DRT.Modules.PMs
|
|
namespace Virgo_DRT.Modules.PMs
|
|
@@ -19,13 +24,20 @@ namespace Virgo_DRT.Modules.PMs
|
|
OpenPumpingValve,
|
|
OpenPumpingValve,
|
|
|
|
|
|
OpenGasFinalValve,
|
|
OpenGasFinalValve,
|
|
|
|
+ CloseGasFinalValve,
|
|
|
|
|
|
OpenMfc1Valve,
|
|
OpenMfc1Valve,
|
|
OpenMfc2Valve,
|
|
OpenMfc2Valve,
|
|
OpenMfc3Valve,
|
|
OpenMfc3Valve,
|
|
OpenMfc4Valve,
|
|
OpenMfc4Valve,
|
|
- OpenMfc5Valve,
|
|
|
|
-
|
|
|
|
|
|
+ //OpenMfc5Valve,
|
|
|
|
+ CloseMfc1Valve,
|
|
|
|
+ CloseMfc2Valve,
|
|
|
|
+ CloseMfc3Valve,
|
|
|
|
+ CloseMfc4Valve,
|
|
|
|
+ //CloseMfc5Valve,
|
|
|
|
+ StartFlow,
|
|
|
|
+ StopFlow,
|
|
RecordStartPressure,
|
|
RecordStartPressure,
|
|
|
|
|
|
RecordEndPressure,
|
|
RecordEndPressure,
|
|
@@ -51,13 +63,13 @@ namespace Virgo_DRT.Modules.PMs
|
|
// Fields
|
|
// Fields
|
|
private double _beginPressure = 0;
|
|
private double _beginPressure = 0;
|
|
private double _endPressure = 0;
|
|
private double _endPressure = 0;
|
|
- private double _lowerLimitPressure;
|
|
|
|
- private double _upperLimitPressure;
|
|
|
|
- private int _leakCheckTimeLimit;
|
|
|
|
- private int _leakCheckPumpTimeLimit;
|
|
|
|
private double _leakRate;
|
|
private double _leakRate;
|
|
public double LeakRate { get; private set; }
|
|
public double LeakRate { get; private set; }
|
|
-
|
|
|
|
|
|
+ private int _leakCheckPumpDownTime;
|
|
|
|
+ private int _leakCheckWaitTime;
|
|
|
|
+ private LeakCheckMode _mode;
|
|
|
|
+ private bool[] _enableGasLine = new bool[5];
|
|
|
|
+ private double[] _mfcFlow = new double[5];
|
|
private readonly PumpDownRoutine _pumpdownRoutine;
|
|
private readonly PumpDownRoutine _pumpdownRoutine;
|
|
|
|
|
|
// Properties
|
|
// Properties
|
|
@@ -84,16 +96,41 @@ namespace Virgo_DRT.Modules.PMs
|
|
CheckSlitDoor() == Result.RUN &&
|
|
CheckSlitDoor() == Result.RUN &&
|
|
CheckDryPump() == Result.RUN)
|
|
CheckDryPump() == Result.RUN)
|
|
{
|
|
{
|
|
|
|
+ _enableGasLine = new bool[5] { false, false, false, false, false };
|
|
|
|
+ _mfcFlow = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 };
|
|
|
|
+
|
|
Reset();
|
|
Reset();
|
|
|
|
|
|
delayTimer.Start(0);
|
|
delayTimer.Start(0);
|
|
|
|
|
|
- //_lowerLimitPressure = SC.GetValue<double>($"{ Module}.Pump.PumpLowerLimitPressure");
|
|
|
|
- //_upperLimitPressure = SC.GetValue<double>($"{ Module}.Pump.PumpUpperLimitPressure");
|
|
|
|
- _leakCheckPumpTimeLimit = SC.GetValue<int>($"{Module}.Pump.LeakCheckPumpingTime");
|
|
|
|
- _leakCheckTimeLimit = SC.GetValue<int>($"{Module}.Pump.LeakCheckWaitTime");
|
|
|
|
- _leakRate = SC.GetValue<double>($"{Module}.Pump.LeakRate");
|
|
|
|
- //_intLeakMode = SC.GetValue<int>($"{Module}.Pump.LeakCheckMode");
|
|
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ if (objs.Length == 0)
|
|
|
|
+ {
|
|
|
|
+ _leakCheckPumpDownTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckPumpingTime");
|
|
|
|
+ _leakCheckWaitTime = SC.GetValue<int>($"{Module}.Pump.LeakCheckWaitTime");
|
|
|
|
+ _leakRate = SC.GetValue<double>($"{Module}.Pump.LeakRate");
|
|
|
|
+ _mode = LeakCheckMode.ChamberOnly;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ _leakCheckPumpDownTime = Convert.ToInt32(objs[0].ToString());
|
|
|
|
+ _leakCheckWaitTime = Convert.ToInt32(objs[1].ToString());
|
|
|
|
+ _mode = (LeakCheckMode)Enum.Parse(typeof(LeakCheckMode), objs[2].ToString());
|
|
|
|
+ _leakRate = Convert.ToInt32(objs[3].ToString());
|
|
|
|
+ for (int i = 0; i < 5; i++)
|
|
|
|
+ _enableGasLine[i] = Convert.ToBoolean(objs[4 + i].ToString());
|
|
|
|
+ }
|
|
|
|
+ for (int i = 0; i < 5; i++)
|
|
|
|
+ {
|
|
|
|
+ if (_enableGasLine[i]) _mfcFlow[i] = SC.GetValue<int>($"{Module}.MfcGas{i + 1}.MfcN2Scale");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ LOG.Write(ex);
|
|
|
|
+ return Result.FAIL;
|
|
|
|
+ }
|
|
|
|
|
|
return Result.RUN;
|
|
return Result.RUN;
|
|
}
|
|
}
|
|
@@ -107,24 +144,77 @@ namespace Virgo_DRT.Modules.PMs
|
|
{
|
|
{
|
|
ExecuteRoutine((int)LeakCheckStep.PumpDown, _pumpdownRoutine);
|
|
ExecuteRoutine((int)LeakCheckStep.PumpDown, _pumpdownRoutine);
|
|
|
|
|
|
- TimeDelay((int)LeakCheckStep.PumpDownDelay, _leakCheckPumpTimeLimit);
|
|
|
|
|
|
+ if (_mode == LeakCheckMode.ChamberOnly)
|
|
|
|
+ {
|
|
|
|
+ ;
|
|
|
|
+ }
|
|
|
|
+ else if (_mode == LeakCheckMode.ChamberAndGasLine)
|
|
|
|
+ {
|
|
|
|
+ OpenValve((int)LeakCheckStep.OpenGasFinalValve, ValveType.PROCESS, true);
|
|
|
|
+ if (_enableGasLine[0]) OpenValve((int)LeakCheckStep.OpenMfc1Valve, ValveType.Mfc1, true);
|
|
|
|
+ if (_enableGasLine[1]) OpenValve((int)LeakCheckStep.OpenMfc2Valve, ValveType.Mfc2, true);
|
|
|
|
+ if (_enableGasLine[2]) OpenValve((int)LeakCheckStep.OpenMfc3Valve, ValveType.Mfc3, true);
|
|
|
|
+ if (_enableGasLine[3]) OpenValve((int)LeakCheckStep.OpenMfc4Valve, ValveType.Mfc4, true);
|
|
|
|
+ //if (_enableGasLine[4]) OpenValve((int)LeakCheckStep.OpenMfc5Valve, ValveType.Mfc5, true);
|
|
|
|
+ }
|
|
|
|
+ else if (_mode == LeakCheckMode.ChamberAndGasLineAndFAC)
|
|
|
|
+ {
|
|
|
|
+ OpenValve((int)LeakCheckStep.OpenGasFinalValve, ValveType.PROCESS, true);
|
|
|
|
+ if (_enableGasLine[0]) OpenValve((int)LeakCheckStep.OpenMfc1Valve, ValveType.Mfc1, true);
|
|
|
|
+ if (_enableGasLine[1]) OpenValve((int)LeakCheckStep.OpenMfc2Valve, ValveType.Mfc2, true);
|
|
|
|
+ if (_enableGasLine[2]) OpenValve((int)LeakCheckStep.OpenMfc3Valve, ValveType.Mfc3, true);
|
|
|
|
+ if (_enableGasLine[3]) OpenValve((int)LeakCheckStep.OpenMfc4Valve, ValveType.Mfc4, true);
|
|
|
|
+ //if (_enableGasLine[4]) OpenValve((int)LeakCheckStep.OpenMfc5Valve, ValveType.Mfc5, true);
|
|
|
|
+
|
|
|
|
+ StartFlowMFC((int)LeakCheckStep.StartFlow, _mfcFlow);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ TimeDelay((int)LeakCheckStep.PumpDownDelay, _leakCheckPumpDownTime);
|
|
|
|
|
|
OpenValve((int)LeakCheckStep.ClosePumpValve, ValveType.FAST_PUMP, false);
|
|
OpenValve((int)LeakCheckStep.ClosePumpValve, ValveType.FAST_PUMP, false);
|
|
|
|
|
|
|
|
+
|
|
//记录腔体Start pressure P1
|
|
//记录腔体Start pressure P1
|
|
RecordBeginPressure((int)LeakCheckStep.RecordStartPressure);
|
|
RecordBeginPressure((int)LeakCheckStep.RecordStartPressure);
|
|
|
|
|
|
//pump down delay
|
|
//pump down delay
|
|
- TimeDelay((int)LeakCheckStep.EndPressureDelay, _leakCheckTimeLimit);
|
|
|
|
|
|
+ TimeDelay((int)LeakCheckStep.EndPressureDelay, _leakCheckWaitTime);
|
|
|
|
|
|
//记录腔体End pressure P2
|
|
//记录腔体End pressure P2
|
|
RecordEndPressure((int)LeakCheckStep.RecordEndPressure);
|
|
RecordEndPressure((int)LeakCheckStep.RecordEndPressure);
|
|
|
|
|
|
- CalcLeakCheck((int)LeakCheckStep.CalcLeakCheck, _leakRate, _leakCheckTimeLimit, 0);
|
|
|
|
|
|
+ CalcLeakCheck((int)LeakCheckStep.CalcLeakCheck, _leakRate, _leakCheckWaitTime, 0);
|
|
|
|
+
|
|
|
|
+ if (_mode == LeakCheckMode.ChamberOnly)
|
|
|
|
+ {
|
|
|
|
+ ;
|
|
|
|
+ }
|
|
|
|
+ else if (_mode == LeakCheckMode.ChamberAndGasLine)
|
|
|
|
+ {
|
|
|
|
+ OpenValve((int)LeakCheckStep.CloseGasFinalValve, ValveType.PROCESS, false);
|
|
|
|
+ if (_enableGasLine[0]) OpenValve((int)LeakCheckStep.CloseMfc1Valve, ValveType.Mfc1, false);
|
|
|
|
+ if (_enableGasLine[1]) OpenValve((int)LeakCheckStep.CloseMfc2Valve, ValveType.Mfc2, false);
|
|
|
|
+ if (_enableGasLine[2]) OpenValve((int)LeakCheckStep.CloseMfc3Valve, ValveType.Mfc3, false);
|
|
|
|
+ if (_enableGasLine[3]) OpenValve((int)LeakCheckStep.CloseMfc4Valve, ValveType.Mfc4, false);
|
|
|
|
+ //if (_enableGasLine[4]) OpenValve((int)LeakCheckStep.CloseMfc5Valve, ValveType.Mfc5, false);
|
|
|
|
+ }
|
|
|
|
+ else if (_mode == LeakCheckMode.ChamberAndGasLineAndFAC)
|
|
|
|
+ {
|
|
|
|
+ OpenValve((int)LeakCheckStep.CloseGasFinalValve, ValveType.PROCESS, false);
|
|
|
|
+ if (_enableGasLine[0]) OpenValve((int)LeakCheckStep.CloseMfc1Valve, ValveType.Mfc1, false);
|
|
|
|
+ if (_enableGasLine[1]) OpenValve((int)LeakCheckStep.CloseMfc2Valve, ValveType.Mfc2, false);
|
|
|
|
+ if (_enableGasLine[2]) OpenValve((int)LeakCheckStep.CloseMfc3Valve, ValveType.Mfc3, false);
|
|
|
|
+ if (_enableGasLine[3]) OpenValve((int)LeakCheckStep.CloseMfc4Valve, ValveType.Mfc4, false);
|
|
|
|
+ //if (_enableGasLine[4]) OpenValve((int)LeakCheckStep.CloseMfc5Valve, ValveType.Mfc5, false);
|
|
|
|
+
|
|
|
|
+ StopFlowMFC((int)LeakCheckStep.StopFlow);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
End((int)LeakCheckStep.End);
|
|
End((int)LeakCheckStep.End);
|
|
|
|
|
|
//ExecuteRoutine((int)LeakCheckStep.EndLeakCheck, _pumpDownRoutine);
|
|
//ExecuteRoutine((int)LeakCheckStep.EndLeakCheck, _pumpDownRoutine);
|
|
|
|
+
|
|
}
|
|
}
|
|
catch (RoutineBreakException)
|
|
catch (RoutineBreakException)
|
|
{
|
|
{
|
|
@@ -168,10 +258,10 @@ namespace Virgo_DRT.Modules.PMs
|
|
{
|
|
{
|
|
if (_chamber.ChamberPressure < target)
|
|
if (_chamber.ChamberPressure < target)
|
|
{
|
|
{
|
|
- Notify($"腔体压力 [{_chamber.ChamberPressure}] mt, 低于 [{target}] mt");
|
|
|
|
|
|
+ Notify($"Chamber pressure [{_chamber.ChamberPressure}] mt, less than [{target}] mt");
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
- Stop($"腔体压力 [{_chamber.ChamberPressure}], 高于 [{target}]");
|
|
|
|
|
|
+ Stop($"Chamber pressure [{_chamber.ChamberPressure}], greater than [{target}]");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -200,7 +290,7 @@ namespace Virgo_DRT.Modules.PMs
|
|
bool Func()
|
|
bool Func()
|
|
{
|
|
{
|
|
_beginPressure = _chamber.ChamberPressure;
|
|
_beginPressure = _chamber.ChamberPressure;
|
|
- Notify($"腔体压力初始值 {_beginPressure} mt");
|
|
|
|
|
|
+ Notify($"Record PM begin pressure {_beginPressure} mt");
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -231,7 +321,7 @@ namespace Virgo_DRT.Modules.PMs
|
|
bool Func()
|
|
bool Func()
|
|
{
|
|
{
|
|
_endPressure = _chamber.ChamberPressure;
|
|
_endPressure = _chamber.ChamberPressure;
|
|
- Notify($"腔体压力结束值 {_endPressure} mt");
|
|
|
|
|
|
+ Notify($"Record PM end pressure {_endPressure} mt");
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -267,13 +357,14 @@ namespace Virgo_DRT.Modules.PMs
|
|
bool? Check1()
|
|
bool? Check1()
|
|
{
|
|
{
|
|
LeakRate = (_endPressure - _beginPressure) / (timeRate / 60.0);
|
|
LeakRate = (_endPressure - _beginPressure) / (timeRate / 60.0);
|
|
-
|
|
|
|
if (LeakRate < target)
|
|
if (LeakRate < target)
|
|
{
|
|
{
|
|
- Notify($"腔体漏率 [{LeakRate}] mt/min, 低于 [{target}] mt/min");
|
|
|
|
|
|
+ Notify($"PM leak rate [{LeakRate}] mt/min, less than [{target}] mt/min");
|
|
|
|
+ LeakCheckResultManager.Instance.AddLeakCheck(Module, DateTime.Now, ElapseTime, (int)_beginPressure, (int)_endPressure, LeakRate, LeakCheckStatus.Succeed.ToString(), _mode.ToString());
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
- Stop($"腔体漏率 [{LeakRate}] mt/min, 高于 [{target}] mt/min");
|
|
|
|
|
|
+ Stop($"PM leak rate [{LeakRate}] mt/min, greater than [{target}] mt/min");
|
|
|
|
+ LeakCheckResultManager.Instance.AddLeakCheck(Module, DateTime.Now, ElapseTime, (int)_beginPressure, (int)_endPressure, LeakRate, LeakCheckStatus.Failed.ToString(), _mode.ToString());
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -294,10 +385,86 @@ namespace Virgo_DRT.Modules.PMs
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void StopFlowMFC(int id)
|
|
|
|
+ {
|
|
|
|
+ bool Func()
|
|
|
|
+ {
|
|
|
|
+ _chamber.StopAllGases();
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bool? Check1()
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Tuple<bool, Result> ret = ExecuteAndWait(id, Func, Check1, 1 * 1000);
|
|
|
|
+
|
|
|
|
+ if (ret.Item1)
|
|
|
|
+ {
|
|
|
|
+ if (ret.Item2 == Result.FAIL)
|
|
|
|
+ {
|
|
|
|
+ throw new RoutineFaildException();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (ret.Item2 == Result.TIMEOUT)
|
|
|
|
+ {
|
|
|
|
+ throw new RoutineFaildException();
|
|
|
|
+ }
|
|
|
|
+ throw new RoutineBreakException();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void StartFlowMFC(int id, double[] mfcValues)
|
|
|
|
+ {
|
|
|
|
+ bool Func()
|
|
|
|
+ {
|
|
|
|
+ for (int index = 0; index < mfcValues.Length; index++)
|
|
|
|
+ {
|
|
|
|
+ _chamber.FlowGas(index, mfcValues[index]);
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bool? Check1()
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Tuple<bool, Result> ret = ExecuteAndWait(id, Func, Check1, 1 * 1000);
|
|
|
|
+
|
|
|
|
+ if (ret.Item1)
|
|
|
|
+ {
|
|
|
|
+ if (ret.Item2 == Result.FAIL)
|
|
|
|
+ {
|
|
|
|
+ throw new RoutineFaildException();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (ret.Item2 == Result.TIMEOUT)
|
|
|
|
+ {
|
|
|
|
+ throw new RoutineFaildException();
|
|
|
|
+ }
|
|
|
|
+ throw new RoutineBreakException();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void DeleteLeadCheck(object[] args)
|
|
|
|
+ {
|
|
|
|
+ LeakCheckResultManager.Instance.Delete(Module, args[0].ToString());
|
|
|
|
+ }
|
|
|
|
+
|
|
public override void Abort()
|
|
public override void Abort()
|
|
{
|
|
{
|
|
- ExecuteRoutine((int)LeakCheckStep.AbortLeakCheck, _pumpdownRoutine);
|
|
|
|
- return;
|
|
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ _chamber.CloseValves();
|
|
|
|
+ LeakCheckResultManager.Instance.AddLeakCheck(Module, DateTime.Now, ElapseTime, (int)_beginPressure, (int)_chamber.ChamberPressure, 0, LeakCheckStatus.Aborted.ToString(), _mode.ToString());
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ LOG.Write(ex);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|