浏览代码

add vpw rotation interlock

chenzk 2 天之前
父节点
当前提交
30b86c960b

+ 1 - 1
PunkHPX8_MainPages/Views/VpwRecipeView.xaml

@@ -134,7 +134,7 @@
 
 
 
-                    <UserControls:GroupTextBoxControl Grid.Row="0" Title="Vacuum Target" Unit="Toor" MinValue="0" MaxValue="200"  Width="300"
+                    <UserControls:GroupTextBoxControl Grid.Row="0" Title="Vacuum Target" Unit="Toor" MinValue="0" MaxValue="1000"  Width="300"
                                                                  IntValue="{Binding Recipe.VacuumTarget,Mode=TwoWay}" 
                                                                  ValidResult="{Binding PropertyValidResultDic[VacuumTarget],Mode=TwoWay}" />
                     <UserControls:GroupTextBoxControl Grid.Row="1" Title="Dry Hold Time" Unit="Sec" MinValue="0" MaxValue="800"  Width="300"

+ 1 - 0
PunkHPX8_RT/Config/System.sccfg

@@ -267,6 +267,7 @@
 		<config default="730" name="LidReleasePressure" nameView="LidReleasePressure" description="lid release pressure" max="10000" min="0" paramter="" tag="" unit="Torr" type="Integer"></config>
 		<config default="10" name="LidReleasePressureTimeout" nameView="LidReleasePressureTimeout" description="time out of lid release pressure" max="3600" min="0" paramter="" tag="" unit="s" type="Integer"></config>
 		<config default="5" name="FlowCheckDelay" nameView="FlowCheckDelay" description="After delay second to check flow" max="60" min="0" paramter="" tag="" unit="s" type="Integer"></config>
+		<config default="5" name="DripValveOpenIdlePeriod" nameView="DripValveOpenIdlePeriod" description="DripValve Open Idle Period" max="60" min="0" paramter="" tag="" unit="min" type="Integer"></config>
 	</configs>
 	<configs name="Linmot" nameView="Linmot">
 		<config default="5000" name="LinmotHoldoffMilliseconds" nameView="LinmotHoldoffMilliseconds" description="Linmot Hold off Milliseconds" max="10000" min="1" paramter="" tag="" unit="ms" type="Integer"></config>

+ 15 - 8
PunkHPX8_RT/Devices/VpwCell/VpwCellDevice.cs

@@ -76,6 +76,14 @@ namespace PunkHPX8_RT.Devices.VpwCell
         /// main device
         /// </summary>
         private VpwMainDevice _vpwMainDevice;
+        /// <summary>
+        /// cell flow 初始设定值
+        /// </summary>
+        private bool _cellFLowSetValue;
+        /// <summary>
+        /// cell流量满足初始设定值自动打开排水阀的时间
+        /// </summary>
+        private int _dripValveOpenIdlePeriod;
         #endregion
 
         #region 属性
@@ -268,16 +276,15 @@ namespace PunkHPX8_RT.Devices.VpwCell
                 LOG.WriteLog(eEvent.ERR_VPW, Module, $"Start rotation paramater is wrong");
                 return false;
             }
-<<<<<<< Updated upstream
             double targetPostion = (int)args[0]  * 6 * (int)args[1];
             object[] param = new object[] { "",targetPostion };
             int degSpeed = (int)args[0] * 6;
             SetRotationSpeed(degSpeed);
-            return _rotationAxis.JogUpPosition("", param);
-=======
-            double targetPostion = (int)args[0] * 6 * (int)args[1];
-            return RotationProfilePosition(targetPostion);
->>>>>>> Stashed changes
+            //return _rotationAxis.JogUpPosition("", param);
+
+            double AfterChangetargetPostion = (int)args[0] * 6 * (int)args[1];
+            return RotationProfilePosition(AfterChangetargetPostion);
+
         }
 
         private bool StopRotationAction(string cmd, object[] args)
@@ -593,9 +600,9 @@ namespace PunkHPX8_RT.Devices.VpwCell
             VpwMainDevice vpwCellDevice = DEVICE.GetDevice<VpwMainDevice>(ModuleName.VPWMain1.ToString());
             if (vpwCellDevice != null)
             {
-                if (!vpwCellDevice.CommonData.ChamberOpened && vpwCellDevice.CommonData.ChamberClosed)
+                if (vpwCellDevice.CommonData.ChamberOpened && !vpwCellDevice.CommonData.ChamberClosed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "chamber is not closed, Cannot execute GotoSavedPosition");
+                    LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "chamber is not closed, Cannot execute Rotation Profile Position");
                     return false;
                 }
             }

+ 1 - 1
PunkHPX8_RT/Modules/VpwCell/VpwVacuumPrewetRoutine.cs

@@ -205,7 +205,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         private bool CheckLidReleaseVacuum()
         {
             double vacuumValue = _vpwCellDevice.CommonData.VacuumPressure;
-            return vacuumValue >= _lidReleasePressure;
+            return vacuumValue <= _lidReleasePressure;
         }
         /// <summary>
         /// open vent valve

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

@@ -25,6 +25,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
     {
         private enum HomeStep
         {
+            CloseDegasPumpAndAdjustValve,
             ChameberUp,
             OpenCellDrainValve,
             HomeRotation,
@@ -143,7 +144,8 @@ namespace PunkHPX8_RT.Modules.VpwMain
         /// <returns></returns>
         public RState Monitor()
         {
-            Runner.Run(HomeStep.ChameberUp, _mainDevice.ChamberUp, CheckChamberClosed, _checkChamberUpDownTimes*1000)
+            Runner.Run(HomeStep.CloseDegasPumpAndAdjustValve, CloseDegasPumpAndAdjustValve, _delay_1ms)
+                .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)
@@ -172,6 +174,14 @@ namespace PunkHPX8_RT.Modules.VpwMain
             return Runner.Status;
         }
         /// <summary>
+        /// 关闭degaspump和degas adjust valve
+        /// </summary>
+        /// <returns></returns>
+        private bool CloseDegasPumpAndAdjustValve()
+        {
+            return _mainDevice.DegasAdjustOff() && _mainDevice.DegasPumpDisable();
+        }
+        /// <summary>
         /// 关闭所有的泵和阀 并返回false
         /// </summary>
         /// <returns></returns>