2026-08-04 18:19:29 +08:00
|
|
|
|
using Aitex.Core.RT.Device;
|
2026-06-15 10:56:30 +08:00
|
|
|
|
using Aitex.Core.RT.Device.Devices;
|
|
|
|
|
|
using Aitex.Core.RT.Event;
|
|
|
|
|
|
using Aitex.Core.RT.Routine;
|
|
|
|
|
|
using Aitex.Core.RT.SCCore;
|
|
|
|
|
|
using MECF.Framework.Common.Equipment;
|
2026-08-04 18:19:29 +08:00
|
|
|
|
using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.MFCs;
|
2026-06-15 10:56:30 +08:00
|
|
|
|
using SicModules.PMs.Routines.Base;
|
2026-08-04 18:19:29 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Diagnostics;
|
2026-06-15 10:56:30 +08:00
|
|
|
|
|
|
|
|
|
|
namespace SicModules.PMs.Routines
|
|
|
|
|
|
{
|
|
|
|
|
|
public class PMPurgeRoutine : PMBaseRoutine
|
|
|
|
|
|
{
|
|
|
|
|
|
private enum RoutineStep
|
|
|
|
|
|
{
|
|
|
|
|
|
RotationEnable,
|
|
|
|
|
|
HeatEnable,
|
|
|
|
|
|
VentPumpClose,
|
|
|
|
|
|
ArSupply,
|
|
|
|
|
|
|
|
|
|
|
|
SetGroupA,
|
|
|
|
|
|
SetGroupB,
|
|
|
|
|
|
SetGroupC,
|
|
|
|
|
|
SetGroupE,
|
|
|
|
|
|
SetGroupF,
|
|
|
|
|
|
SetGroupH,
|
|
|
|
|
|
SetGroupD,
|
|
|
|
|
|
SetGroupG,
|
|
|
|
|
|
SetGroupK,
|
|
|
|
|
|
|
|
|
|
|
|
SetMFCMode,
|
|
|
|
|
|
SetPCMode,
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
SetM1toM17,
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetM17M18,
|
|
|
|
|
|
SetPC,
|
|
|
|
|
|
SetGroupJ,
|
|
|
|
|
|
CloseGroupJ,
|
|
|
|
|
|
SetM291519to38,
|
|
|
|
|
|
|
|
|
|
|
|
SetGasOut,
|
|
|
|
|
|
SetTv,
|
|
|
|
|
|
|
|
|
|
|
|
SetGasIn1, //V68
|
|
|
|
|
|
OpenFinal1, //V91-96
|
|
|
|
|
|
SetMfcFinal1, //M32-38
|
|
|
|
|
|
SetMfc19to26,
|
|
|
|
|
|
|
|
|
|
|
|
SetTVCloseMode,
|
|
|
|
|
|
SetTvPositionToZero,
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
WaitPressUpTo950,
|
|
|
|
|
|
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetGasIn2,
|
|
|
|
|
|
SetGroupJOpen,
|
2026-08-04 18:19:29 +08:00
|
|
|
|
SetM18toM40,
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetM291519to26_1,
|
|
|
|
|
|
|
|
|
|
|
|
OpenFinal2,
|
|
|
|
|
|
IsOpenFinal1,
|
|
|
|
|
|
IsOpenFinal2,
|
|
|
|
|
|
IsCloseFinal1,
|
|
|
|
|
|
IsCloseFinal2,
|
|
|
|
|
|
SetMfcFinal2,
|
|
|
|
|
|
|
|
|
|
|
|
SetEPV1,
|
|
|
|
|
|
SetEPV2,
|
|
|
|
|
|
SetTvMode,
|
|
|
|
|
|
|
|
|
|
|
|
SetTVEnable_1,
|
|
|
|
|
|
SetTVEnable_2,
|
2026-08-04 18:19:29 +08:00
|
|
|
|
SetTVPressMode,
|
|
|
|
|
|
SetTVPressMode2,
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetTVPressMode1,
|
|
|
|
|
|
SetTv1,
|
|
|
|
|
|
WaitTv1,
|
|
|
|
|
|
SetTVPositionMode,
|
|
|
|
|
|
SetTVPositionMode_1,
|
|
|
|
|
|
SetTVPositionMax,
|
|
|
|
|
|
SetTVPositionMax_1,
|
|
|
|
|
|
|
|
|
|
|
|
SetTvOpen,
|
|
|
|
|
|
SetTvModeToPress,
|
|
|
|
|
|
SetTVtoCurrent,
|
|
|
|
|
|
RoutinePre,
|
|
|
|
|
|
|
|
|
|
|
|
SetPressureUp,
|
|
|
|
|
|
SetPressureDown,
|
|
|
|
|
|
WaitPressureDown,
|
2026-08-04 18:19:29 +08:00
|
|
|
|
|
2026-06-15 10:56:30 +08:00
|
|
|
|
VentPumpOpen,
|
|
|
|
|
|
|
|
|
|
|
|
PressureToMax,
|
|
|
|
|
|
PressureToMin,
|
|
|
|
|
|
|
|
|
|
|
|
StartLoop,
|
|
|
|
|
|
EndLoop,
|
|
|
|
|
|
|
|
|
|
|
|
SetMfc28to31,
|
|
|
|
|
|
SetReactorPress,
|
|
|
|
|
|
CloseFinanl1,
|
|
|
|
|
|
CloseFinanl2,
|
|
|
|
|
|
CloseEPV2,
|
|
|
|
|
|
SetTVCloseMode1,
|
|
|
|
|
|
SetTVCloseMode2,
|
|
|
|
|
|
CLoseTvvvv,
|
|
|
|
|
|
CLoseTV1,
|
|
|
|
|
|
CLoseTV2,
|
2026-08-04 18:19:29 +08:00
|
|
|
|
|
|
|
|
|
|
FirstWaitPressureUp,
|
|
|
|
|
|
FirstSetDefault_M18toM40,
|
|
|
|
|
|
FirstSet0_M18toM40,
|
|
|
|
|
|
FirstSetEPV2_1,
|
|
|
|
|
|
FirstSetEPV2_2,
|
|
|
|
|
|
FirstSetTv1,
|
|
|
|
|
|
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetEPV2_3,
|
|
|
|
|
|
CLoseEPV1,
|
|
|
|
|
|
CheckPM1000,
|
|
|
|
|
|
WaitPressUpTo1000,
|
|
|
|
|
|
WaitPressUpTo1020,
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
LoopSetDefault_M18toM40,
|
|
|
|
|
|
LoopSetEPV2_1,
|
|
|
|
|
|
LoopWaitPressureUp,
|
|
|
|
|
|
LoopSetEPV2_2,
|
|
|
|
|
|
LoopSetTv1,
|
|
|
|
|
|
LoopSet0_M18toM40,
|
|
|
|
|
|
Loop2Set0_M18toM40,
|
|
|
|
|
|
LoopWaitTv1,
|
|
|
|
|
|
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetPressUpOrDown1,
|
|
|
|
|
|
SetPressUpOrDown2,
|
|
|
|
|
|
SetMfc28to40Special,
|
|
|
|
|
|
WaitPmPressureUp,
|
|
|
|
|
|
SetMfc27to40Default,
|
|
|
|
|
|
|
|
|
|
|
|
SetV75,
|
|
|
|
|
|
SetV76,
|
|
|
|
|
|
SetV31,
|
|
|
|
|
|
SetV32,
|
|
|
|
|
|
SetV35V36,
|
|
|
|
|
|
SetV65,
|
|
|
|
|
|
SetV751,
|
|
|
|
|
|
SetV761,
|
|
|
|
|
|
SetV103,
|
|
|
|
|
|
SetV105,
|
2026-08-04 18:19:29 +08:00
|
|
|
|
Set0_M18toM40,
|
|
|
|
|
|
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetM2toM40_1,
|
|
|
|
|
|
SetM2TOM40Default,
|
|
|
|
|
|
SetM18,
|
|
|
|
|
|
SetM18_1,
|
|
|
|
|
|
SetM18_2,
|
|
|
|
|
|
SetM18Default,
|
|
|
|
|
|
|
|
|
|
|
|
SetV92V93V95,
|
|
|
|
|
|
SetV94,
|
|
|
|
|
|
SetV96,
|
|
|
|
|
|
SetV68,
|
|
|
|
|
|
SetM32M35M37,
|
|
|
|
|
|
SetM36,
|
|
|
|
|
|
SetM38,
|
|
|
|
|
|
SetM36_1,
|
|
|
|
|
|
SetM38_1,
|
|
|
|
|
|
SetV111_1,
|
|
|
|
|
|
SetV111_2,
|
|
|
|
|
|
|
|
|
|
|
|
SetPC567Close,
|
|
|
|
|
|
SetPC567Mode,
|
|
|
|
|
|
SetPC567Default,
|
|
|
|
|
|
OpenEPV2,
|
|
|
|
|
|
WaitPressUpTo20,
|
|
|
|
|
|
SetMfc291519to38,
|
|
|
|
|
|
WaitPressUpTo0,
|
|
|
|
|
|
SetMfc291519to38ToDefault,
|
|
|
|
|
|
WaitPressDownTo20,
|
|
|
|
|
|
SetPmPressureTo20,
|
|
|
|
|
|
CloseMfcFinal1,
|
|
|
|
|
|
CloseMfcFinal2,
|
|
|
|
|
|
CloseMfc2915,
|
|
|
|
|
|
CheckFinal1Open,
|
|
|
|
|
|
SetGroupV25,
|
|
|
|
|
|
Mfc36,
|
|
|
|
|
|
SetM39,
|
|
|
|
|
|
CloseMfc1to16, CloseMfc2to26, CloseJ,
|
|
|
|
|
|
|
|
|
|
|
|
CheckTVOpen1,
|
|
|
|
|
|
CheckTVOpen2,
|
|
|
|
|
|
CheckEPV1Open1,
|
|
|
|
|
|
CheckEPV2Open1,
|
|
|
|
|
|
CheckEPV2Open2,
|
|
|
|
|
|
|
|
|
|
|
|
CloseM32M35M37,
|
|
|
|
|
|
CloseM36,
|
|
|
|
|
|
CloseM38,
|
|
|
|
|
|
CloseGasIn1,
|
|
|
|
|
|
WaitPmPressureUp1,
|
|
|
|
|
|
|
|
|
|
|
|
TimeDelay1,
|
|
|
|
|
|
TimeDelay2,
|
|
|
|
|
|
TimeDelay3,
|
|
|
|
|
|
TimeDelay4,
|
|
|
|
|
|
TimeDelay5,
|
|
|
|
|
|
TimeDelay6,
|
|
|
|
|
|
TimeDelay7,
|
|
|
|
|
|
TimeDelay8,
|
|
|
|
|
|
TimeDelay9,
|
|
|
|
|
|
TimeDelay10,
|
|
|
|
|
|
TimeDelay11,
|
|
|
|
|
|
TimeDelay12,
|
|
|
|
|
|
TimeDelay14,
|
|
|
|
|
|
TimeDelay18,
|
|
|
|
|
|
TimeDelay19,
|
|
|
|
|
|
TimeDelay20,
|
|
|
|
|
|
TimeDelay21,
|
|
|
|
|
|
TimeDelay22,
|
|
|
|
|
|
|
|
|
|
|
|
Notify1,
|
|
|
|
|
|
Notify2
|
2026-08-04 18:19:29 +08:00
|
|
|
|
|
|
|
|
|
|
,FinishSetM1toM17,
|
|
|
|
|
|
FinishSetDefault_M18toM40,
|
|
|
|
|
|
FinishSetTVCloseMode2,
|
|
|
|
|
|
FinishCLoseTV2,
|
|
|
|
|
|
FinishSetEPV2_3,
|
|
|
|
|
|
FinishWaitPressUpTo1020,
|
|
|
|
|
|
FinishSet0_M2M9M15M19_M26
|
2026-06-15 10:56:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private ModuleName moduleName;
|
|
|
|
|
|
private PMModule _pmModule;
|
|
|
|
|
|
private IoThrottleValve2 _IoThrottle;
|
|
|
|
|
|
private IoInterLock _pmIoInterLock;
|
|
|
|
|
|
|
|
|
|
|
|
private int _rotationCheckSpeed = 0; //设置旋转速度为0后检查是否转速低于此数值
|
|
|
|
|
|
private int _rotationCloseTimeout; //旋转停止超时
|
|
|
|
|
|
private int _heatTimeOut = 5; //Heat关闭等待Di反馈超时时间
|
|
|
|
|
|
|
|
|
|
|
|
private int _EPV2OpenTimeDelay = 10;
|
|
|
|
|
|
|
|
|
|
|
|
private double _ventBasePressure;
|
|
|
|
|
|
private double _pumpBasePressure;
|
|
|
|
|
|
private int _pressureLoopCount; //Loop次数
|
|
|
|
|
|
private int _pressureMinDelay;
|
|
|
|
|
|
private int _pressureMaxDelay;
|
|
|
|
|
|
private int _pressureMinTimeout;
|
|
|
|
|
|
private int _pressureMaxTimeout;
|
|
|
|
|
|
|
|
|
|
|
|
private int _IoValueOpenCloseTimeout = 10; //开关阀门超时时间
|
|
|
|
|
|
private double _pmPressureMaxDiff; //蝶阀与目标压力的差值范围(认为调整到位了)
|
|
|
|
|
|
private int _throttleTimeout; //蝶阀调整到指定压力的超时时间
|
|
|
|
|
|
|
|
|
|
|
|
private int _ventTimeout;
|
|
|
|
|
|
private int _pumpTimeout;
|
|
|
|
|
|
|
|
|
|
|
|
private int _EPV12TimeSapn = 10;
|
|
|
|
|
|
private int _waitPressureTimeout = 600; //等待腔体压力上升到950的超时时间
|
|
|
|
|
|
|
|
|
|
|
|
private bool _needFinalValveOpen = false;
|
|
|
|
|
|
|
|
|
|
|
|
private Stopwatch _swTimer = new Stopwatch();
|
|
|
|
|
|
public PMPurgeRoutine(ModuleName module, PMModule pm) : base(module, pm)
|
|
|
|
|
|
{
|
|
|
|
|
|
moduleName = module;
|
|
|
|
|
|
_pmModule = pm;
|
|
|
|
|
|
Name = "Purge";
|
|
|
|
|
|
|
|
|
|
|
|
_IoThrottle = DEVICE.GetDevice<IoThrottleValve2>($"{Module}.TV");
|
|
|
|
|
|
_pmIoInterLock = DEVICE.GetDevice<IoInterLock>($"{Module}.PMInterLock");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override Result Start(params object[] objs)
|
|
|
|
|
|
{
|
|
|
|
|
|
Reset();
|
|
|
|
|
|
|
|
|
|
|
|
_rotationCloseTimeout = SC.GetValue<int>($"PM.{Module}.RotationCloseTimeout");
|
|
|
|
|
|
_pmPressureMaxDiff = SC.GetValue<double>($"PM.{Module}.ThrottlePressureMaxDiff");
|
|
|
|
|
|
_throttleTimeout = SC.GetValue<int>($"PM.{Module}.ThrottlePressureTimeout");
|
|
|
|
|
|
|
|
|
|
|
|
_ventTimeout = SC.GetValue<int>($"PM.{Module}.Purge.VentTimeout");
|
|
|
|
|
|
_pumpTimeout = SC.GetValue<int>($"PM.{Module}.Purge.PumpTimeout");
|
|
|
|
|
|
|
|
|
|
|
|
_pressureLoopCount = SC.GetValue<int>($"PM.{Module}.Purge.CyclePurgeCount");
|
|
|
|
|
|
_pumpBasePressure = SC.GetValue<double>($"PM.{Module}.Purge.PumpBasePressure");
|
|
|
|
|
|
_pressureMinDelay = SC.GetValue<int>($"PM.{Module}.Purge.PumpDelayTime");
|
|
|
|
|
|
_pressureMinTimeout = SC.GetValue<int>($"PM.{Module}.Purge.PumpTimeout");
|
|
|
|
|
|
_ventBasePressure = SC.GetValue<double>($"PM.{Module}.Purge.VentBasePressure");
|
|
|
|
|
|
_pressureMaxDelay = SC.GetValue<int>($"PM.{Module}.Purge.VentDelayTime");
|
|
|
|
|
|
_pressureMaxTimeout = SC.GetValue<int>($"PM.{Module}.Purge.VentTimeout");
|
|
|
|
|
|
|
|
|
|
|
|
_waitPressureTimeout = SC.GetValue<int>($"PM.{Module}.Purge.WaitPressureTimeout");
|
|
|
|
|
|
|
|
|
|
|
|
_needFinalValveOpen = SC.GetValue<bool>($"PM.{Module}.Purge.NeedFinalValveOpen");
|
|
|
|
|
|
|
|
|
|
|
|
//Clean succeed 清掉
|
|
|
|
|
|
_pmIoInterLock.DoLidCloseRoutineSucceed = false;
|
|
|
|
|
|
_pmIoInterLock.DoLidOpenRoutineSucceed = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (!_pmIoInterLock.SetPMPurgeRoutineRunning(true, out string reason))
|
|
|
|
|
|
{
|
|
|
|
|
|
EV.PostAlarmLog(Module, $"can not Purge,{reason}");
|
|
|
|
|
|
return Result.FAIL;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
currentPressureUpOrDown = PressureUpOrDown.None;
|
|
|
|
|
|
|
|
|
|
|
|
_finalOpen = false;
|
|
|
|
|
|
_swTimer.Restart();
|
|
|
|
|
|
Notify($"Start LoopCount:{_pressureLoopCount}");
|
|
|
|
|
|
return Result.RUN;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override Result Monitor()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
//CheckRoutineTimeOut();
|
|
|
|
|
|
|
|
|
|
|
|
//关闭V76,打开V75
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV76, IoGroupName.V76, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV75, IoGroupName.V75, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//2、 旋转停止,加热停止
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetHeatEnable((int)RoutineStep.HeatEnable, false, _heatTimeOut);
|
|
|
|
|
|
SetRotationValve((int)RoutineStep.RotationEnable, _rotationCheckSpeed, false, _rotationCloseTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//3、 关闭 V72(GasBox.Vent.Pump) 打开 V25(GasBox.Vent.Bypass)。
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.VentPumpClose, IoGroupName.VentPump, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupV25, IoGroupName.V25, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//4、 打开 V31(H2.Supply)、 V32(Ar.Supply) 。
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV31, IoGroupName.V31, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV32, IoGroupName.V32, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//5、 打开 V35(H2N2.Line1)、 V36(H2N2.Line2),关闭 B/C/E/F/H/KValves,打开 D/G Valves; 打开 J valve。
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV35V36, IoGroupName.V35V36, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupB, IoGroupName.B, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupC, IoGroupName.C, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupE, IoGroupName.E, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupF, IoGroupName.F, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupH, IoGroupName.H, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupK, IoGroupName.K, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupD, IoGroupName.D, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupG, IoGroupName.G, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetGroupJ, IoGroupName.J, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//6、 M1-M17 设定为 default 值,所有 PC 设定为 default 值(PC1-PC9), M18-M40(除M30\M34\M39)) MFC 3s ramp 到 default 值。
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.SetM1toM17, MfcGroupName.M1toM17, 0);
|
|
|
|
|
|
SetPcModeToNormal((int)RoutineStep.SetPCMode, _lstPcList);
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.SetM18toM40, MfcGroupName.M18toM40No303439, 3);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//7、打开 EPV2,等待 3s, 打开 TV enable, 压力模式,伺服压力默认设定为 0mbar;
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetEPV2, IoGroupName.EPV2, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay1, 3);
|
|
|
|
|
|
SetThrottleEnableAndWait((int)RoutineStep.SetTVEnable_1, _IoThrottle, 5);
|
|
|
|
|
|
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode, _IoThrottle, 5);
|
2026-08-04 18:19:29 +08:00
|
|
|
|
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTv1, _IoThrottle, _pumpBasePressure);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//8、当蝶阀设定值 ramp 到 0 后,将 M18-M40(除 M30\M34\M39)) MFC 3s ramp 到 0;
|
|
|
|
|
|
SetMfcByGroup((int)RoutineStep.Set0_M18toM40, MfcGroupName.M18toM40No303439, 0, 3);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//9、等待腔体压力到 Pump Base Pressure(可配置),蝶阀改为位置模式,开度设定 100 %
|
2026-06-15 10:56:30 +08:00
|
|
|
|
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pumpBasePressure, _throttleTimeout);
|
|
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay2, 3);
|
|
|
|
|
|
SetThrottleToPositionMode((int)RoutineStep.SetTVPositionMode, _IoThrottle, _throttleTimeout);
|
|
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay11, 3);
|
|
|
|
|
|
SetThrottleSetPosition((int)RoutineStep.SetTVPositionMax, _IoThrottle, 100, _throttleTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//10、 M27、 M28、 M29、 M31、 M33、 M40 依次设定 3S ramp 到 default 值 ;
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.SetMfcFinal2, MfcGroupName.Final2, 3);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//11、 打 开 V87( SHPurge.Final)、 V88( OuterGas.Final)、 V89( InnerGas.Final )、 V90(MiddleGas.Final)、 V91(OpticPurge.Final)、 V97(CarryGas.Final);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.OpenFinal2, IoGroupName.Final2, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//12、 打开 V68(ChamBody.N2.Purge)
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV68, IoGroupName.GasIn1, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay3, 1);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//13、 M32、 M35、 M36、 M37、 M38 依次设定 3S ramp 到 default 值 ;
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.SetM32M35M37, MfcGroupName.M32M35M37, 1);
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.SetM36, MfcGroupName.M36, 1);
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.SetM38, MfcGroupName.M38, 1);
|
2026-08-04 18:19:29 +08:00
|
|
|
|
|
|
|
|
|
|
//14、打开 V92(GasRingPurge.Final)、 V93(ChamberPurge.Final)、 V95(ConfinementRing.Final);
|
|
|
|
|
|
//等待 950,打开 V94(RotationUpPurge.Final)、 等待 3S,打开 V96(HeaterWF.Final) ;
|
|
|
|
|
|
//蝶阀改为压力模式
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV92V93V95, IoGroupName.V92V93V95, true, _IoValueOpenCloseTimeout);
|
2026-08-04 18:19:29 +08:00
|
|
|
|
WaitChamberPressUpTo((int)RoutineStep.WaitPressUpTo950, 950, _waitPressureTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV94, IoGroupName.V94, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay4, 3);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.SetV96, IoGroupName.V96, true, _IoValueOpenCloseTimeout);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode1, _IoThrottle, 5);
|
|
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//M18-M40(除 M30\M34\M39)) MFC 3s ramp 到 default 值。
|
|
|
|
|
|
//关闭 EPV2,等待压力达到设定值,压力达到后, 打开 EPV2; M18 - M40(除 M30\M34\M39)) MFC 5s ramp 到 0。
|
|
|
|
|
|
//伺服压力到设定值 0(可配置)
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.FirstSetDefault_M18toM40, MfcGroupName.M18toM40No303439, 3);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.FirstSetEPV2_1, IoGroupName.EPV2, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
WaitThrottleToPressureAndSetMfcSpecial((int)RoutineStep.FirstWaitPressureUp, _IoThrottle, _ventBasePressure, _ventTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.FirstSetEPV2_2, IoGroupName.EPV2, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetMfcByGroup((int)RoutineStep.FirstSet0_M18toM40, MfcGroupName.M18toM40No303439, 0, 5);
|
|
|
|
|
|
SetThrottleToTargetAndNoWait((int)RoutineStep.FirstSetTv1, _IoThrottle, _pumpBasePressure);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//循环开始
|
|
|
|
|
|
Loop((int)RoutineStep.StartLoop, _pressureLoopCount);
|
|
|
|
|
|
|
|
|
|
|
|
//M18 - M40(除 M30\M34\M39)) MFC 3s ramp 到 default 值。
|
|
|
|
|
|
//关闭 EPV2,等待压力达到设定值,压力达到后,打开 EPV2;
|
|
|
|
|
|
//M18 - M40(除 M30\M34\M39)) MFC 5s ramp 到 0。
|
|
|
|
|
|
//伺服压力到设定值 0(可配置)
|
|
|
|
|
|
//M18 - M40(除 M30\M34\M39)) MFC5s ramp 到 0。
|
|
|
|
|
|
//等待压力到达 0(可配置)
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.LoopSetDefault_M18toM40, MfcGroupName.M18toM40No303439, 3);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.LoopSetEPV2_1, IoGroupName.EPV2, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
WaitThrottleToPressureAndSetMfcSpecial((int)RoutineStep.LoopWaitPressureUp, _IoThrottle, _ventBasePressure, _ventTimeout);
|
|
|
|
|
|
SetIoValueByGroup((int)RoutineStep.LoopSetEPV2_2, IoGroupName.EPV2, true, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
SetMfcByGroup((int)RoutineStep.LoopSet0_M18toM40, MfcGroupName.M18toM40No303439, 0, 5);
|
|
|
|
|
|
SetThrottleToTargetAndNoWait((int)RoutineStep.LoopSetTv1, _IoThrottle, _pumpBasePressure);
|
|
|
|
|
|
SetMfcByGroup((int)RoutineStep.Loop2Set0_M18toM40, MfcGroupName.M18toM40No303439, 0, 5);
|
|
|
|
|
|
WaitChamberPressDownTo((int)RoutineStep.LoopWaitTv1, _pumpBasePressure, _pumpTimeout);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
|
|
|
|
|
|
EndLoop((int)RoutineStep.EndLoop);
|
2026-08-04 18:19:29 +08:00
|
|
|
|
//设置 M1-M17 3s ramp 到 default; M18 - M40(除 M30\M34\M39)) MFC 3s ramp到 default 值。
|
|
|
|
|
|
//关闭蝶阀,再关闭 EPV2; 等待压力到达 1020。
|
2026-06-15 10:56:30 +08:00
|
|
|
|
//M2,M9,M15,M19-M26 3s ramp 到0
|
2026-08-04 18:19:29 +08:00
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.FinishSetM1toM17, MfcGroupName.M1toM17, 3);
|
|
|
|
|
|
SetMfcToDefaultByGroup((int)RoutineStep.FinishSetDefault_M18toM40, MfcGroupName.M18toM40No303439, 3);
|
|
|
|
|
|
SetThrottleToCloseMode((int)RoutineStep.FinishSetTVCloseMode2, _IoThrottle, 8);
|
|
|
|
|
|
SetThrottleDisable((int)RoutineStep.FinishCLoseTV2, _IoThrottle, 8);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay10, 1);
|
2026-08-04 18:19:29 +08:00
|
|
|
|
SetIoValueByGroup((int)RoutineStep.FinishSetEPV2_3, IoGroupName.EPV2, false, _IoValueOpenCloseTimeout);
|
|
|
|
|
|
NotifyInfo((int)RoutineStep.Notify1, $"Wait pm pressure to 1020 mbar!");
|
|
|
|
|
|
WaitChamberPressUpTo((int)RoutineStep.FinishWaitPressUpTo1020, 1020, _waitPressureTimeout);
|
|
|
|
|
|
SetMfcByGroup((int)RoutineStep.FinishSet0_M2M9M15M19_M26, MfcGroupName.M2M9M15M19_M26, 0, 3);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (RoutineBreakException)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Result.RUN;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (RoutineFaildException)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Result.FAIL;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Notify($"Finished ! Elapsed time: {(int)(_swTimer.ElapsedMilliseconds / 1000)} s");
|
|
|
|
|
|
_swTimer.Stop();
|
|
|
|
|
|
SetRoutineSuccessedDo();
|
|
|
|
|
|
return Result.DONE;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void Abort()
|
|
|
|
|
|
{
|
|
|
|
|
|
_pmIoInterLock.DoLidOpenRoutineRunning = false;
|
|
|
|
|
|
PmDevice._ioThrottleValve.StopRamp();
|
|
|
|
|
|
PmDevice.SetMfcStopRamp(PmDevice.GetMfcListByGroupName(MfcGroupName.All));
|
|
|
|
|
|
PmDevice.SetRotationServo(0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
base.Abort();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void SetRoutineSuccessedDo()
|
|
|
|
|
|
{
|
|
|
|
|
|
_pmIoInterLock.DoLidOpenRoutineRunning = false;
|
|
|
|
|
|
_pmIoInterLock.SetLidOpenRoutineSucceed(true, out string reason);
|
|
|
|
|
|
_pmIoInterLock.DoLidCloseRoutineSucceed = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//private void CheckRoutineTimeOut()
|
|
|
|
|
|
//{
|
|
|
|
|
|
// if (_routineTimeOut > 10)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// if ((int)(_swTimer.ElapsedMilliseconds / 1000) > _routineTimeOut)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// EV.PostAlarmLog(Module,$"Routine TimeOut! over {_routineTimeOut} s");
|
|
|
|
|
|
// throw (new RoutineFaildException());
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|