|
@@ -20,6 +20,7 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
{
|
|
|
enum RoutineStep
|
|
|
{
|
|
|
+ SetRobotActionCommand,
|
|
|
Place,
|
|
|
DoorOpen,
|
|
|
DoorClose,
|
|
@@ -198,6 +199,7 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
|
|
|
public void Abort()
|
|
|
{
|
|
|
+ _cassetteRobotModule.ResetRobotActionCommand();
|
|
|
_cassetteRobotModule.Stop();
|
|
|
(Singleton<EquipmentManager>.Instance.Modules[_destination] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_cassetteRobotModule.Module), _blade, _destinationSlot, EnumTransferType.Place);
|
|
|
}
|
|
@@ -215,6 +217,9 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
if (_destination == ModuleName.LP1 || _destination == ModuleName.LP2)
|
|
|
SaferDoorOpen((int)RoutineStep.DoorOpen, true, _timeout);
|
|
|
|
|
|
+ if (_cassetteRobotModule.TrigActionCommand != null)
|
|
|
+ SetRobotActionCommand((int)RoutineStep.SetRobotActionCommand, _destination, _timeout);
|
|
|
+
|
|
|
Place((int)RoutineStep.Place, _destination, _destinationSlot, _blade, _timeout);
|
|
|
|
|
|
if (_destination == ModuleName.LP1 || _destination == ModuleName.LP2)
|
|
@@ -230,10 +235,12 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
}
|
|
|
catch (RoutineFaildException ex)
|
|
|
{
|
|
|
+ _cassetteRobotModule.ResetRobotActionCommand();
|
|
|
(Singleton<EquipmentManager>.Instance.Modules[_destination] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_cassetteRobotModule.Module), _blade, _destinationSlot, EnumTransferType.Place);
|
|
|
return Result.FAIL;
|
|
|
}
|
|
|
|
|
|
+ _cassetteRobotModule.ResetRobotActionCommand();
|
|
|
if (SC.GetValue<bool>("System.IsSimulatorMode"))
|
|
|
CarrierManager.Instance.DeleteCarrier(_destination.ToString());
|
|
|
|
|
@@ -242,7 +249,37 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
Notify("Finished");
|
|
|
return Result.DONE;
|
|
|
}
|
|
|
+ private void SetRobotActionCommand(int id, ModuleName source, int timeout)
|
|
|
+ {
|
|
|
+ _routineStep = (RoutineStep)Enum.Parse(typeof(RoutineStep), id.ToString());
|
|
|
+ Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
|
|
|
+ {
|
|
|
+ Notify($"Set robot action command target position {source}");
|
|
|
+
|
|
|
+ _cassetteRobotModule.SetRobotActionCommand(source, EnumTransferType.Place);
|
|
|
|
|
|
+ return true;
|
|
|
+ }, () =>
|
|
|
+ {
|
|
|
+ return _cassetteRobotModule.CheckRobotActionCommand(source, EnumTransferType.Place);
|
|
|
+ }, timeout * 1000);
|
|
|
+
|
|
|
+ if (ret.Item1)
|
|
|
+ {
|
|
|
+ if (ret.Item2 == Result.FAIL)
|
|
|
+ {
|
|
|
+ _cassetteRobotModule.PlaceCassetteTimeoutAlarm.Set($"place to {source} failed for robot action command interlock");
|
|
|
+ throw (new RoutineFaildException());
|
|
|
+ }
|
|
|
+ else if (ret.Item2 == Result.TIMEOUT) //timeout
|
|
|
+ {
|
|
|
+ _cassetteRobotModule.PlaceCassetteTimeoutAlarm.Set($"timeout over {timeout} seconds");
|
|
|
+ throw (new RoutineFaildException());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ throw (new RoutineBreakException());
|
|
|
+ }
|
|
|
+ }
|
|
|
private void Place(int id, ModuleName target, int slot, Hand hand, int timeout)
|
|
|
{
|
|
|
_routineStep = (RoutineStep)Enum.Parse(typeof(RoutineStep), id.ToString());
|