diff --git a/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs b/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs index 5ba61c55..9b97fe0f 100644 --- a/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/Base/PMBaseRoutine.cs @@ -1604,48 +1604,6 @@ namespace SicModules.PMs.Routines.Base } } - protected void SetThrottlePressureAndWaitSetPoint(int id, IoThrottleValve2 _IoThrottle, double pressure, double _pmPressureMaxDiff, int timeout) - { - Tuple 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 ret = ExecuteAndWait(id, () => diff --git a/Modules/Mainframe/PMs/Routines/PMCleanRoutine.cs b/Modules/Mainframe/PMs/Routines/PMCleanRoutine.cs index 23aed2cd..1b994065 100644 --- a/Modules/Mainframe/PMs/Routines/PMCleanRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/PMCleanRoutine.cs @@ -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); diff --git a/Modules/Mainframe/PMs/Routines/PMLeakCheckRoutine.cs b/Modules/Mainframe/PMs/Routines/PMLeakCheckRoutine.cs index dfc72461..a78137a7 100644 --- a/Modules/Mainframe/PMs/Routines/PMLeakCheckRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/PMLeakCheckRoutine.cs @@ -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); diff --git a/Modules/Mainframe/PMs/Routines/PMMfcRorRoutine.cs b/Modules/Mainframe/PMs/Routines/PMMfcRorRoutine.cs index e58553f7..15c2f02a 100644 --- a/Modules/Mainframe/PMs/Routines/PMMfcRorRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/PMMfcRorRoutine.cs @@ -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); } //计算 diff --git a/Modules/Mainframe/PMs/Routines/PMPumpRoutine.cs b/Modules/Mainframe/PMs/Routines/PMPumpRoutine.cs index 1b60e7ef..f2fd5bf3 100644 --- a/Modules/Mainframe/PMs/Routines/PMPumpRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/PMPumpRoutine.cs @@ -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); diff --git a/Modules/Mainframe/PMs/Routines/PMPurgeRoutine.cs b/Modules/Mainframe/PMs/Routines/PMPurgeRoutine.cs index 6aa33eeb..3fa06dfc 100644 --- a/Modules/Mainframe/PMs/Routines/PMPurgeRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/PMPurgeRoutine.cs @@ -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); diff --git a/Modules/Mainframe/PMs/Routines/PMVacIdleRoutine.cs b/Modules/Mainframe/PMs/Routines/PMVacIdleRoutine.cs index c9d5cb06..7ad9abe7 100644 --- a/Modules/Mainframe/PMs/Routines/PMVacIdleRoutine.cs +++ b/Modules/Mainframe/PMs/Routines/PMVacIdleRoutine.cs @@ -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);