|
@@ -80,6 +80,7 @@ namespace CyberX8_RT.Modules.EFEM
|
|
private Queue<int> _lpWaferIndex = new Queue<int>(); //记录有LP有Wafer的slot号
|
|
private Queue<int> _lpWaferIndex = new Queue<int>(); //记录有LP有Wafer的slot号
|
|
|
|
|
|
private int _moveTimeout = 20 * 1000;
|
|
private int _moveTimeout = 20 * 1000;
|
|
|
|
+ private int _dummySlotNumber = 0;
|
|
|
|
|
|
public RobotCycleRoutine(EfemBase efem) : base(ModuleName.EfemRobot)
|
|
public RobotCycleRoutine(EfemBase efem) : base(ModuleName.EfemRobot)
|
|
{
|
|
{
|
|
@@ -104,7 +105,7 @@ namespace CyberX8_RT.Modules.EFEM
|
|
{
|
|
{
|
|
return RState.Failed;
|
|
return RState.Failed;
|
|
}
|
|
}
|
|
- if (!CheckPreCondition())
|
|
|
|
|
|
+ if (!CheckPreCondition()) //检验前提条件
|
|
{
|
|
{
|
|
return RState.Failed;
|
|
return RState.Failed;
|
|
}
|
|
}
|
|
@@ -171,35 +172,7 @@ namespace CyberX8_RT.Modules.EFEM
|
|
|
|
|
|
return Runner.Start(Module, "Robot Cycle start");
|
|
return Runner.Start(Module, "Robot Cycle start");
|
|
}
|
|
}
|
|
- //更新dummy的位置
|
|
|
|
- private bool UpdateMoveItem()
|
|
|
|
- {
|
|
|
|
- if (_lpWaferIndex.Count > 0)
|
|
|
|
- {
|
|
|
|
- _lpToAlignerMoveItem.Peek().SourceSlot = _lpWaferIndex.Dequeue(); //更新从LP取片的位置
|
|
|
|
- if (_targetDummy != ModuleName.Unknown)
|
|
|
|
- {
|
|
|
|
- _alignerToDummyMoveItem.Peek().DestinationSlot++; //更新放到Dummy的位置
|
|
|
|
- _dummyToLpMoveItem.Peek().SourceSlot++; //更新从dummy取片的位置,送回LP
|
|
|
|
- _dummyToSrdMoveItem.Peek().SourceSlot++;//更新从dummy取片的位置,送到Srd
|
|
|
|
- }
|
|
|
|
- _dummyToLpMoveItem.Peek().DestinationSlot = _lpToAlignerMoveItem.Peek().SourceSlot;//更新放回LP的位置。
|
|
|
|
- _srdToLpMoveItem.Peek().DestinationSlot = _lpToAlignerMoveItem.Peek().SourceSlot;//更新放回LP的位置。
|
|
|
|
- }
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- //清除MoveItem
|
|
|
|
- private bool ClearMoveItem()
|
|
|
|
- {
|
|
|
|
- _lpToAlignerMoveItem.Clear();
|
|
|
|
- _alignerToDummyMoveItem.Clear();
|
|
|
|
- _alignerToSrdMoveItem.Clear();
|
|
|
|
- _dummyToLpMoveItem.Clear();
|
|
|
|
- _dummyToSrdMoveItem.Clear();
|
|
|
|
- _srdToLpMoveItem.Clear();
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
public RState Monitor()
|
|
public RState Monitor()
|
|
{
|
|
{
|
|
Runner.LoopStart(RobotCycleStep.LPCycleStrat, "LP Cycle Start", _waferCount, NullFun, _delay_1ms)
|
|
Runner.LoopStart(RobotCycleStep.LPCycleStrat, "LP Cycle Start", _waferCount, NullFun, _delay_1ms)
|
|
@@ -216,6 +189,7 @@ namespace CyberX8_RT.Modules.EFEM
|
|
.LoopRunWithStopStatus(RobotCycleStep.PickFromAlignerCheck, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
.LoopRunWithStopStatus(RobotCycleStep.PickFromAlignerCheck, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
() => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from aligner failed"))
|
|
() => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from aligner failed"))
|
|
|
|
|
|
|
|
+ //从Aligner到dummy
|
|
.LoopRunIf(RobotCycleStep.PlaceToDummy, _targetDummy != ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_alignerToDummyMoveItem) == RState.Running; }, _delay_1ms)
|
|
.LoopRunIf(RobotCycleStep.PlaceToDummy, _targetDummy != ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_alignerToDummyMoveItem) == RState.Running; }, _delay_1ms)
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PlaceToDummyCheck, _targetDummy != ModuleName.Unknown,() => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PlaceToDummyCheck, _targetDummy != ModuleName.Unknown,() => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
() => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to dummy failed"))
|
|
() => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to dummy failed"))
|
|
@@ -224,22 +198,22 @@ namespace CyberX8_RT.Modules.EFEM
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PickFromDummyCheck, _targetDummy != ModuleName.Unknown,() => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PickFromDummyCheck, _targetDummy != ModuleName.Unknown,() => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
() => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from dummy failed"))
|
|
() => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from dummy failed"))
|
|
|
|
|
|
- //从Dummy到SRD的
|
|
|
|
- .LoopRunIf(RobotCycleStep.PlaceToSrd, _targetSrd != ModuleName.Unknown && _targetDummy!=ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_alignerToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
|
|
- .LoopRunIfWithStopStatus(RobotCycleStep.PlaceToSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
|
|
- () => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to srd failed"))
|
|
|
|
- .LoopRunIf(RobotCycleStep.PickFromSrd, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return _efemPickRoutine.Start(_alignerToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
|
|
- .LoopRunIfWithStopStatus(RobotCycleStep.PickFromSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
|
|
- () => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from srd failed"))
|
|
|
|
-
|
|
|
|
//从Aligner到SRD的
|
|
//从Aligner到SRD的
|
|
- .LoopRunIf(RobotCycleStep.PlaceToSrd, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_dummyToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
|
|
|
|
+ .LoopRunIf(RobotCycleStep.PlaceToSrd, _targetSrd != ModuleName.Unknown && _targetDummy==ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_alignerToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PlaceToSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PlaceToSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
() => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to srd failed"))
|
|
() => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to srd failed"))
|
|
- .LoopRunIf(RobotCycleStep.PickFromSrd, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return _efemPickRoutine.Start(_dummyToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
|
|
|
|
+ .LoopRunIf(RobotCycleStep.PickFromSrd, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return _efemPickRoutine.Start(_alignerToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PickFromSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PickFromSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy == ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
() => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from srd failed"))
|
|
() => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from srd failed"))
|
|
|
|
|
|
|
|
+ //从dummy到SRD的
|
|
|
|
+ .LoopRunIf(RobotCycleStep.PlaceToSrd, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_dummyToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
|
|
+ .LoopRunIfWithStopStatus(RobotCycleStep.PlaceToSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
|
|
+ () => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to srd failed"))
|
|
|
|
+ .LoopRunIf(RobotCycleStep.PickFromSrd, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return _efemPickRoutine.Start(_dummyToSrdMoveItem) == RState.Running; }, _delay_1ms)
|
|
|
|
+ .LoopRunIfWithStopStatus(RobotCycleStep.PickFromSrdCheck, _targetSrd != ModuleName.Unknown && _targetDummy != ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
|
|
|
|
+ () => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from srd failed"))
|
|
|
|
+
|
|
//从Dummy回LP
|
|
//从Dummy回LP
|
|
.LoopRunIf(RobotCycleStep.PlaceToLP, _targetDummy != ModuleName.Unknown && _targetSrd == ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_dummyToLpMoveItem) == RState.Running; }, _delay_1ms)
|
|
.LoopRunIf(RobotCycleStep.PlaceToLP, _targetDummy != ModuleName.Unknown && _targetSrd == ModuleName.Unknown, () => { return _efemPlaceRoutine.Start(_dummyToLpMoveItem) == RState.Running; }, _delay_1ms)
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PlaceToLPCheck, _targetDummy != ModuleName.Unknown && _targetSrd == ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
.LoopRunIfWithStopStatus(RobotCycleStep.PlaceToLPCheck, _targetDummy != ModuleName.Unknown && _targetSrd == ModuleName.Unknown, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
|
|
@@ -321,14 +295,19 @@ namespace CyberX8_RT.Modules.EFEM
|
|
Stop($"{_targetDummy} dose not have cassette");
|
|
Stop($"{_targetDummy} dose not have cassette");
|
|
}
|
|
}
|
|
WaferInfo[] waferInfos = WaferManager.Instance.GetWafers(_targetDummy);
|
|
WaferInfo[] waferInfos = WaferManager.Instance.GetWafers(_targetDummy);
|
|
- foreach (var item in waferInfos)
|
|
|
|
|
|
+ if(waferInfos.Length > 0)
|
|
{
|
|
{
|
|
- if (item != null && !item.IsEmpty)
|
|
|
|
|
|
+ _dummySlotNumber = waferInfos.Length;
|
|
|
|
+ foreach (var item in waferInfos)
|
|
{
|
|
{
|
|
- Stop($"There are wafers inside the {_targetDummy},cannot do the RobotCycle action");
|
|
|
|
- return false;
|
|
|
|
|
|
+ if (item != null && !item.IsEmpty)
|
|
|
|
+ {
|
|
|
|
+ Stop($"There are wafers inside the {_targetDummy},cannot do the RobotCycle action");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -348,8 +327,36 @@ namespace CyberX8_RT.Modules.EFEM
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
+ //更新取放dummy的位置
|
|
|
|
+ private bool UpdateMoveItem()
|
|
|
|
+ {
|
|
|
|
+ if (_lpWaferIndex.Count > 0)
|
|
|
|
+ {
|
|
|
|
+ _lpToAlignerMoveItem.Peek().SourceSlot = _lpWaferIndex.Dequeue(); //更新从LP取片的位置
|
|
|
|
+ if (_targetDummy != ModuleName.Unknown)
|
|
|
|
+ {
|
|
|
|
+ _alignerToDummyMoveItem.Peek().DestinationSlot = (_alignerToDummyMoveItem.Peek().DestinationSlot + 1) % _dummySlotNumber; //更新放到Dummy的位置
|
|
|
|
+ _dummyToLpMoveItem.Peek().SourceSlot = (_dummyToLpMoveItem.Peek().SourceSlot + 1) % _dummySlotNumber; //更新从dummy取片的位置,送回LP
|
|
|
|
+ _dummyToSrdMoveItem.Peek().SourceSlot = (_dummyToSrdMoveItem.Peek().SourceSlot + 1) % _dummySlotNumber;//更新从dummy取片的位置,送到Srd
|
|
|
|
+ }
|
|
|
|
+ _dummyToLpMoveItem.Peek().DestinationSlot = _lpToAlignerMoveItem.Peek().SourceSlot;//更新从dummy放回LP的位置。
|
|
|
|
+ _srdToLpMoveItem.Peek().DestinationSlot = _lpToAlignerMoveItem.Peek().SourceSlot;//更新从srd放回LP的位置。
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ //清除MoveItem
|
|
|
|
+ private bool ClearMoveItem()
|
|
|
|
+ {
|
|
|
|
+ _lpToAlignerMoveItem.Clear();
|
|
|
|
+ _alignerToDummyMoveItem.Clear();
|
|
|
|
+ _alignerToSrdMoveItem.Clear();
|
|
|
|
+ _dummyToLpMoveItem.Clear();
|
|
|
|
+ _dummyToSrdMoveItem.Clear();
|
|
|
|
+ _srdToLpMoveItem.Clear();
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
-
|
|
|
|
#endregion
|
|
#endregion
|
|
}
|
|
}
|
|
}
|
|
}
|