2026-06-15 10:56:30 +08:00
|
|
|
|
using Aitex.Core.RT.Log;
|
|
|
|
|
|
using Aitex.Core.RT.Routine;
|
|
|
|
|
|
using Aitex.Core.RT.SCCore;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SicModules.TMs.Routines
|
|
|
|
|
|
{
|
|
|
|
|
|
public class TMHomeRoutine : TMBaseRoutine
|
|
|
|
|
|
{
|
|
|
|
|
|
enum RoutineStep
|
|
|
|
|
|
{
|
2026-08-18 19:54:36 +08:00
|
|
|
|
CloseV77,
|
|
|
|
|
|
CloseV70,
|
2026-06-15 10:56:30 +08:00
|
|
|
|
CloseV80,
|
2026-08-15 10:36:59 +08:00
|
|
|
|
CloseV85,
|
2026-06-15 10:56:30 +08:00
|
|
|
|
TMRobotHome
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int _homeTimeout;
|
|
|
|
|
|
|
|
|
|
|
|
private TMRobotHomeRoutine _tmRobotHomeRoutine =
|
|
|
|
|
|
new TMRobotHomeRoutine();
|
|
|
|
|
|
|
|
|
|
|
|
public TMHomeRoutine()
|
|
|
|
|
|
{
|
|
|
|
|
|
Module = "TM";
|
|
|
|
|
|
Name = "Home";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override Result Start(params object[] objs)
|
|
|
|
|
|
{
|
|
|
|
|
|
Reset();
|
|
|
|
|
|
|
|
|
|
|
|
_homeTimeout = SC.GetValue<int>("TM.HomeTimeout");
|
|
|
|
|
|
|
|
|
|
|
|
_tmRobotHomeRoutine = new TMRobotHomeRoutine();
|
|
|
|
|
|
|
|
|
|
|
|
Notify("Start");
|
|
|
|
|
|
|
|
|
|
|
|
return Result.RUN;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override Result Monitor()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2026-08-15 10:36:59 +08:00
|
|
|
|
//关闭 V77, V78; 关闭 V85;关闭 V70-1, V70-2; Home Robot, Check Load
|
2026-06-15 10:56:30 +08:00
|
|
|
|
CloseTMVent((int)RoutineStep.CloseV77);
|
2026-08-15 10:36:59 +08:00
|
|
|
|
//没有V78
|
|
|
|
|
|
SetTMLLBalanceValve((int)RoutineStep.CloseV85, TMDevice,false);
|
2026-08-18 19:54:36 +08:00
|
|
|
|
ClosePM1ToTMV70((int)RoutineStep.CloseV70);
|
2026-06-15 10:56:30 +08:00
|
|
|
|
ExecuteRoutine((int)RoutineStep.TMRobotHome, _tmRobotHomeRoutine);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (RoutineBreakException)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Result.RUN;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (RoutineFaildException ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
LOG.Error(ex.ToString());
|
|
|
|
|
|
return Result.FAIL;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Notify("Finished");
|
|
|
|
|
|
|
|
|
|
|
|
return Result.DONE;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Abort()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Abort();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|