|
@@ -15,53 +15,52 @@ namespace Venus_RT.Modules.PMs
|
|
|
|
|
|
class ProcessHelper
|
|
|
{
|
|
|
- static protected JetPMBase Chamber;
|
|
|
+ protected JetPMBase Chamber;
|
|
|
+ private string Module;
|
|
|
|
|
|
- static Stopwatch sRFStopWatch = new Stopwatch();
|
|
|
- static Stopwatch bRFStopWatch = new Stopwatch();
|
|
|
+ private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> startHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>();
|
|
|
+ private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> checkerHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>();
|
|
|
+ private static Dictionary<string, Action<ProcessUnitBase, RecipeStep>> endHelper = new Dictionary<string, Action<ProcessUnitBase, RecipeStep>>();
|
|
|
|
|
|
-
|
|
|
- private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> startHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>
|
|
|
+ public ProcessHelper(JetPMBase pm)
|
|
|
{
|
|
|
- {"PressureByPressureModeUnit", PressureByPressureModeUnit_Start},
|
|
|
- {"PressureByValveModeUnit", PressureByValveModeUnit_Start},
|
|
|
- {"TCPUnit", TCPUnit_Start},
|
|
|
- {"BiasUnit", BiasUnit_Start},
|
|
|
- {"GasControlUnit", GasControlUnit_Start },
|
|
|
- {"ESCHVUnit", ESCHVUnit_Start },
|
|
|
- {"ProcessKitUnit", ProcessKitUnit_Start },
|
|
|
- };
|
|
|
-
|
|
|
- private static Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>> checkerHelper = new Dictionary<string, Func<ProcessUnitBase, RecipeStep, RState>>
|
|
|
+ Chamber = pm;
|
|
|
+ Module = pm.Module.ToString() ;
|
|
|
+ Init();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void Init()
|
|
|
{
|
|
|
- {"PressureByPressureModeUnit", PressureByPressureModeUnit_Check},
|
|
|
- {"PressureByValveModeUnit", PressureByValveModeUnit_Check},
|
|
|
- {"TCPUnit", TCPUnit_Check},
|
|
|
- {"BiasUnit", BiasUnit_Check},
|
|
|
- {"GasControlUnit", GasControlUnit_Check},
|
|
|
- {"ESCHVUnit", ESCHVUnit_Check},
|
|
|
- {"ProcessKitUnit", ProcessKitUnit_Check}
|
|
|
+ startHelper [$"{Module}.PressureByPressureModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByPressureModeUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.PressureByPressureModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByPressureModeUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.PressureByPressureModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByPressureModeUnit_End(unit, step);
|
|
|
|
|
|
- };
|
|
|
+ startHelper [$"{Module}.PressureByValveModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByValveModeUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.PressureByValveModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByValveModeUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.PressureByValveModeUnit"] = (ProcessUnitBase unit, RecipeStep step) => PressureByValveModeUnit_End(unit, step);
|
|
|
|
|
|
- private static Dictionary<string, Action<ProcessUnitBase, RecipeStep>> endHelper = new Dictionary<string, Action<ProcessUnitBase, RecipeStep>>
|
|
|
- {
|
|
|
- {"PressureByPressureModeUnit", PressureByPressureModeUnit_End},
|
|
|
- {"PressureByValveModeUnit", PressureByValveModeUnit_End},
|
|
|
- {"TCPUnit", TCPUnit_End},
|
|
|
- {"BiasUnit", BiasUnit_End},
|
|
|
- {"GasControlUnit", GasControlUnit_End},
|
|
|
- {"ESCHVUnit", ESCHVUnit_End},
|
|
|
- {"ProcessKitUnit", ProcessKitUnit_End}
|
|
|
+ startHelper [$"{Module}.TCPUnit"] = (ProcessUnitBase unit, RecipeStep step) => TCPUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.TCPUnit"] = (ProcessUnitBase unit, RecipeStep step) => TCPUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.TCPUnit"] = (ProcessUnitBase unit, RecipeStep step) => TCPUnit_End(unit, step);
|
|
|
|
|
|
- };
|
|
|
+ startHelper [$"{Module}.BiasUnit"] = (ProcessUnitBase unit, RecipeStep step) => BiasUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.BiasUnit"] = (ProcessUnitBase unit, RecipeStep step) => BiasUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.BiasUnit"] = (ProcessUnitBase unit, RecipeStep step) => BiasUnit_End(unit, step);
|
|
|
|
|
|
- public ProcessHelper(JetPMBase pm)
|
|
|
- {
|
|
|
- Chamber = pm;
|
|
|
+ startHelper [$"{Module}.GasControlUnit"] = (ProcessUnitBase unit, RecipeStep step) => GasControlUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.GasControlUnit"] = (ProcessUnitBase unit, RecipeStep step) => GasControlUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.GasControlUnit"] = (ProcessUnitBase unit, RecipeStep step) => GasControlUnit_End(unit, step);
|
|
|
+
|
|
|
+ startHelper [$"{Module}.ESCHVUnit"] = (ProcessUnitBase unit, RecipeStep step) => ESCHVUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.ESCHVUnit"] = (ProcessUnitBase unit, RecipeStep step) => ESCHVUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.ESCHVUnit"] = (ProcessUnitBase unit, RecipeStep step) => ESCHVUnit_End(unit, step);
|
|
|
+
|
|
|
+ startHelper [$"{Module}.ProcessKitUnit"] = (ProcessUnitBase unit, RecipeStep step) => ProcessKitUnit_Start(unit, step);
|
|
|
+ checkerHelper [$"{Module}.ProcessKitUnit"] = (ProcessUnitBase unit, RecipeStep step) => ProcessKitUnit_Check(unit, step);
|
|
|
+ endHelper [$"{Module}.ProcessKitUnit"] = (ProcessUnitBase unit, RecipeStep step) => ProcessKitUnit_End(unit, step);
|
|
|
}
|
|
|
|
|
|
- static private RState PressureByPressureModeUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState PressureByPressureModeUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as PressureByPressureModeUnit;
|
|
|
if (Chamber.SetPVPressure(ProcessUnit.StartPressure))
|
|
@@ -72,7 +71,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Failed;
|
|
|
}
|
|
|
|
|
|
- static private RState PressureByPressureModeUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState PressureByPressureModeUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as PressureByPressureModeUnit;
|
|
|
if(ProcessUnit.EnableRamp)
|
|
@@ -91,12 +90,12 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void PressureByPressureModeUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void PressureByPressureModeUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
- static private RState PressureByValveModeUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState PressureByValveModeUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as PressureByValveModeUnit;
|
|
|
if(Chamber.SetPVPostion(ProcessUnit.StartPosition))
|
|
@@ -106,7 +105,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Failed;
|
|
|
}
|
|
|
|
|
|
- static private RState PressureByValveModeUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState PressureByValveModeUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as PressureByValveModeUnit;
|
|
|
if(ProcessUnit.EnableRamp)
|
|
@@ -120,14 +119,13 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void PressureByValveModeUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void PressureByValveModeUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
- static private RState TCPUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState TCPUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
- sRFStopWatch.Restart();
|
|
|
var ProcessUnit = unit as TCPUnit;
|
|
|
if (ProcessUnit.RFPower > 5)
|
|
|
{
|
|
@@ -138,11 +136,11 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private RState TCPUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState TCPUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var _scPowerAlarmTime= SC.GetValue<double>($"{Chamber.Name}.Rf.PowerAlarmTime");
|
|
|
var ProcessUnit = unit as TCPUnit;
|
|
|
- if(ProcessUnit.MaxReflectedPower > 0 && Chamber.ReflectPower > ProcessUnit.MaxReflectedPower && sRFStopWatch.ElapsedMilliseconds > _scPowerAlarmTime*1000)
|
|
|
+ if(ProcessUnit.MaxReflectedPower > 0 && Chamber.ReflectPower > ProcessUnit.MaxReflectedPower && step.ElapsedTime() > _scPowerAlarmTime*1000)
|
|
|
{
|
|
|
LOG.Write(eEvent.ERR_PROCESS, Chamber.Module, $"Step:{step.StepNo} failed, RF Reflect Power:{Chamber.ReflectPower} exceeds the Max Limit:{ProcessUnit.MaxReflectedPower}");
|
|
|
return RState.Failed;
|
|
@@ -157,15 +155,14 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void TCPUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void TCPUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
Chamber.GeneratorSetpower(0);
|
|
|
Chamber.GeneratorPowerOn(false);
|
|
|
}
|
|
|
|
|
|
- static private RState BiasUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState BiasUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
- bRFStopWatch.Restart();
|
|
|
var ProcessUnit = unit as BiasUnit;
|
|
|
if (ProcessUnit.BiasRFPower > 5)
|
|
|
{
|
|
@@ -183,12 +180,12 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private RState BiasUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState BiasUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var _scPowerAlarmTime = SC.GetValue<double>($"{Chamber.Name}.BiasRf.PowerAlarmTime");
|
|
|
|
|
|
var ProcessUnit = unit as BiasUnit;
|
|
|
- if (ProcessUnit.BiasMaxReflectedPower > 0 && Chamber.BiasReflectPower > ProcessUnit.BiasMaxReflectedPower && bRFStopWatch.ElapsedMilliseconds > _scPowerAlarmTime * 1000)
|
|
|
+ if (ProcessUnit.BiasMaxReflectedPower > 0 && Chamber.BiasReflectPower > ProcessUnit.BiasMaxReflectedPower && step.ElapsedTime() > _scPowerAlarmTime * 1000)
|
|
|
{
|
|
|
LOG.Write(eEvent.ERR_PROCESS, Chamber.Module, $"Step:{step.StepNo} failed, Bias Reflect Power:{Chamber.BiasReflectPower} exceeds the Max Limit:{ProcessUnit.BiasMaxReflectedPower}");
|
|
|
return RState.Failed;
|
|
@@ -203,13 +200,13 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void BiasUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void BiasUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
Chamber.GeneratorBiasSetpower(0);
|
|
|
Chamber.GeneratorBiasPowerOn(false);
|
|
|
}
|
|
|
|
|
|
- static private RState GasControlUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState GasControlUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
Chamber.OpenValve(ValveType.GasFinal, true);
|
|
|
var ProcessUnit = unit as GasControlUnit;
|
|
@@ -240,7 +237,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private RState GasControlUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState GasControlUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as GasControlUnit;
|
|
|
if(ProcessUnit.EnableRamp)
|
|
@@ -258,7 +255,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void GasControlUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void GasControlUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
Chamber.FlowGas(0, 0);
|
|
|
Chamber.FlowGas(1, 0);
|
|
@@ -270,7 +267,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
Chamber.FlowGas(7, 0);
|
|
|
}
|
|
|
|
|
|
- static private RState ESCHVUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState ESCHVUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as ESCHVUnit;
|
|
|
Chamber.SetESCClampVoltage(ProcessUnit.ESCClampValtage);
|
|
@@ -279,7 +276,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private RState ESCHVUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState ESCHVUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
if(Chamber.BackSideHeOutOfRange)
|
|
|
{
|
|
@@ -290,32 +287,32 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void ESCHVUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void ESCHVUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
Chamber.SetESCClampVoltage(0);
|
|
|
//Chamber.SetBacksideHePressure(0);
|
|
|
Chamber.SetBacksideHeThreshold(0, 0);
|
|
|
}
|
|
|
|
|
|
- static private RState ProcessKitUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState ProcessKitUnit_Start(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as ProcessKitUnit;
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private RState ProcessKitUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private RState ProcessKitUnit_Check(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
var ProcessUnit = unit as ProcessKitUnit;
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- static private void ProcessKitUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
+ private void ProcessKitUnit_End(ProcessUnitBase unit, RecipeStep step)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
- public static bool LoadMethods(ProcessUnitBase unit)
|
|
|
+ public bool LoadMethods(ProcessUnitBase unit)
|
|
|
{
|
|
|
- var className = unit.GetType().Name;
|
|
|
+ var className = $"{Module}.{unit.GetType().Name}";
|
|
|
if(startHelper.ContainsKey(className) && checkerHelper.ContainsKey(className) && endHelper.ContainsKey(className))
|
|
|
{
|
|
|
unit.starter = startHelper[className];
|
|
@@ -328,7 +325,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- private static RState stepStarter(RecipeStep step)
|
|
|
+ private RState stepStarter(RecipeStep step)
|
|
|
{
|
|
|
step.StartStepTimer();
|
|
|
switch (step.Type)
|
|
@@ -340,7 +337,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- private static RState stepChecker(RecipeStep step)
|
|
|
+ private RState stepChecker(RecipeStep step)
|
|
|
{
|
|
|
switch(step.Type)
|
|
|
{
|
|
@@ -362,7 +359,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.Running;
|
|
|
}
|
|
|
|
|
|
- private static RState stepEnder(RecipeStep step)
|
|
|
+ private RState stepEnder(RecipeStep step)
|
|
|
{
|
|
|
if(step.Type == StepType.EndPoint)
|
|
|
{
|
|
@@ -378,7 +375,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
return RState.End;
|
|
|
}
|
|
|
|
|
|
- public static bool LoadStepFuns(RecipeStep step)
|
|
|
+ public bool LoadStepFuns(RecipeStep step)
|
|
|
{
|
|
|
step.starter = stepStarter;
|
|
|
step.checker = stepChecker;
|