修改tm部分routine

This commit is contained in:
SIC1016\caipeilun 2026-08-18 19:54:36 +08:00
parent 9fa2fd0697
commit 1cc1b8e967
4 changed files with 37 additions and 11 deletions

View File

@ -62,6 +62,8 @@ namespace SicModules.TMs.Routines
private IoLift4 _loadLift; private IoLift4 _loadLift;
private IoLift4 _unLoadLift; private IoLift4 _unLoadLift;
private IoValve PM1ToTm_V70;
public TMBaseRoutine() : base(ModuleName.TM.ToString()) public TMBaseRoutine() : base(ModuleName.TM.ToString())
{ {
Module = ModuleName.TM.ToString(); Module = ModuleName.TM.ToString();
@ -82,6 +84,8 @@ namespace SicModules.TMs.Routines
_reactorSuspectorCheckPM1 = DEVICE.GetDevice<IoSensor>($"PM1.SensorReactorSuspectorCheck"); _reactorSuspectorCheckPM1 = DEVICE.GetDevice<IoSensor>($"PM1.SensorReactorSuspectorCheck");
_reactorSuspectorCheckPM2 = DEVICE.GetDevice<IoSensor>($"PM2.SensorReactorSuspectorCheck"); _reactorSuspectorCheckPM2 = DEVICE.GetDevice<IoSensor>($"PM2.SensorReactorSuspectorCheck");
PM1ToTm_V70 = DEVICE.GetDevice<IoValve>($"PM1.V70");
} }
public virtual Result Start(params object[] objs) public virtual Result Start(params object[] objs)
@ -1694,6 +1698,32 @@ namespace SicModules.TMs.Routines
} }
} }
public void ClosePM1ToTMV70(int id)
{
Tuple<bool, Result> ret = Execute(id, () =>
{
Notify($"Close V70 valve");
if (!PM1ToTm_V70.TurnValve(false, out string reason))
{
Stop(reason);
return false;
}
return true;
});
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
public void SetMFCToSetPoint(int id, IoMFC _mfc, double setPoint) public void SetMFCToSetPoint(int id, IoMFC _mfc, double setPoint)
{ {
Tuple<bool, Result> ret = Execute(id, () => Tuple<bool, Result> ret = Execute(id, () =>

View File

@ -9,6 +9,7 @@ namespace SicModules.TMs.Routines
enum RoutineStep enum RoutineStep
{ {
CloseV77, CloseV77,
CloseV70,
CloseV80, CloseV80,
CloseV85, CloseV85,
TMRobotHome TMRobotHome
@ -47,7 +48,7 @@ namespace SicModules.TMs.Routines
CloseTMVent((int)RoutineStep.CloseV77); CloseTMVent((int)RoutineStep.CloseV77);
//没有V78 //没有V78
SetTMLLBalanceValve((int)RoutineStep.CloseV85, TMDevice,false); SetTMLLBalanceValve((int)RoutineStep.CloseV85, TMDevice,false);
//没有V70 ClosePM1ToTMV70((int)RoutineStep.CloseV70);
ExecuteRoutine((int)RoutineStep.TMRobotHome, _tmRobotHomeRoutine); ExecuteRoutine((int)RoutineStep.TMRobotHome, _tmRobotHomeRoutine);
} }
catch (RoutineBreakException) catch (RoutineBreakException)

View File

@ -171,9 +171,6 @@ namespace SicModules.TMs.Routines
//关闭V77 //关闭V77
CloseTMVent((int)RoutineStep.CloseV77); CloseTMVent((int)RoutineStep.CloseV77);
//关闭V80
//CloseBufferVent((int)RoutineStep.CloseV80);
//打开V82,等待压力低于200mbar(可配置) //打开V82,等待压力低于200mbar(可配置)
OpenSlowPump((int)RoutineStep.SlowPump, TMDevice, _slowFastPumpSwitchPressure, _slowPumpTimeout); OpenSlowPump((int)RoutineStep.SlowPump, TMDevice, _slowFastPumpSwitchPressure, _slowPumpTimeout);

View File

@ -28,6 +28,7 @@ namespace SicModules.TMs.Routines
CloseVentValveDelay, CloseVentValveDelay,
TimeDelay, TimeDelay,
OpenV80, OpenV80,
OpenV77,
CloseV80, CloseV80,
CloseV81, CloseV81,
CloseV82, CloseV82,
@ -195,13 +196,13 @@ namespace SicModules.TMs.Routines
SetMFCToSetPoint((int)RoutineStep.SetMFC1, _mfc60, _mfc60Default1); SetMFCToSetPoint((int)RoutineStep.SetMFC1, _mfc60, _mfc60Default1);
////打开V77,等待压力大于200mbar ////打开V77,等待压力大于200mbar
//OpenSlowVent((int)RoutineStep.OpenSlowVent, _tm, _slowFastVentSwitchPressure, _slowVentTimeout); OpenSlowVent((int)RoutineStep.OpenSlowVent, _tm, _slowFastVentSwitchPressure, _ventTimeOut);
////设定MFC60快充流量 ////设定MFC60快充流量
//SetMFCToSetPoint((int)RoutineStep.SetMFC2, _mfc60, _mfc60Default2); SetMFCToSetPoint((int)RoutineStep.SetMFC2, _mfc60, _mfc60Default2);
////等待压力大于1020mbar ////等待压力大于1020mbar
//OpenFastVent((int)RoutineStep.OpenFastVent, _tm, _ventBasePressure, _fastVentTime); OpenFastVent((int)RoutineStep.OpenFastVent, _tm, _ventBasePressure, _ventTimeOut);
//充气过程中检查是否到达打开快充流量的条件 //充气过程中检查是否到达打开快充流量的条件
OpenVent((int)RoutineStep.OpenVent, _tm, _ventBasePressure, _slowFastVentSwitchPressure, _mfc60Default2, _ventTimeOut); OpenVent((int)RoutineStep.OpenVent, _tm, _ventBasePressure, _slowFastVentSwitchPressure, _mfc60Default2, _ventTimeOut);
@ -211,9 +212,6 @@ namespace SicModules.TMs.Routines
//关闭V77 //关闭V77
CloseSlowVentValve((int)RoutineStep.CloseSlowVent, _tm); CloseSlowVentValve((int)RoutineStep.CloseSlowVent, _tm);
//关闭V80
//CloseBufferVent((int)RoutineStep.CloseV80);
} }
catch (RoutineBreakException) catch (RoutineBreakException)
{ {