Browse Source

1 revise vpw vent prewet routine
2 revise facility all on

chenzk 2 weeks ago
parent
commit
aed5bc98a1

+ 10 - 5
PunkHPX8_MainPages/ViewModels/SystemFacilitiesViewModel.cs

@@ -92,6 +92,8 @@ namespace PunkHPX8_MainPages.ViewModels
         private double _plateCellFFUPressure;
         private double _corridorFFUPressure;
 
+        private int _allStatus;
+
         /// <summary>
         /// 定时器
         /// </summary>
@@ -170,7 +172,7 @@ namespace PunkHPX8_MainPages.ViewModels
         
         public double TiltCylinderPressure { get { return _tiltCylinderPressure; } set { SetProperty(ref _tiltCylinderPressure, value); } }
 
-
+        public int AllStatus { get { return _allStatus; } set { SetProperty(ref _allStatus, value); } }
         #region FFU
         public bool PlateCellFFUPressureError { get { return _plateCellFFUPressureError; } set { SetProperty(ref _plateCellFFUPressureError, value); } }
 
@@ -341,8 +343,11 @@ namespace PunkHPX8_MainPages.ViewModels
                     CorridorFFUPressureError = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_CORRIDOR_PRESSURE_ERROR}");
                     PlateCellFFUPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_PLATECELL_PRESSURE_PRESSURE}");
                     CorridorFFUPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_CORRIDOR_PRESSURE}");
-                  
-                   
+
+                    AllStatus = (NitrogenOn && ExtendCdaOn && CdaOn && DiWaterPressureOn && HouseChilledWaterFlowOn && VpwDiWEnable && DiFillEnable && DiReplenEnable && SrdDiWEnable && SampleStationEnable && FilterPurgeEnable) ? 1 :
+                     (!NitrogenOn && !CdaOn && !ExtendCdaOn && !DiWaterPressureOn && !HouseChilledWaterFlowOn && !VpwDiWEnable && !DiFillEnable && !DiReplenEnable && !SrdDiWEnable && !SampleStationEnable && !FilterPurgeEnable) ? 0 : -1;
+
+
                 }
             }
         }
@@ -598,7 +603,7 @@ namespace PunkHPX8_MainPages.ViewModels
         {
             NitrogenOnAction(param);
             CDAOnAction(param);
-            ExternalCDAOnAction(param);
+            //ExternalCDAOnAction(param);
             DiWaterOnAction(param);
             HouseChilledWaterOnAction(param);
             VpwDiwEnableAction(param);
@@ -616,7 +621,7 @@ namespace PunkHPX8_MainPages.ViewModels
         {
             NitrogenOffAction(param);
             CDAOffAction(param);
-            ExternalCDAOffAction(param);
+            //ExternalCDAOffAction(param);
             DiWaterOffAction(param);
             HouseChilledWaterOffAction(param);
             VpwDiwDisableAction(param);

+ 43 - 22
PunkHPX8_RT/Config/Devices/PowerSupplierCfg.xml

@@ -1,30 +1,51 @@
 <?xml version="1.0" encoding="utf-8"?>
 <PowerSupplierConfig>
-  <PowerSupplierDeviceConfig Name="Power1" IpAddress="192.168.0.239" Port="820" Type="1" SendTimeout="2000" RecvTimeout="2000" > 
-    <Device Name="Power1-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000000" UnitScale="1000000" VoltageUnitScale="10000"/>
+  <PowerSupplierDeviceConfig Name="Power1" IpAddress="127.0.0.1" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
+    <Device Name="Power1-1" Address="1"  
+			VoltageUnitSetScale ="1000"
+			VoltageUnitScale="100"
+            HighGradeCurrentSetScale="1000" 
+            HighGradeCurrentScale="1000" 
+			MiddleGradeCurrentSetScale="100000"
+			MiddleGradeCurrentScale="100000"
+			LowGradeCurrentSetScale="1000000"
+			LowGradeCurrentScale="1000000"
+            />
   </PowerSupplierDeviceConfig>
   <PowerSupplierDeviceConfig Name="Power2" IpAddress="10.0.10.102" Port="820" Type="1" SendTimeout="2000" RecvTimeout="2000"> 
-    <Device Name="Power2-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000000" UnitScale="1000000" VoltageUnitScale="10000"/>
-  </PowerSupplierDeviceConfig>
-  <PowerSupplierDeviceConfig Name="Power3" IpAddress="192.168.0.220" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
-    <Device Name="Power3-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
+   <Device Name="Power2-1" Address="1"  
+			VoltageUnitSetScale ="1000"
+			VoltageUnitScale="100"
+            HighGradeCurrentSetScale="1000" 
+            HighGradeCurrentScale="1000" 
+			MiddleGradeCurrentSetScale="100000"
+			MiddleGradeCurrentScale="100000"
+			LowGradeCurrentSetScale="1000000"
+			LowGradeCurrentScale="1000000"
+            />
+  </PowerSupplierDeviceConfig>
+  <PowerSupplierDeviceConfig Name="Power3" IpAddress="192.168.0.200" Port="20" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
+   <Device Name="Power3-1" Address="1"  
+			VoltageUnitSetScale ="1000"
+			VoltageUnitScale="100"
+            HighGradeCurrentSetScale="1000" 
+            HighGradeCurrentScale="1000" 
+			MiddleGradeCurrentSetScale="100000"
+			MiddleGradeCurrentScale="100000"
+			LowGradeCurrentSetScale="1000000"
+			LowGradeCurrentScale="1000000"
+            />
   </PowerSupplierDeviceConfig>
   <PowerSupplierDeviceConfig Name="Power4" IpAddress="10.0.10.104" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
-    <Device Name="Power4-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
-  </PowerSupplierDeviceConfig>
-  <PowerSupplierDeviceConfig Name="Power5" IpAddress="10.0.10.105" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
-    <Device Name="Power5-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
-  </PowerSupplierDeviceConfig>
-  <PowerSupplierDeviceConfig Name="Power6" IpAddress="10.0.10.106" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000" > 
-    <Device Name="Power6-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
-  </PowerSupplierDeviceConfig>
-  <PowerSupplierDeviceConfig Name="Power7" IpAddress="10.0.10.107" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
-    <Device Name="Power7-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
-  </PowerSupplierDeviceConfig>
-  <PowerSupplierDeviceConfig Name="Power8" IpAddress="10.0.10.108" Port="820" Type="0" SendTimeout="2000" RecvTimeout="2000" > 
-    <Device Name="Power8-1" Address="1" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
-  </PowerSupplierDeviceConfig>
-  <PowerSupplierDeviceConfig Name="CMMPower1" IpAddress="127.0.10.1"  Port="505" Type="0" SendTimeout="2000" RecvTimeout="2000"> 
-    <Device Name="CMMPower1-1" Address="2" VoltageUnitSetScale ="1000" UnitSetScale="1000" UnitScale="10000" VoltageUnitScale="10000"/>
+    <Device Name="Power4-1" Address="1"  
+			VoltageUnitSetScale ="1000"
+			VoltageUnitScale="100"
+            HighGradeCurrentSetScale="1000" 
+            HighGradeCurrentScale="1000" 
+			MiddleGradeCurrentSetScale="100000"
+			MiddleGradeCurrentScale="100000"
+			LowGradeCurrentSetScale="1000000"
+			LowGradeCurrentScale="1000000"
+            />
   </PowerSupplierDeviceConfig>
 </PowerSupplierConfig>

+ 0 - 12
PunkHPX8_RT/Devices/SRD/SRDDeviceTimer.cs

@@ -18,9 +18,7 @@ namespace PunkHPX8_RT.Devices.SRD
 
         #region 内部变量
         private PeriodicJob _periodicJob;
-        private JetAxisBase _srd1ArmAxis;
         private JetAxisBase _srd1RotationAxis;
-        private JetAxisBase _srd2ArmAxis;
         private JetAxisBase _srd2RotationAxis;
         private SrdCommonDevice _srd1CommonDevice;
         private SrdCommonDevice _srd2CommonDevice;
@@ -38,9 +36,7 @@ namespace PunkHPX8_RT.Devices.SRD
         /// <returns></returns>
         public bool Initialize()
         {
-            _srd1ArmAxis=DEVICE.GetDevice<JetAxisBase>($"{ModuleName.SRD1}.Arm");
             _srd1RotationAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.SRD1}.Rotation");
-            _srd2ArmAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.SRD2}.Arm");
             _srd2RotationAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.SRD2}.Rotation");
             _srd1CommonDevice = DEVICE.GetDevice<SrdCommonDevice>($"{ModuleName.SRD1}.Common");
             _srd2CommonDevice = DEVICE.GetDevice<SrdCommonDevice>($"{ModuleName.SRD2}.Common");
@@ -66,18 +62,10 @@ namespace PunkHPX8_RT.Devices.SRD
         /// <returns></returns>
         private bool OnTimer()
         {
-            if (_srd1ArmAxis != null)
-            {
-                _srd1ArmAxis.OnTimer();
-            }
             if(_srd1RotationAxis!=null)
             {
                 _srd1RotationAxis.OnTimer();
             }
-            if (_srd2ArmAxis != null)
-            {
-                _srd2ArmAxis.OnTimer();
-            }
             if (_srd2RotationAxis != null)
             {
                 _srd2RotationAxis.OnTimer();

+ 17 - 1
PunkHPX8_RT/Modules/VpwCell/VpwVentPrewetRoutine.cs

@@ -26,6 +26,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
     {
         private enum PrepareStep
         {
+            CloseVacuumpumpAndValve,
             OpenVentValve,
             CheckLidReleaseVacuum,
             CloseVentValve,
@@ -89,7 +90,8 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <returns></returns>
         public RState Monitor()
         {
-            Runner.Run(PrepareStep.OpenVentValve, OpenVentValve, _delay_1ms)
+            Runner.Run(PrepareStep.CloseVacuumpumpAndValve, CloseVacuumpumpAndValve, _delay_1ms)
+                .Run(PrepareStep.OpenVentValve, OpenVentValve, _delay_1ms)
                 .Wait(PrepareStep.CheckLidReleaseVacuum, CheckLidReleaseVacuum, _lidReleasePressureTimeout)
                 .Run(PrepareStep.CloseVentValve, CloseVentValve, _delay_1ms)
                 .Run(PrepareStep.OpenCellValve,OpenCellValve,_delay_1ms)
@@ -100,6 +102,20 @@ namespace PunkHPX8_RT.Modules.VpwCell
             return Runner.Status;
         }
         /// <summary>
+        /// 关闭真空泵和阀
+        /// </summary>
+        /// <returns></returns>
+        private bool CloseVacuumpumpAndValve()
+        {
+            bool result = _mainDevice.VacuumPumpDisable();
+            result &= _vpwCellDevice.VacuumValveOff();
+            if (!result)
+            {
+                NotifyError(eEvent.ERR_VPW, "close vacuum pump and vavuum valve failed", 0);
+            }
+            return result;
+        }
+        /// <summary>
         /// 检验Lid Release真空数值
         /// </summary>
         /// <returns></returns>