1.修改PM Purge和Clean Routine超时时间和压力达到条件

This commit is contained in:
HCL 2024-03-26 10:34:10 +08:00
parent 7a402fe880
commit d5a6117a2a
8 changed files with 127 additions and 61 deletions

View File

@ -1010,6 +1010,35 @@ namespace SicModules.PMs.Routines.Base
}
}
protected void WaitChamberPressDownTo(int id, double press, int timeout)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
{
Notify($"Wait pm pressure to {press} mbar");
return true;
},
() =>
{
return _pm.GetChamberPressure() <= press;
},
timeout * 1000);
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else if (ret.Item2 == Result.TIMEOUT)
{
Stop($"Wait Chamber Pressure Down to {press} Timeout,over {timeout} seconds;");
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
protected void SetIoValueByGroup(int id, IoGroupName groupName, bool close, int timeout)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
@ -1602,48 +1631,6 @@ namespace SicModules.PMs.Routines.Base
}
}
protected void SetThrottlePressureAndWaitSetPoint(int id, IoThrottleValve2 _IoThrottle, double pressure, double _pmPressureMaxDiff, int timeout)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
{
Notify($"Set Throttle pressure to {pressure} and wait");
string reason = String.Empty;
//将当前值赋值给设定值
_IoThrottle.PressureSetpoint = _IoThrottle.PressureFeedback;
if (!_IoThrottle.SetPressure(out reason, 0, new object[] { pressure }))
{
Stop($"Set Throttle pressure to { pressure} failed, { reason}");
return false;
}
return true;
},
() =>
{
return Math.Abs(_IoThrottle.PressureSetpoint - pressure) <= 1;
},
timeout * 1000);
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else if (ret.Item2 == Result.TIMEOUT)
{
Stop($"Set Throttle Pressure to {pressure} timeout, over {timeout} seconds");
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
protected void SetThrottlePressureAndWait(int id, IoThrottleValve2 _IoThrottle, double pressure, double _pmPressureMaxDiff, int timeout)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
@ -1680,7 +1667,44 @@ namespace SicModules.PMs.Routines.Base
throw (new RoutineBreakException());
}
}
protected void SetThrottlePressureAndWait(int id, IoThrottleValve2 _IoThrottle, double pressure, int timeout)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
{
Notify($"Set Throttle pressure to {pressure} and wait");
string reason = String.Empty;
if (!_IoThrottle.SetPressure(out reason, 0, new object[] { pressure }))
{
Stop($"Set Throttle pressure to {pressure} failed, {reason}");
return false;
}
return true;
},
() =>
{
return _IoThrottle.PressureFeedback <= pressure;
},
timeout * 1000);
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else if (ret.Item2 == Result.TIMEOUT)
{
Stop($"Set Throttle Pressure to {pressure} timeout, over {timeout} seconds");
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
protected void SetThrottleToTargetAndNoWait(int id, IoThrottleValve2 _IoThrottle, double pressure)
{
Tuple<bool, Result> ret = Execute(id, () =>
@ -1737,6 +1761,35 @@ namespace SicModules.PMs.Routines.Base
}
}
protected void WaitThrottleToPressureAndSetMfcSpecial(int id, IoThrottleValve2 _IoThrottle, double pressure, int timeout)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
{
return true;
},
() =>
{
SetMfcRampByGroupAndPressureAlways(currentPressureUpOrDown);
return _IoThrottle.PressureFeedback <= pressure;
},
timeout * 1000);
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else if (ret.Item2 == Result.TIMEOUT)
{
Stop($"Set Throttle Pressure to {pressure} timeout, over {timeout} seconds");
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
protected void WaitPMPressureAndSetMfcSpecial(int id, double pressure, int timeout)
{
Tuple<bool, Result> ret = Wait(id, () =>

View File

@ -198,6 +198,9 @@ namespace SicModules.PMs.Routines
private double _pmPressureMaxDiff; //蝶阀与目标压力的差值范围(认为调整到位了)
private int _throttleTimeout; //蝶阀调整到指定压力的超时时间
private int _ventTimeout;
private int _pumpTimeout;
private double _throttleFinalPressure = 300;//蝶阀最终调整对的压力
@ -222,6 +225,9 @@ namespace SicModules.PMs.Routines
_pmPressureMaxDiff = SC.GetValue<double>($"PM.{Module}.ThrottlePressureMaxDiff");
_throttleTimeout = SC.GetValue<int>($"PM.{Module}.ThrottlePressureTimeout");
_ventTimeout = SC.GetValue<int>($"PM.{Module}.Clean.VentTimeout");
_pumpTimeout = SC.GetValue<int>($"PM.{Module}.Clean.PumpTimeout");
_pressureLoopCount = SC.GetValue<int>($"PM.{Module}.Clean.CycleCleanCount");
_pressureMin = SC.GetValue<double>($"PM.{Module}.Clean.PumpBasePressure");
_pressureMinDelay = SC.GetValue<int>($"PM.{Module}.Clean.PumpDelayTime");
@ -320,13 +326,13 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTv1, _IoThrottle, _pressureMin, _pmPressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTv1, _IoThrottle, _pressureMin);
//M2、M9、M15、M19-M40 MFC 5s ramp 到0
SetMfcByGroup((int)RoutineStep.SetM2toM40, MfcGroupName.M2toM40, 0, 5);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pressureMin, _pmPressureMaxDiff, _throttleTimeout);
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pressureMin, _throttleTimeout);
TimeDelay((int)RoutineStep.TimeDelay2, 3);
@ -365,7 +371,7 @@ namespace SicModules.PMs.Routines
SetIoValueByGroup((int)RoutineStep.SetEPV2_1, IoGroupName.EPV2, false, _IoValueOpenCloseTimeout);
SetPressureUpOrDown((int)RoutineStep.SetPressUpOrDown1, PressureUpOrDown.Uping);
WaitThrottleToPressureAndSetMfcSpecial((int)RoutineStep.WaitPressureUp, _IoThrottle, _pressureMax, _pmPressureMaxDiff, _pressureMaxTimeout);
WaitThrottleToPressureAndSetMfcSpecial((int)RoutineStep.WaitPressureUp, _IoThrottle, _pressureMax, _ventTimeout);
////设置蝶阀为压力模式
//SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode1, _IoThrottle, 5);
@ -388,7 +394,7 @@ namespace SicModules.PMs.Routines
SetMfcByGroup((int)RoutineStep.SetM2toM40_1, MfcGroupName.M2toM40, 0, 3);
//伺服到0mbar
SetThrottlePressureAndWait((int)RoutineStep.SetPressureDown, _IoThrottle, _pressureMin, _pmPressureMaxDiff, _throttleTimeout);
SetThrottlePressureAndWait((int)RoutineStep.SetPressureDown, _IoThrottle, _pressureMin, _pumpTimeout);
//TimeDelay((int)RoutineStep.TimeDelay8, 3);

View File

@ -359,13 +359,13 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTv1, _IoThrottle, _pressureMin, _pmPressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTv1, _IoThrottle, _pressureMin);
//M2、M9、M15、M19-M40 MFC 3s ramp到0
SetMfcByGroup((int)RoutineStep.SetM2toM40, MfcGroupName.M2toM40, 0, 3);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pressureMin, _pmPressureMaxDiff, _throttleTimeout);
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pressureMin, _throttleTimeout);
TimeDelay((int)RoutineStep.TimeDelay8, 3);

View File

@ -456,10 +456,10 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode_1, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTV_1, _IoThrottle, _pumpBasePressure, _pressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTV_1, _IoThrottle, _pumpBasePressure);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTV_1, _pumpBasePressure, _pressureMaxDiff, _throttleTimeout);
WaitChamberPressDownTo((int)RoutineStep.WaitTV_1, _pumpBasePressure, _throttleTimeout);
}
//关闭蝶阀,再关闭EPV2
@ -523,7 +523,7 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode_2, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTV_2, _IoThrottle, _pumpBasePressure, _pressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTV_2, _IoThrottle, _pumpBasePressure);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTV_2, _pumpBasePressure, _pressureMaxDiff, _throttleTimeout);

View File

@ -222,13 +222,13 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTv1, _IoThrottle, _pumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTv1, _IoThrottle, _pumpBasePressure);
//M2、M9、M15、M19-M40 MFC 3s ramp到0
SetMfcByGroup((int)RoutineStep.SetM2to40, MfcGroupName.M2toM40, 0, 3);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pumpBasePressure, _throttleTimeout);
//蝶阀设置为位置模式,开度设置为最大
SetThrottleToPositionMode((int)RoutineStep.SetTVPositionMode, _IoThrottle, _throttleTimeout);

View File

@ -220,6 +220,10 @@ namespace SicModules.PMs.Routines
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的超时时间
@ -245,6 +249,9 @@ namespace SicModules.PMs.Routines
_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");
@ -342,13 +349,13 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTv1, _IoThrottle, _pumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTv1, _IoThrottle, _pumpBasePressure);
//M2、M9、M15、M19-M40 MFC 5s ramp 到0
SetMfcByGroup((int)RoutineStep.SetM2toM40, MfcGroupName.M2toM40, 0, 5);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _pumpBasePressure, _throttleTimeout);
TimeDelay((int)RoutineStep.TimeDelay2, 3);
@ -387,7 +394,7 @@ namespace SicModules.PMs.Routines
SetIoValueByGroup((int)RoutineStep.SetEPV2_1, IoGroupName.EPV2, false, _IoValueOpenCloseTimeout);
SetPressureUpOrDown((int)RoutineStep.SetPressUpOrDown1, PressureUpOrDown.Uping);
WaitThrottleToPressureAndSetMfcSpecial((int)RoutineStep.WaitPressureUp, _IoThrottle, _ventBasePressure, _pmPressureMaxDiff, _pressureMaxTimeout);
WaitThrottleToPressureAndSetMfcSpecial((int)RoutineStep.WaitPressureUp, _IoThrottle, _ventBasePressure, _ventTimeout);
////设置蝶阀为压力模式
//SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode1, _IoThrottle, 5);
@ -411,7 +418,7 @@ namespace SicModules.PMs.Routines
SetMfcByGroup((int)RoutineStep.SetM2toM40_1, MfcGroupName.M2toM40, 0, 3);
//伺服到0mbar
SetThrottlePressureAndWait((int)RoutineStep.SetPressureDown, _IoThrottle, _pumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
SetThrottlePressureAndWait((int)RoutineStep.SetPressureDown, _IoThrottle, _pumpBasePressure, _pumpTimeout);
//TimeDelay((int)RoutineStep.TimeDelay8, 3);

View File

@ -222,13 +222,13 @@ namespace SicModules.PMs.Routines
SetThrottleToPressModeAndWait((int)RoutineStep.SetTVPressMode, _IoThrottle, 5);
//伺服压力设定值到0mbar
SetThrottlePressureAndWaitSetPoint((int)RoutineStep.SetTv1, _IoThrottle, _vacPumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
SetThrottleToTargetAndNoWait((int)RoutineStep.SetTv1, _IoThrottle, _vacPumpBasePressure);
//M2、M9、M15、M19-M40 MFC 3s ramp到0
SetMfcByGroup((int)RoutineStep.SetM2to40, MfcGroupName.M2toM40, 0, 3);
//等待腔体压力Pump到设定值
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _vacPumpBasePressure, _pmPressureMaxDiff, _throttleTimeout);
WaitChamberPressDownTo((int)RoutineStep.WaitTv1, _vacPumpBasePressure, _throttleTimeout);
//蝶阀设置为位置模式,开度设置为最大
SetThrottleToPositionMode((int)RoutineStep.SetTVPositionMode, _IoThrottle, _throttleTimeout);

View File

@ -54,6 +54,6 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.3.0.40314")]
[assembly: AssemblyVersion("1.3.0.40315")]
[assembly: AssemblyInformationalVersion("手动通用版无EFEM")]