1.修改PM Routine有关超时时间和压力到达条件判断
This commit is contained in:
parent
e7e1330215
commit
23554a905f
|
@ -1604,48 +1604,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, () =>
|
||||
|
|
|
@ -326,7 +326,7 @@ 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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -465,10 +465,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
|
||||
|
@ -532,10 +532,10 @@ 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);
|
||||
WaitChamberPressDownTo((int)RoutineStep.WaitTV_2, _pumpBasePressure, _throttleTimeout);
|
||||
}
|
||||
|
||||
//计算
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -349,7 +349,7 @@ 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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue