|
@@ -30,7 +30,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
private enum PickStep
|
|
|
{
|
|
|
WaitPMReady,
|
|
|
- WaitforControlPressure,
|
|
|
+ OpenMFSlitDoor,
|
|
|
PMPrepare,
|
|
|
ArmExtend,
|
|
|
QueryAWC,
|
|
@@ -42,7 +42,6 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
SavePickeData,
|
|
|
NotifyDone,
|
|
|
CloseSlitDoor,
|
|
|
- CloseLinerDoor,
|
|
|
EndDelay
|
|
|
}
|
|
|
|
|
@@ -55,15 +54,13 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
private PMEntity _pmModule;
|
|
|
private int _ExtendTimeout = 120 * 1000;
|
|
|
private int _RetractTimeout = 120 * 1000;
|
|
|
- private JetPMBase _chamber;
|
|
|
- private bool NeedControlPressure;
|
|
|
private int _controlPressureSetPoint = 90;
|
|
|
- private int _controlFlowSetPoint = 10;
|
|
|
+ private int _controlFlowSetPoint = 10;
|
|
|
//private DateTime _starttime;
|
|
|
private bool _queryAwc;
|
|
|
private bool havelinerdoor;
|
|
|
|
|
|
- public SEMFPMPickRoutine(TMBase honghutm, ITransferRobot robot,ModuleName module) : base(module)
|
|
|
+ public SEMFPMPickRoutine(TMBase honghutm, ITransferRobot robot, ModuleName module) : base(module)
|
|
|
{
|
|
|
_tm = honghutm;
|
|
|
_robot = robot;
|
|
@@ -83,15 +80,6 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
_targetSlot = pickItem.Peek().SourceSlot;
|
|
|
_hand = pickItem.Peek().RobotHand;
|
|
|
|
|
|
- _chamber = DEVICE.GetDevice<JetPMBase>(_targetModule.ToString());//(JetChamber)SC.GetValue<int>($"{_targetModule}.ChamberType");
|
|
|
- if ( _chamber.ChamberType== JetChamber.VenusDE)
|
|
|
- {
|
|
|
- havelinerdoor = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- havelinerdoor = false;
|
|
|
- }
|
|
|
if (ModuleHelper.IsPm(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
|
|
|
{
|
|
|
_pmModule = Singleton<RouteManager>.Instance.GetPM(_targetModule);
|
|
@@ -119,14 +107,6 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
_ExtendTimeout = SC.GetValue<int>($"{Module}.ExtendTimeout") * 1000;
|
|
|
_RetractTimeout = SC.GetValue<int>($"{Module}.RetractTimeout") * 1000;
|
|
|
_pickdelay = SC.GetValue<int>($"{_targetModule}.PickDelayTime");
|
|
|
- if (Singleton<RouteManager>.Instance.GetPM(_targetModule).IsOnline)
|
|
|
- {
|
|
|
- NeedControlPressure = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- NeedControlPressure = false;
|
|
|
- }
|
|
|
Reset();
|
|
|
return Runner.Start(Module, $"Pick from {_targetModule}");
|
|
|
}
|
|
@@ -134,8 +114,8 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
public RState Monitor()
|
|
|
{
|
|
|
Runner.Wait(PickStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
|
|
|
- .RunIf(PickStep.WaitforControlPressure, NeedControlPressure, StartControlPressure, IsPressureReady, _delay_60s)
|
|
|
- .Run(PickStep.PMPrepare, ModulePrepare, IsModulePrepareReady,_delay_60s)
|
|
|
+ .Run(PickStep.OpenMFSlitDoor, OpenSlitDoor, CheckSlitDoorOpen)
|
|
|
+ .Run(PickStep.PMPrepare, ModulePrepare, IsModulePrepareReady, _delay_60s)
|
|
|
.Delay(PickStep.PickDelay, _pickdelay)
|
|
|
.Run(PickStep.ArmExtend, ArmExtend, WaitRobotExtendDone, _ExtendTimeout)
|
|
|
.Run(PickStep.QueryAWC, QueryAWC, WaitRobotQueryDone, _delay_1s)
|
|
@@ -143,25 +123,34 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
.Delay(PickStep.PickDelay1, _pickdelay)
|
|
|
.Run(PickStep.ArmRetract, ArmRetract, WaitRobotRetractDone, _RetractTimeout)
|
|
|
.Run(PickStep.SavePickeData, RecordAWCData, NullFun)
|
|
|
+ .Run(PickStep.CloseSlitDoor, PMDoorClose, WaitPMDoorClose)
|
|
|
.Run(PickStep.NotifyDone, NotifyPMDone, _delay_50ms)
|
|
|
.Delay(PickStep.PickDelay2, _delay_50ms)
|
|
|
- .Run(PickStep.CloseSlitDoor, PMDoorClose, WaitPMDoorClose)
|
|
|
- .RunIf(PickStep.CloseLinerDoor, havelinerdoor, PMLinerDoorClose, WaitPMLinerDoorClose)
|
|
|
.End(PickStep.EndDelay, NullFun, _delay_50ms);
|
|
|
|
|
|
|
|
|
return Runner.Status;
|
|
|
}
|
|
|
+
|
|
|
+ private bool OpenSlitDoor()
|
|
|
+ {
|
|
|
+ return _tm.TurnSlitDoor(_targetModule,true);
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool CheckSlitDoorOpen()
|
|
|
+ {
|
|
|
+ return _tm.CheckSlitValveOpen(_targetModule);
|
|
|
+ }
|
|
|
+
|
|
|
private bool ModulePrepare()
|
|
|
{
|
|
|
_pmModule.PostMsg(PMEntity.MSG.PreparePick);
|
|
|
- //_tm.TurnSlitDoor(_targetModule, true);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
private bool IsModulePrepareReady()
|
|
|
{
|
|
|
- return _pmModule.Status == PMEntity.PMStatus.Ready_For_Pick && _pmModule.IsSlitDoorOpen;
|
|
|
+ return _pmModule.Status == PMEntity.PMStatus.Ready_For_Pick;
|
|
|
}
|
|
|
|
|
|
private bool ArmExtend()
|
|
@@ -196,31 +185,6 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
- private bool IsPressureReady()
|
|
|
- {
|
|
|
- double ControlPressure = SC.GetValue<int>($"{_targetModule}.ControlPressureSetPoint");
|
|
|
- //double PMPressure = Singleton<RouteManager>.Instance.GetPM(_targetModule).ChamberPressure;
|
|
|
- double PMPressure = (double)DATA.Poll($"{_targetModule}.ChamberPressure");
|
|
|
- double range = SC.GetValue<int>($"{_targetModule}.ControlPressureOffset");
|
|
|
- if ((PMPressure >= (ControlPressure - range)) && (PMPressure <= (ControlPressure + range)))
|
|
|
- {
|
|
|
-
|
|
|
- //LOG.Write(eEvent.WARN_DEFAULT_WARN, _targetModule, "current pmpressure"+PMPressure);
|
|
|
- //LOG.Write(eEvent.WARN_DEFAULT_WARN, _targetModule, "DATA current pmpressure"+DATA.Poll($"{_targetModule}.ChamberPressure"));
|
|
|
- //string reason = $"{Module} and TM pressure difference exceeds the max limit {maxPressureDifference}, TMPressure:{TMPressure}, {Module}Pressure:{PMPressure}";
|
|
|
- //LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
|
|
|
- return true;
|
|
|
- }
|
|
|
- else return false;
|
|
|
- }
|
|
|
- private bool StartControlPressure()
|
|
|
- {
|
|
|
- _chamber = DEVICE.GetDevice<JetPMBase>(_targetModule.ToString());
|
|
|
- _controlPressureSetPoint = SC.GetValue<int>($"{_targetModule}.ControlPressureSetPoint");
|
|
|
- _controlFlowSetPoint = SC.GetValue<int>($"{_targetModule}.ControlPressureN2FlowSetPoint");
|
|
|
- _chamber.StartControlPressure(_controlPressureSetPoint, _controlFlowSetPoint);
|
|
|
- return true;
|
|
|
- }
|
|
|
private bool QueryAWC()
|
|
|
{
|
|
|
if (!_queryAwc)
|
|
@@ -300,11 +264,6 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
return _tm.TurnSlitDoor(_targetModule, false);
|
|
|
}
|
|
|
|
|
|
- private bool PMLinerDoorClose()
|
|
|
- {
|
|
|
- LOG.Write(eEvent.WARN_TM, Module, $"PMPick Close Liner Door Again");
|
|
|
- return _chamber.SetLinerDoor(false, out _);
|
|
|
- }
|
|
|
private bool WaitPMDoorClose()
|
|
|
{
|
|
|
if (_tm.CheckSlitValveClose(_targetModule))
|
|
@@ -319,19 +278,6 @@ namespace Venus_RT.Modules.TM.VenusEntity
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private bool WaitPMLinerDoorClose()
|
|
|
- {
|
|
|
- if (_chamber.CheckLinerDoorClose())
|
|
|
- {
|
|
|
- LOG.Write(eEvent.WARN_TM, Module, $"PMPick Check LinerDoor Close");
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- LOG.Write(eEvent.WARN_TM, Module, $"PMPick Check not Close LinerDoor");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
public void Abort()
|
|
|
{
|
|
|
_robot.Halt();
|