|
@@ -33,6 +33,8 @@ namespace CyberX8_RT.Modules.Transporter
|
|
|
private enum PutDownStep
|
|
|
{
|
|
|
CheckPreStatus,
|
|
|
+ TargetCellUnclamp,
|
|
|
+ TargetCellUnclampWait,
|
|
|
ElevatorUp,
|
|
|
ElevatorUpWait,
|
|
|
SafeMoveTo,
|
|
@@ -66,6 +68,7 @@ namespace CyberX8_RT.Modules.Transporter
|
|
|
private SystemFacilities _facilities;
|
|
|
private TransporterCommon _transporterCommon;
|
|
|
private TransporterConflictRoutine _conflictRoutine;
|
|
|
+ private LoaderPreTransferUnclampRoutine _preTransferUnclampRoutine;
|
|
|
private LoaderCommonDevice _loaderCommonDevice;
|
|
|
ProcessLayoutCellItem _cellItem;
|
|
|
private int _placeTime;
|
|
@@ -95,6 +98,8 @@ namespace CyberX8_RT.Modules.Transporter
|
|
|
public RState Monitor()
|
|
|
{
|
|
|
Runner.Run(PutDownStep.CheckPreStatus,CheckStartPreConfition,_delay_1ms)
|
|
|
+ .Run(PutDownStep.TargetCellUnclamp, TargetCellUnclamp, _delay_1ms)
|
|
|
+ .WaitWithStopCondition(PutDownStep.TargetCellUnclampWait, TargetCellUnclampEndStatus, TargetCellUnclampStopStatus)
|
|
|
//1. Elevator 移动至Up
|
|
|
.Run(PutDownStep.ElevatorUp, ElevatorGotoUp, _delay_1ms)
|
|
|
.WaitWithStopCondition(PutDownStep.ElevatorUpWait, CheckElevatorPositionEndStatus, CheckElevatorPositionStopStatus)
|
|
@@ -130,7 +135,115 @@ namespace CyberX8_RT.Modules.Transporter
|
|
|
.WaitWithStopCondition(PutDownStep.GantryPositionParkWait, CheckGantryParkPositionStatus, CheckGantryParkPositionRunStop)
|
|
|
.End(PutDownStep.End,NullFun,100);
|
|
|
return Runner.Status;
|
|
|
- }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 目标cell unclamp
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool TargetCellUnclamp()
|
|
|
+ {
|
|
|
+ if (_cellName == "Loader")
|
|
|
+ {
|
|
|
+ bool result = _preTransferUnclampRoutine.Start() == RState.Running;
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_TRANSPORTER, "Loader Unclamp failed", 0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _cellItem = ProcessLayoutManager.Instance.GetProcessLayoutCellItemByModuleName(_cellName);
|
|
|
+ if (_cellItem != null)
|
|
|
+ {
|
|
|
+ if (Enum.TryParse(_cellItem.ModuleName, out ModuleName cellModuleName))
|
|
|
+ {
|
|
|
+ if (ModuleHelper.IsRinse(cellModuleName))
|
|
|
+ {
|
|
|
+ RinseDevice rinseDevice = DEVICE.GetDevice<RinseDevice>(_cellItem.ModuleName);
|
|
|
+ if (rinseDevice != null)
|
|
|
+ {
|
|
|
+ bool result = rinseDevice.WaferHolderClampValveOff();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_TRANSPORTER, $"{_cellItem.ModuleName} Clamp off failed", 0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (ModuleHelper.IsMetal(cellModuleName))
|
|
|
+ {
|
|
|
+ MetalCellDevice metalCellDevice = DEVICE.GetDevice<MetalCellDevice>(_cellItem.ModuleName);
|
|
|
+ if (metalCellDevice != null)
|
|
|
+ {
|
|
|
+ bool result = metalCellDevice.WaferHolderClampOff();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_TRANSPORTER, $"{_cellItem.ModuleName} Clamp off failed", 0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 目标Cell Unclamp状态
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool TargetCellUnclampEndStatus()
|
|
|
+ {
|
|
|
+ if (_cellName == "Loader")
|
|
|
+ {
|
|
|
+ return CommonFunction.CheckRoutineEndState(_preTransferUnclampRoutine);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _cellItem = ProcessLayoutManager.Instance.GetProcessLayoutCellItemByModuleName(_cellName);
|
|
|
+ if (_cellItem != null)
|
|
|
+ {
|
|
|
+ if (Enum.TryParse(_cellItem.ModuleName, out ModuleName cellModuleName))
|
|
|
+ {
|
|
|
+ if (ModuleHelper.IsRinse(cellModuleName))
|
|
|
+ {
|
|
|
+ RinseDevice rinseDevice = DEVICE.GetDevice<RinseDevice>(_cellItem.ModuleName);
|
|
|
+ if (rinseDevice != null)
|
|
|
+ {
|
|
|
+ return rinseDevice.RinseData.WaferHolderClamp == false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (ModuleHelper.IsMetal(cellModuleName))
|
|
|
+ {
|
|
|
+ MetalCellDevice metalCellDevice = DEVICE.GetDevice<MetalCellDevice>(_cellItem.ModuleName);
|
|
|
+ if (metalCellDevice != null)
|
|
|
+ {
|
|
|
+ return metalCellDevice.ClampOff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 目标Cell Unclamp运行中止状态
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool TargetCellUnclampStopStatus()
|
|
|
+ {
|
|
|
+ if (_cellName == "Loader")
|
|
|
+ {
|
|
|
+ bool result = CommonFunction.CheckRoutineStopState(_preTransferUnclampRoutine);
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_TRANSPORTER, "Loader Unclamp failed", 0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// Elevator goto Up
|
|
|
/// </summary>
|
|
@@ -527,7 +640,7 @@ namespace CyberX8_RT.Modules.Transporter
|
|
|
{
|
|
|
_placeDelayTime = SC.GetValue<int>($"{preConfig}.PlaceDelaySeconds");
|
|
|
}
|
|
|
-
|
|
|
+ _preTransferUnclampRoutine = new LoaderPreTransferUnclampRoutine(ModuleName.Loader1.ToString());
|
|
|
return Runner.Start(Module, $"Pun Down To {_cellName}");
|
|
|
}
|
|
|
/// <summary>
|