Browse Source

add chamber up/down check config

chenzk 1 week ago
parent
commit
34be630592

+ 1 - 0
PunkHPX8_RT/Config/System.sccfg

@@ -243,6 +243,7 @@
 		<config default="20" name="MinSpeedDelta" nameView="MinSpeedDelta" description="min speed delta while presure is over range pressure" max="60" min="0" paramter="" tag="" unit="" type="Double"/>
 		<config default="2" name="RangePressure" nameView="RangePressure" description="pressure delta range" max="60" min="0" paramter="" tag="" unit="" type="Double"/>
 		<config default="5" name="DripValveOpenIdlePeriod" nameView="DripValveOpenIdlePeriod" max="60" min="0" description="idle time after total flow over start flow,then open drip valve." paramter="" tag="" unit="minute" type="Integer" />
+		<config default="3" name="ChamberUpDownCheckTime" nameView="ChamberUpDownCheckTime" max="60" min="0" description="check chamber is up/down time" paramter="" tag="" unit="s" type="Integer" />
 		<configs name="PumpPressure" nameView="PumpPressure">
 			<config default="50.0" name="Error_Max" nameView="Error_Max" max="100.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum flow, in liters per minute, above which this interlock will transition to an Error state."/>
 			<config default="40.0" name="Warning_Max" nameView="Warning_Max" max="100.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum flow, in liters per minute, above which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>

+ 7 - 1
PunkHPX8_RT/Modules/VpwMain/VPWHomeRoutine.cs

@@ -37,6 +37,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
             CheckPumpEnable,
             FlowDelay,
             CheckFlow,
+            CheckTotalFlowOk,
             CheckCellFlow,
             StopRotation,
             CheckStopStatus,
@@ -114,6 +115,10 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// Cell注意集合
         /// </summary>
         private Dictionary<string,double> _cellFlows = new Dictionary<string, double>();
+        /// <summary>
+        /// 检验chamber是否上升/下降到位
+        /// </summary>
+        private int _checkChamberUpDownTimes = 3;
         #endregion
 
         /// <summary>
@@ -137,7 +142,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         public RState Monitor()
         {
-            Runner.Run(HomeStep.ChameberUp, _mainDevice.ChamberUp, CheckChamberClosed, _delay_1s)
+            Runner.Run(HomeStep.ChameberUp, _mainDevice.ChamberUp, CheckChamberClosed, _checkChamberUpDownTimes*1000)
                 .Run(HomeStep.OpenCellDrainValve, OpenCellDrainValve, CheckCellDrainValveStatus, _delay_2s)
                 .Run(HomeStep.HomeRotation,HomeAllRotation,_delay_1ms)
                 .WaitWithStopCondition(HomeStep.CheckRotationStatus,CheckAllRotationHomeStatus,CheckAllRotationHomeStopStatus)
@@ -577,6 +582,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
             _totalFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.TotalFlowStartLowLimit");
             _cellFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.CellFlowStartLowLimit");
             _degasEnableDelayTime = SC.GetValue<int>("VPWMain.Plumbing.DegasEnableDelayTime");
+            _checkChamberUpDownTimes = SC.GetValue<int>("VPWMain.ChamberUpDownCheckTime");
             return Runner.Start(Module,"VPW Home");
         }
         /// <summary>

+ 6 - 1
PunkHPX8_RT/Modules/VpwMain/VpwPurgeRoutine.cs

@@ -107,6 +107,10 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// Cell注意集合
         /// </summary>
         private Dictionary<string, double> _cellFlows = new Dictionary<string, double>();
+        /// <summary>
+        /// 检验chamber是否上升/下降到位
+        /// </summary>
+        private int _checkChamberUpDownTimes = 3;
         #endregion
 
 
@@ -133,7 +137,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         public RState Monitor()
         {
-            Runner.Run(PurgeStep.ChameberUp, _mainDevice.ChamberUp, CheckChamberClosed, _delay_1s)
+            Runner.Run(PurgeStep.ChameberUp, _mainDevice.ChamberUp, CheckChamberClosed, _checkChamberUpDownTimes*1000)
                 .Run(PurgeStep.SetRotationSpeed, SetRotationSpeed, _delay_1s)
                 .Run(PurgeStep.StartRotation, StartRotation, _delay_1ms)
                 .Wait(PurgeStep.CheckRotationRunning, CheckRotationRunningStatus, 500)
@@ -546,6 +550,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
             _totalFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.TotalFlowStartLowLimit");
             _cellFlowStartLimit = SC.GetValue<double>("VPWMain.Plumbing.CellFlowStartLowLimit");
             _degasEnableDelayTime = SC.GetValue<int>("VPWMain.Plumbing.DegasEnableDelayTime");
+            _checkChamberUpDownTimes = SC.GetValue<int>("VPWMain.ChamberUpDownCheckTime");
             return Runner.Start(Module, "VPW Purge");
         }
  

+ 8 - 2
PunkHPX8_RT/Modules/VpwMain/VpwSimpleHomeRoutine.cs

@@ -1,6 +1,7 @@
 using Aitex.Core.RT.Device;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.Routine;
+using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
 using MECF.Framework.Common.Routine;
 using MECF.Framework.Common.ToolLayout;
@@ -50,6 +51,10 @@ namespace PunkHPX8_RT.Modules.VpwCelMain
         /// vpw cell rotation列表
         /// </summary>
         private List<JetAxisBase> _rotationAxis = new List<JetAxisBase>();
+        /// <summary>
+        /// 检验chamber是否上升/下降到位
+        /// </summary>
+        private int _checkChamberUpDownTimes = 3;
         #endregion
 
         /// <summary>
@@ -75,10 +80,10 @@ namespace PunkHPX8_RT.Modules.VpwCelMain
         public RState Monitor()
         {
             Runner.Run(VpwSimpleHomeStep.CheckPreCondition, CheckPreCondition, _delay_1ms)
-                .Run(VpwSimpleHomeStep.ChamberUp, _mainDevice.ChamberUp, CheckChamberClosed, _delay_1s)
+                .Run(VpwSimpleHomeStep.ChamberUp, _mainDevice.ChamberUp, CheckChamberClosed, _checkChamberUpDownTimes*1000)
                 .Run(VpwSimpleHomeStep.HomeAllRotation, HomeAllRotation,_delay_1s)
                 .WaitWithStopCondition(VpwSimpleHomeStep.CheckAllRotationHome, CheckAllRotationHomed, CheckRotationHomeFailed)
-                .Run(VpwSimpleHomeStep.ChamberDown, _mainDevice.ChamberDown, CheckChamberOpened, _delay_1s)
+                .Run(VpwSimpleHomeStep.ChamberDown, _mainDevice.ChamberDown, CheckChamberOpened, _checkChamberUpDownTimes*1000)
                 .End(VpwSimpleHomeStep.End, NullFun, _delay_1ms);
             return Runner.Status;
         }
@@ -178,6 +183,7 @@ namespace PunkHPX8_RT.Modules.VpwCelMain
             }
             
             _mainDevice = DEVICE.GetDevice<VpwMainDevice>(Module.ToString());
+            _checkChamberUpDownTimes = SC.GetValue<int>("VPWMain.ChamberUpDownCheckTime");
             return Runner.Start(Module, "VPW Simple Home");
         }