|
@@ -121,6 +121,8 @@ namespace Venus_RT.Modules.VCE
|
|
|
public int CurrentSlot => _vce.CurrentSlot;
|
|
|
public int MoveSlot => moveSlot;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public VCEModuleBase VCEDevice => _vce;
|
|
|
|
|
|
//public int CurrentSlot => currentSlot;
|
|
@@ -430,13 +432,23 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartGotoLP(object[] param)
|
|
|
{
|
|
|
- if (_vce.GotoLP())
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
{
|
|
|
- targetSlot = -1;
|
|
|
- return true;
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
}
|
|
|
else
|
|
|
- return false;
|
|
|
+ {
|
|
|
+ if (_vce.GotoLP())
|
|
|
+ {
|
|
|
+ targetSlot = -1;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -485,7 +497,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartSafeUnLoad(object[] param)
|
|
|
{
|
|
|
- return _unloadRoutine.Start(param) == RState.Running;
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _unloadRoutine.Start(param) == RState.Running;
|
|
|
}
|
|
|
|
|
|
private bool fnSafeLoadTimeout(object[] param)
|
|
@@ -506,7 +525,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartLoadWithSMIF(object[] param)
|
|
|
{
|
|
|
- return _loadwithSMIFRoutine.Start(param) == RState.Running;
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _loadwithSMIFRoutine.Start(param) == RState.Running;
|
|
|
}
|
|
|
|
|
|
private bool fnLoadWithSMIFAbort(object[] param)
|
|
@@ -534,7 +560,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartUnLoadWithSMIF(object[] param)
|
|
|
{
|
|
|
- return _unloadwithSMIFRoutine.Start(param) == RState.Running;
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _unloadwithSMIFRoutine.Start(param) == RState.Running;
|
|
|
}
|
|
|
|
|
|
private bool fnUnLoadWithSMIFAbort(object[] param)
|
|
@@ -562,7 +595,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartSafeLoad(object[] param)
|
|
|
{
|
|
|
- return _loadRoutine.Start(param) == RState.Running;
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _loadRoutine.Start(param) == RState.Running;
|
|
|
}
|
|
|
|
|
|
private bool fnSafeLoadAbort(object[] param)
|
|
@@ -590,7 +630,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartLoadPrepare(object[] param)
|
|
|
{
|
|
|
- return _prepareRoutine.Start(param) == RState.Running;
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _prepareRoutine.Start(param) == RState.Running;
|
|
|
}
|
|
|
|
|
|
private bool fnReadingMapTimeout(object[] param)
|
|
@@ -617,13 +664,23 @@ namespace Venus_RT.Modules.VCE
|
|
|
//升降到槽位
|
|
|
private bool fnStartGoto(object[] param)
|
|
|
{
|
|
|
- if (_vce.Goto(Convert.ToInt32(param[0].ToString())))
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
{
|
|
|
- targetSlot = Convert.ToInt32(param[0]);
|
|
|
- return true;
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
}
|
|
|
else
|
|
|
- return false;
|
|
|
+ {
|
|
|
+ if (_vce.Goto(Convert.ToInt32(param[0].ToString())))
|
|
|
+ {
|
|
|
+ targetSlot = Convert.ToInt32(param[0]);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private bool fnGotingTimeout(object[] param)
|
|
@@ -647,7 +704,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartHome(object[] param)
|
|
|
{
|
|
|
- return _homeRoutine.Start(param) == RState.Running;
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed,_modulename,$"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _homeRoutine.Start(param) == RState.Running;
|
|
|
}
|
|
|
|
|
|
private bool fnHomeTimeout(object[] param)
|
|
@@ -718,7 +782,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartMapping(object[] param)
|
|
|
{
|
|
|
- return _vce.Map();
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _vce.Map();
|
|
|
}
|
|
|
|
|
|
private bool fnMappingTimeout(object[] param)
|
|
@@ -734,7 +805,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartLoading(object[] param)
|
|
|
{
|
|
|
- return _vce.Load();
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _vce.Load();
|
|
|
}
|
|
|
|
|
|
private bool fnLoadingTimeout(object[] param)
|
|
@@ -750,7 +828,14 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool fnStartUnLoading(object[] param)
|
|
|
{
|
|
|
- return _vce.UnLoad();
|
|
|
+ if (!Singleton<RouteManager>.Instance.seTM.VCECanMove(_modulename))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _modulename, $"{_modulename} cannot move as {_modulename}SlitDoor is Open and Robot not extend sensor is off!");
|
|
|
+ PostMsg(VceMSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return _vce.UnLoad();
|
|
|
}
|
|
|
|
|
|
private bool fnUnLoadingTimeout(object[] param)
|