|
@@ -14,6 +14,7 @@ using System.Threading.Tasks;
|
|
using Venus_Core;
|
|
using Venus_Core;
|
|
using Venus_RT.Devices;
|
|
using Venus_RT.Devices;
|
|
using Venus_RT.Devices.VCE;
|
|
using Venus_RT.Devices.VCE;
|
|
|
|
+using Venus_RT.Modules.TM.VenusEntity;
|
|
|
|
|
|
namespace Venus_RT.Modules.VCE
|
|
namespace Venus_RT.Modules.VCE
|
|
{
|
|
{
|
|
@@ -32,18 +33,20 @@ namespace Venus_RT.Modules.VCE
|
|
VceModuleBase _vce;
|
|
VceModuleBase _vce;
|
|
HongHuTM _tm;
|
|
HongHuTM _tm;
|
|
int _timeout;
|
|
int _timeout;
|
|
|
|
+ SEMFPumpRoutine pumpRoutine;
|
|
|
|
|
|
public LoadRoutine(ModuleName module, VceModuleBase vce) : base(module)
|
|
public LoadRoutine(ModuleName module, VceModuleBase vce) : base(module)
|
|
{
|
|
{
|
|
_vce = vce;
|
|
_vce = vce;
|
|
|
|
+ pumpRoutine = new SEMFPumpRoutine(DEVICE.GetDevice<HongHuTM>("SETM"),module);
|
|
}
|
|
}
|
|
|
|
|
|
public RState Start(params object[] objs)
|
|
public RState Start(params object[] objs)
|
|
{
|
|
{
|
|
|
|
|
|
_tm = DEVICE.GetDevice<HongHuTM>("SETM");
|
|
_tm = DEVICE.GetDevice<HongHuTM>("SETM");
|
|
- _timeout = SC.GetValue<int>("VCE.MotionTimeout");
|
|
|
|
-
|
|
|
|
|
|
+ _timeout = SC.GetValue<int>($"{Module}.MotionTimeout") *1000;
|
|
|
|
+
|
|
Reset();
|
|
Reset();
|
|
return Runner.Start(Module,"Vce Load Routine");
|
|
return Runner.Start(Module,"Vce Load Routine");
|
|
}
|
|
}
|
|
@@ -51,7 +54,7 @@ namespace Venus_RT.Modules.VCE
|
|
public RState Monitor()
|
|
public RState Monitor()
|
|
{
|
|
{
|
|
Runner.Run(LoadStep.CloseOutDoor, CloseOutDoor, CheckVceIdle, _timeout)
|
|
Runner.Run(LoadStep.CloseOutDoor, CloseOutDoor, CheckVceIdle, _timeout)
|
|
- .Run(LoadStep.Mapping, Mapping, CheckVceIdle, _timeout)
|
|
|
|
|
|
+ .Run(LoadStep.Mapping, Mapping, CheckVceIdle, 25 *1000)
|
|
.Run(LoadStep.ReadMap, ReadMap, CheckVceIdle, _timeout)
|
|
.Run(LoadStep.ReadMap, ReadMap, CheckVceIdle, _timeout)
|
|
.Run(LoadStep.PumpDown, PumpDown, CheckPumpOver)
|
|
.Run(LoadStep.PumpDown, PumpDown, CheckPumpOver)
|
|
.Run(LoadStep.OpenInnerDoor, OpenInnerDoor, CheckInnerDoorOpen)
|
|
.Run(LoadStep.OpenInnerDoor, OpenInnerDoor, CheckInnerDoorOpen)
|
|
@@ -61,23 +64,28 @@ namespace Venus_RT.Modules.VCE
|
|
|
|
|
|
private bool CheckInnerDoorOpen()
|
|
private bool CheckInnerDoorOpen()
|
|
{
|
|
{
|
|
- return _tm.TurnSlitDoor(Module,true);
|
|
|
|
|
|
+ return !_tm.VCESlitDoorClosed;
|
|
}
|
|
}
|
|
|
|
|
|
private bool OpenInnerDoor()
|
|
private bool OpenInnerDoor()
|
|
{
|
|
{
|
|
- return !_tm.VCESlitDoorClosed;
|
|
|
|
|
|
+ return _tm.TurnSlitDoor(Module,true);
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
//
|
|
private bool CheckPumpOver()
|
|
private bool CheckPumpOver()
|
|
{
|
|
{
|
|
- return true;
|
|
|
|
|
|
+ RState ret = pumpRoutine.Monitor();
|
|
|
|
+ if (ret == RState.Failed || ret == RState.Timeout)
|
|
|
|
+ {
|
|
|
|
+ _vce.PostMsg(VceMSG.Error);
|
|
|
|
+ }
|
|
|
|
+ return ret == RState.End;
|
|
}
|
|
}
|
|
|
|
|
|
private bool PumpDown()
|
|
private bool PumpDown()
|
|
{
|
|
{
|
|
- return true;
|
|
|
|
|
|
+ return pumpRoutine.Start() == RState.Running;
|
|
}
|
|
}
|
|
|
|
|
|
private bool ReadMap()
|
|
private bool ReadMap()
|