|
@@ -1,15 +1,20 @@
|
|
|
using Aitex.Core.RT.Device;
|
|
|
+using Aitex.Core.RT.IOCore;
|
|
|
using Aitex.Core.RT.Log;
|
|
|
using Aitex.Core.RT.Routine;
|
|
|
+using Aitex.Core.RT.SCCore;
|
|
|
using Aitex.Core.Util;
|
|
|
+using MECF.Framework.Common.Equipment;
|
|
|
using MECF.Framework.Common.Routine;
|
|
|
using PunkHPX8_Core;
|
|
|
using PunkHPX8_RT.Devices.VpwCell;
|
|
|
using PunkHPX8_RT.Devices.VpwMain;
|
|
|
+using PunkHPX8_RT.Modules.VpwCell;
|
|
|
using SecsGem.Core.ItemModel;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
+using System.Runtime.CompilerServices;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
@@ -21,17 +26,42 @@ namespace PunkHPX8_RT.Modules.VpwMain
|
|
|
{
|
|
|
ChameberUp,
|
|
|
OpenCellDrainValve,
|
|
|
+ HomeRotation,
|
|
|
+ CheckRotationStatus,
|
|
|
+ StartRotation,
|
|
|
+ CheckRotationRunning,
|
|
|
+ CloseDiwDegas,
|
|
|
+ N2PurgeDelay,
|
|
|
+ CloseN2Purge,
|
|
|
+ BoostPumpEnable,
|
|
|
+ CheckPumpEnable,
|
|
|
+ FlowDelay,
|
|
|
+ CheckFlow,
|
|
|
+ CheckCellFlow,
|
|
|
+ StopRotation,
|
|
|
+ CheckStopStatus,
|
|
|
+ LastHomeRotation,
|
|
|
+ CheckLastHomeRotation,
|
|
|
+ CheckFlowOk,
|
|
|
+ DegasDelay,
|
|
|
+ OpenDegas,
|
|
|
+ ChamberDown,
|
|
|
+ LastCheckStatus,
|
|
|
End
|
|
|
}
|
|
|
|
|
|
#region 常量
|
|
|
+ /// <summary>
|
|
|
+ /// 增加额外一分钟
|
|
|
+ /// </summary>
|
|
|
+ private const int PLUS_TIME = 60000;
|
|
|
#endregion
|
|
|
|
|
|
#region 内部变量
|
|
|
/// <summary>
|
|
|
/// Cell device集合
|
|
|
/// </summary>
|
|
|
- private List<VpwCellDevice> _vpwCellDevices;
|
|
|
+ private List<VpwCellDevice> _vpwCellDevices=new List<VpwCellDevice>();
|
|
|
/// <summary>
|
|
|
/// Main Device
|
|
|
/// </summary>
|
|
@@ -40,6 +70,50 @@ namespace PunkHPX8_RT.Modules.VpwMain
|
|
|
/// cell集合
|
|
|
/// </summary>
|
|
|
private List<VpwCellDevice> _cellLst=new List<VpwCellDevice>();
|
|
|
+ /// <summary>
|
|
|
+ /// N2 Purge时长
|
|
|
+ /// </summary>
|
|
|
+ private int _n2PurgeTime = 15000;
|
|
|
+ /// <summary>
|
|
|
+ /// Flow holder off time
|
|
|
+ /// </summary>
|
|
|
+ private int _flowFaultHolderoffTime = 15000;
|
|
|
+ /// <summary>
|
|
|
+ /// Degas delay时间
|
|
|
+ /// </summary>
|
|
|
+ private int _degasEnableDelayTime = 2000;
|
|
|
+ /// <summary>
|
|
|
+ /// 旋转速度
|
|
|
+ /// </summary>
|
|
|
+ private int _rotationSpeed = 0;
|
|
|
+ /// <summary>
|
|
|
+ /// 总流量起始流量数值
|
|
|
+ /// </summary>
|
|
|
+ private double _totalFlowStartLimit = 2.0;
|
|
|
+ /// <summary>
|
|
|
+ /// Cell起始流量数值
|
|
|
+ /// </summary>
|
|
|
+ private double _cellFlowStartLimit = 2.0;
|
|
|
+ /// <summary>
|
|
|
+ /// total flow合格
|
|
|
+ /// </summary>
|
|
|
+ private bool _totalFlowOk = false;
|
|
|
+ /// <summary>
|
|
|
+ /// cell flow合格集合
|
|
|
+ /// </summary>
|
|
|
+ private Dictionary<string,bool> _cellFlowOk = new Dictionary<string, bool>();
|
|
|
+ /// <summary>
|
|
|
+ /// 检验流量是否ok
|
|
|
+ /// </summary>
|
|
|
+ private bool _checkFlowOk = false;
|
|
|
+ /// <summary>
|
|
|
+ /// 总流量
|
|
|
+ /// </summary>
|
|
|
+ private double _totalFlow = 0;
|
|
|
+ /// <summary>
|
|
|
+ /// Cell注意集合
|
|
|
+ /// </summary>
|
|
|
+ private Dictionary<string,double> _cellFlows = new Dictionary<string, double>();
|
|
|
#endregion
|
|
|
|
|
|
/// <summary>
|
|
@@ -65,6 +139,26 @@ namespace PunkHPX8_RT.Modules.VpwMain
|
|
|
{
|
|
|
Runner.Run(HomeStep.ChameberUp, _mainDevice.ChamberUp, CheckChamberClosed, _delay_1s)
|
|
|
.Run(HomeStep.OpenCellDrainValve, OpenCellDrainValve, CheckCellDrainValveStatus, _delay_2s)
|
|
|
+ .Run(HomeStep.HomeRotation,HomeAllRotation,_delay_1ms)
|
|
|
+ .WaitWithStopCondition(HomeStep.CheckRotationStatus,CheckAllRotationHomeStatus,CheckAllRotationHomeStopStatus)
|
|
|
+ .Run(HomeStep.StartRotation,StartRotation,_delay_1ms)
|
|
|
+ .Wait(HomeStep.CheckRotationRunning,CheckRotationRunningStatus,500)
|
|
|
+ .Run(HomeStep.CloseDiwDegas,CloseDiwDegas)
|
|
|
+ .Delay(HomeStep.N2PurgeDelay,_n2PurgeTime)
|
|
|
+ .Run(HomeStep.CloseN2Purge,_mainDevice.N2PurgeValveOff,_delay_1ms)
|
|
|
+ .Run(HomeStep.BoostPumpEnable,OpenBoostPump,_delay_1ms)
|
|
|
+ .Wait(HomeStep.CheckPumpEnable, () => { return _mainDevice.CommonData.BoosterPumpStatus; },_delay_1s)
|
|
|
+ .Delay(HomeStep.FlowDelay,_flowFaultHolderoffTime)
|
|
|
+ .Run(HomeStep.CheckFlow,CheckTotalFlow,_delay_1ms)
|
|
|
+ .Run(HomeStep.CheckCellFlow,CheckCellFlow,_delay_1ms)
|
|
|
+ .Run(HomeStep.StopRotation,StopRotationAxis,_delay_1ms)
|
|
|
+ .WaitWithStopCondition(HomeStep.CheckRotationStatus,CheckStopPostionEndStatus,CheckStopPostionStopStatus)
|
|
|
+ .Run(HomeStep.CheckFlowOk,CheckFlowOk,_delay_1ms)
|
|
|
+ .DelayIf(HomeStep.DegasDelay,_checkFlowOk,_degasEnableDelayTime)
|
|
|
+ .RunIf(HomeStep.OpenDegas,_checkFlowOk,OpenDegasPump,_delay_1ms)
|
|
|
+ .RunIf(HomeStep.ChamberDown,_checkFlowOk, () => { return _mainDevice.ChamberDown(); },
|
|
|
+ () => { return !_mainDevice.CommonData.ChamberClosed && _mainDevice.CommonData.ChamberOpened; })
|
|
|
+ .Run(HomeStep.LastCheckStatus,LastCheckResult,_delay_1ms)
|
|
|
.End(HomeStep.End,NullFun, _delay_1ms);
|
|
|
return Runner.Status;
|
|
|
}
|
|
@@ -82,19 +176,14 @@ namespace PunkHPX8_RT.Modules.VpwMain
|
|
|
/// <returns></returns>
|
|
|
private bool OpenCellDrainValve()
|
|
|
{
|
|
|
- foreach(var device in _vpwCellDevices)
|
|
|
- {
|
|
|
- VpwCellEntity vpwCellEntity = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(device.Module);
|
|
|
- if (vpwCellEntity.IsAuto||vpwCellEntity.IsManual)
|
|
|
+ foreach(var device in _cellLst)
|
|
|
+ {
|
|
|
+ bool result= device.DrainValveOn();
|
|
|
+ if (!result)
|
|
|
{
|
|
|
- _cellLst.Add(device);
|
|
|
- bool result= device.DrainValveOn();
|
|
|
- if (!result)
|
|
|
- {
|
|
|
- LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"{device.Module} open drain valve failed");
|
|
|
- CloseCellDrainValve();
|
|
|
- return false;
|
|
|
- }
|
|
|
+ LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"{device.Module} open drain valve failed");
|
|
|
+ CloseCellDrainValve();
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
@@ -128,6 +217,346 @@ namespace PunkHPX8_RT.Modules.VpwMain
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ /// Home All Rotation
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool HomeAllRotation()
|
|
|
+ {
|
|
|
+ foreach(var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.HomeRotation();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ CloseCellDrainValve();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 检验所有Rotation Home成功
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckAllRotationHomeStatus()
|
|
|
+ {
|
|
|
+ int count = 0;
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.CheckHomeEndStatus();
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bool success= count == _cellLst.Count ;
|
|
|
+ if (success)
|
|
|
+ {
|
|
|
+ foreach(var item in _cellLst)
|
|
|
+ {
|
|
|
+ item.SetRotationSpeed(_rotationSpeed);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return success;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// rotation电机 home是否停止
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckAllRotationHomeStopStatus()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.CheckRotationStopStatus();
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ CloseCellDrainValve();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 启动rotation
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool StartRotation()
|
|
|
+ {
|
|
|
+ int totalTime =(_n2PurgeTime + _flowFaultHolderoffTime + PLUS_TIME)/1000;
|
|
|
+ int targetPsition = _rotationSpeed * totalTime;
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.RotationProfilePosition(targetPsition);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ StopAllRotation();
|
|
|
+ CloseCellDrainValve();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 检验Rotation是否运动
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckRotationRunningStatus()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.CheckRotationRunning();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ StopAllRotation();
|
|
|
+ CloseCellDrainValve();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 停止所有rotation电机
|
|
|
+ /// </summary>
|
|
|
+ private void StopAllRotation()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ item.StopProfilePosition();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 关闭DiwDegas等
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CloseDiwDegas()
|
|
|
+ {
|
|
|
+ int count = 0;
|
|
|
+ count+=_mainDevice.DiwDegasValveOff()?1:0;
|
|
|
+ count+=_mainDevice.BoosterPumpDisable()?1:0;
|
|
|
+ count+=_mainDevice.N2PurgeValveOn()?1:0;
|
|
|
+ foreach(var item in _cellLst)
|
|
|
+ {
|
|
|
+ count += item.FlowDripOff()?1:0;
|
|
|
+ count += item.FlowSmallOff() ? 1 : 0;
|
|
|
+ count += item.FlowLargeOff() ? 1 : 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ return count==_cellLst.Count*3+3;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 打开Boost Pump
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool OpenBoostPump()
|
|
|
+ {
|
|
|
+ int count = 0;
|
|
|
+ count += _mainDevice.BoosterPumpEnable()?1:0;
|
|
|
+ count += _mainDevice.DiwEnable() ? 1 : 0;
|
|
|
+ count += _mainDevice.DiwProcessOn() ? 1 : 0;
|
|
|
+ count += _mainDevice.DiwDegasValveOn() ? 1 : 0;
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ count += item.FlowDripOn() ? 1 : 0;
|
|
|
+ count += item.FlowSmallOn() ? 1 : 0;
|
|
|
+ count += item.FlowLargeOn() ? 1 : 0;
|
|
|
+ }
|
|
|
+ return count == _cellLst.Count*3+4;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 检验流量
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckTotalFlow()
|
|
|
+ {
|
|
|
+ double totalFlow = _mainDevice.CommonData.DiwTotalFlow;
|
|
|
+ if (totalFlow < _totalFlowStartLimit)
|
|
|
+ {
|
|
|
+ _totalFlowOk = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _totalFlowOk = true;
|
|
|
+ }
|
|
|
+ _totalFlow = totalFlow;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 检验CellFlow
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckCellFlow()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ double cellFlow = item.CommonData.DiwFlow;
|
|
|
+ if (cellFlow < _cellFlowStartLimit)
|
|
|
+ {
|
|
|
+ _cellFlowOk[item.Module] = false;
|
|
|
+ item.FlowSmallOff();
|
|
|
+ item.FlowLargeOff();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _cellFlowOk[item.Module] = true;
|
|
|
+ }
|
|
|
+ _cellFlows[item.Module] = cellFlow;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 停止rotation
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool StopRotationAxis()
|
|
|
+ {
|
|
|
+ foreach(var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.StopProfilePosition();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ CloseCellDrainValve();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 检验停止是否完成
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool CheckStopPostionEndStatus()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.CheckRotationEndStatus();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 检验停止失败状态
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public bool CheckStopPostionStopStatus()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ bool result = item.CheckRotationStopStatus();
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 检验流量是否ok
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckFlowOk()
|
|
|
+ {
|
|
|
+ if (!_totalFlowOk)
|
|
|
+ {
|
|
|
+ _checkFlowOk = false;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ foreach(var item in _cellLst)
|
|
|
+ {
|
|
|
+ if (!_cellFlowOk[item.Module])
|
|
|
+ {
|
|
|
+ _checkFlowOk = false;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _checkFlowOk = true;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 打开Degas Pump和Adjust
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool OpenDegasPump()
|
|
|
+ {
|
|
|
+ int count = 0;
|
|
|
+ count+=_mainDevice.DegasPumpEnable()?1:0;
|
|
|
+ count+=_mainDevice.DegasAdjustOn()?1:0;
|
|
|
+ return count == 2;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 最后确认结果
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool LastCheckResult()
|
|
|
+ {
|
|
|
+ //当前是Main Home
|
|
|
+ if (Module == ModuleName.VPWMain1.ToString())
|
|
|
+ {
|
|
|
+ AllCellPostMsg();
|
|
|
+ if (_totalFlowOk)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"total flow {_totalFlow} is less than {_totalFlowStartLimit}");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ AllCellPostMsg();
|
|
|
+ VpwMainEntity vpwMainEntity = Singleton<RouteManager>.Instance.GetModule<VpwMainEntity>(ModuleName.VPWMain1.ToString());
|
|
|
+ if (_totalFlowOk)
|
|
|
+ {
|
|
|
+ vpwMainEntity.CheckToPostMessage<VPWMainState, VPWMainMsg>(eEvent.INFO_VPWMAIN, ModuleName.VPWMain1.ToString(), (int)VpwCellMsg.EnterIdle);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ vpwMainEntity.PostMsg((int)VPWMainMsg.Error);
|
|
|
+ LOG.WriteLog(eEvent.ERR_VPWMAIN,ModuleName.VPWMain1.ToString(), $"total flow {_totalFlow} is less than {_totalFlowStartLimit}");
|
|
|
+ }
|
|
|
+ if (_cellFlowOk[Module])
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_VPW, Module, $"cell flow {_cellFlows[Module]} is less than {_cellFlowStartLimit}");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 所有cell推送消息
|
|
|
+ /// </summary>
|
|
|
+ private void AllCellPostMsg()
|
|
|
+ {
|
|
|
+ foreach (var item in _cellLst)
|
|
|
+ {
|
|
|
+ //过滤当前本身的cell
|
|
|
+ if (item.Module == Module)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ //若cell流量是ok,则post msg变成idle
|
|
|
+ VpwCellEntity vpwCellEntity = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(item.Module);
|
|
|
+ if (_cellFlowOk[item.Module])
|
|
|
+ {
|
|
|
+ vpwCellEntity.CheckToPostMessage<VPWCellState, VpwCellMsg>(eEvent.INFO_VPW, item.Module, (int)VpwCellMsg.EnterIdle);
|
|
|
+ }
|
|
|
+ else//则cell流量是不ok,则post error msg
|
|
|
+ {
|
|
|
+ vpwCellEntity.PostMsg((int)VpwCellMsg.Error);
|
|
|
+ LOG.WriteLog(eEvent.ERR_VPW, item.Module, $"cell flow {_cellFlows[item.Module]} is less than {_cellFlowStartLimit}");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// 启动
|
|
|
/// </summary>
|
|
|
/// <param name="objs"></param>
|
|
@@ -136,13 +565,48 @@ namespace PunkHPX8_RT.Modules.VpwMain
|
|
|
{
|
|
|
List<VpwCellDevice> lstDevice = (List<VpwCellDevice>)objs[0];
|
|
|
_vpwCellDevices.Clear();
|
|
|
+ _cellFlows.Clear();
|
|
|
_cellLst.Clear();
|
|
|
+ _cellFlowOk.Clear();
|
|
|
+ _totalFlowOk = false;
|
|
|
+ _checkFlowOk = false;
|
|
|
+ _totalFlow = 0;
|
|
|
for (int i = 0; i < lstDevice.Count; i++)
|
|
|
{
|
|
|
_vpwCellDevices.Add(lstDevice[i]);
|
|
|
+ VpwCellEntity vpwCellEntity = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(lstDevice[i].Module);
|
|
|
+ if (vpwCellEntity.IsAuto || vpwCellEntity.IsManual)
|
|
|
+ {
|
|
|
+ _cellLst.Add(lstDevice[i]);
|
|
|
+ if (!CheckRotationSwitchOn(lstDevice[i])){
|
|
|
+ return RState.Failed;
|
|
|
+ }
|
|
|
+ _cellFlowOk[lstDevice[i].Module]=false;
|
|
|
+ }
|
|
|
}
|
|
|
_mainDevice = DEVICE.GetDevice<VpwMainDevice>(Module.ToString());
|
|
|
+ _n2PurgeTime = SC.GetValue<int>("VPWMain.Plumbing.N2PurgeTime");
|
|
|
+ _flowFaultHolderoffTime = SC.GetValue<int>("VPWMain.Plumbing.FlowFaultHoldoffTime");
|
|
|
+ double purgeMotorSpeed = SC.GetValue<double>("VPWMain.Plumbing.PurgeMotorSpeed");
|
|
|
+ _rotationSpeed = (int)(Math.Round(purgeMotorSpeed * 360 / 60,0));
|
|
|
+ _totalFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.TotalFlowStartLowLimit");
|
|
|
+ _cellFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.CellFlowStartLowLimit");
|
|
|
+ _degasEnableDelayTime = SC.GetValue<int>("VPWMain.Plumbing.DegasEnableDelayTime");
|
|
|
return Runner.Start(Module,"VPW Home");
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 检验Rotation电机是否上电
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="device"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckRotationSwitchOn(VpwCellDevice device)
|
|
|
+ {
|
|
|
+ if (!device.CheckRotationSwitchOn())
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"{device.Module} rotation is not switch on");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|