|
@@ -73,9 +73,9 @@ namespace Venus_RT.Scheduler
|
|
|
_increasingAngle = SC.GetValue<int>($"EFEM.Aligner.IncreasingAngle");
|
|
|
}
|
|
|
|
|
|
- public bool Goto(ModuleName target, int slot )
|
|
|
+ public bool Goto(ModuleName target, int slot)
|
|
|
{
|
|
|
- _entityTaskToken = _entity.InvokeGoto(target, slot );
|
|
|
+ _entityTaskToken = _entity.InvokeGoto(target, slot);
|
|
|
PreviousTarget = target;
|
|
|
|
|
|
LogTaskStart(_task, $"Robot goto {target}.{slot + 1}");
|
|
@@ -83,7 +83,7 @@ namespace Venus_RT.Scheduler
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- public bool Map(ModuleName destination )
|
|
|
+ public bool Map(ModuleName destination)
|
|
|
{
|
|
|
_entityTaskToken = _entity.InvokeMap(destination.ToString());
|
|
|
LogTaskStart(_task, $"{Module} mapping");
|
|
@@ -133,29 +133,31 @@ namespace Venus_RT.Scheduler
|
|
|
|
|
|
public bool PostMoveItems(MoveItem[] items)
|
|
|
{
|
|
|
- foreach (var item in items)
|
|
|
- {
|
|
|
- LOG.Write(eEvent.EV_ROUTER, ModuleName.EfemRobot, $"Post Moving Item: {item.SourceModule} Slot {item.SourceSlot + 1} => {item.DestinationModule} Slot {item.DestinationSlot + 1}");
|
|
|
- }
|
|
|
-
|
|
|
- if (ModuleHelper.IsLoadLock(items.First().Module))
|
|
|
+ if (items.Length > 0)
|
|
|
{
|
|
|
_currentScheduler = new SchedulerItem();
|
|
|
- _currentScheduler.MoveType = EfemEntity.MSG.Swap;
|
|
|
- _currentScheduler.target = items.First().Module;
|
|
|
+ _currentScheduler.moveList = new Queue<MoveItem>();
|
|
|
_currentScheduler.Status = RState.Init;
|
|
|
- _currentScheduler.moveList = new Queue<MoveItem>(items);
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _currentScheduler = new SchedulerItem();
|
|
|
- _currentScheduler.MoveType = items.First().TransferType == EnumMoveType.Pick ? EfemEntity.MSG.Pick : EfemEntity.MSG.Place;
|
|
|
- _currentScheduler.target = items.First().Module;
|
|
|
- _currentScheduler.Status = RState.Init;
|
|
|
- _currentScheduler.moveList = new Queue<MoveItem>(items);
|
|
|
- }
|
|
|
|
|
|
+ foreach (var item in items)
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.EV_ROUTER, ModuleName.EfemRobot, $"Post Moving Item: {item.SourceModule} Slot {item.SourceSlot + 1} => {item.DestinationModule} Slot {item.DestinationSlot + 1}");
|
|
|
+
|
|
|
+ if (ModuleHelper.IsLoadLock(item.Module))
|
|
|
+ {
|
|
|
+ _currentScheduler.MoveType = EfemEntity.MSG.Swap;
|
|
|
+ _currentScheduler.target = item.Module;
|
|
|
+ _currentScheduler.moveList.Enqueue(item);
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _currentScheduler.MoveType = items.First().TransferType == EnumMoveType.Pick ? EfemEntity.MSG.Pick : EfemEntity.MSG.Place;
|
|
|
+ _currentScheduler.target = item.Module;
|
|
|
+ _currentScheduler.moveList.Enqueue(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
RunSchedulers();
|
|
|
return true;
|
|
|
}
|
|
@@ -167,7 +169,7 @@ namespace Venus_RT.Scheduler
|
|
|
|
|
|
if (_entity.IsIdle)
|
|
|
{
|
|
|
- if(_currentScheduler.Status == RState.Init)
|
|
|
+ if (_currentScheduler.Status == RState.Init)
|
|
|
{
|
|
|
foreach (var item in _currentScheduler.moveList)
|
|
|
{
|
|
@@ -182,12 +184,12 @@ namespace Venus_RT.Scheduler
|
|
|
else
|
|
|
_entityTaskToken = (int)FSM_MSG.NONE;
|
|
|
}
|
|
|
- else if(_currentScheduler.Status == RState.Running)
|
|
|
+ else if (_currentScheduler.Status == RState.Running)
|
|
|
{
|
|
|
if (IsAllWafersArrived())
|
|
|
{
|
|
|
- if( _entityTaskToken == (int)EfemEntity.MSG.Pick ||
|
|
|
- _entityTaskToken == (int)EfemEntity.MSG.Place ||
|
|
|
+ if (_entityTaskToken == (int)EfemEntity.MSG.Pick ||
|
|
|
+ _entityTaskToken == (int)EfemEntity.MSG.Place ||
|
|
|
_entityTaskToken == (int)EfemEntity.MSG.Swap)
|
|
|
{
|
|
|
_entityTaskToken = (int)FSM_MSG.NONE;
|
|
@@ -203,7 +205,7 @@ namespace Venus_RT.Scheduler
|
|
|
|
|
|
private bool IsAllWafersArrived()
|
|
|
{
|
|
|
- foreach(var item in _currentScheduler.moveList)
|
|
|
+ foreach (var item in _currentScheduler.moveList)
|
|
|
{
|
|
|
if (WaferManager.Instance.CheckNoWafer(item.DestinationModule, item.DestinationSlot))
|
|
|
return false;
|
|
@@ -217,7 +219,7 @@ namespace Venus_RT.Scheduler
|
|
|
base.ResetTask();
|
|
|
|
|
|
_entityTaskToken = (int)FSM_MSG.NONE;
|
|
|
- if(_currentScheduler != null)
|
|
|
+ if (_currentScheduler != null)
|
|
|
{
|
|
|
_alignAngle = SC.GetValue<int>($"EFEM.Aligner.AlignAngle");
|
|
|
_increasingAngle = SC.GetValue<int>($"EFEM.Aligner.IncreasingAngle");
|
|
@@ -233,14 +235,14 @@ namespace Venus_RT.Scheduler
|
|
|
LogTaskStart(_task, $"Aligning");
|
|
|
|
|
|
_increasingAngle = SC.GetValue<int>($"EFEM.Aligner.IncreasingAngle");
|
|
|
- if(_increasingAngle == 0)
|
|
|
+ if (_increasingAngle == 0)
|
|
|
{
|
|
|
// enable change align angle only with increasing function disable to avoid logic confuse
|
|
|
_alignAngle = SC.GetValue<int>($"EFEM.Aligner.AlignAngle");
|
|
|
}
|
|
|
|
|
|
_alignAngle = (_alignAngle + _increasingAngle) % 360;
|
|
|
- _entityTaskToken = _entity.InvokeAlign(ModuleName.Aligner1.ToString(),0, _alignAngle);
|
|
|
+ _entityTaskToken = _entity.InvokeAlign(ModuleName.Aligner1.ToString(), 0, _alignAngle);
|
|
|
|
|
|
return _entityTaskToken == (int)EfemEntity.MSG.Align;
|
|
|
}
|