Browse Source

1 revise vpw vacuum prewet routine retry bug
2 add vpw cell vacuum value twincat logic

chenzk 2 days ago
parent
commit
579a398b22

+ 13 - 1
PunkHPX8_RT/Config/System.sccfg

@@ -210,12 +210,24 @@
 			<config default="-800.0" name="Error_Min" nameView="Error_Min" max="-600.0" min="-800.0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Error state."/>
 			<config default="-760.0" name="Warning_Min" nameView="Warning_Min" max="-600.0" min="-800.0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
 		</configs>
-		<configs name="Exhaust_Pressure" nameView="Exhaust_Pressure">
+		<configs name="Exhaust_Pressure1" nameView="Exhaust_Pressure">
 			<config default="2.0" name="Error_Max" nameView="Error_Max" max="2.0" min="0.5" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum pressure, in psi (pounds per square inch), above which this interlock will transition to an Error state."/>
 			<config default="1.8" name="Warning_Max" nameView="Warning_Max" max="2.0" min="0.5" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum pressure, in psi (pounds per square inch), above which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
 			<config default="0.5" name="Error_Min" nameView="Error_Min" max="2.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Error state."/>
 			<config default="0.7" name="Warning_Min" nameView="Warning_Min" max="2.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
 		</configs>
+		<configs name="Exhaust_Pressure2" nameView="Exhaust_Pressure">
+			<config default="2.0" name="Error_Max" nameView="Error_Max" max="2.0" min="0.5" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum pressure, in psi (pounds per square inch), above which this interlock will transition to an Error state."/>
+			<config default="1.8" name="Warning_Max" nameView="Warning_Max" max="2.0" min="0.5" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum pressure, in psi (pounds per square inch), above which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
+			<config default="0.5" name="Error_Min" nameView="Error_Min" max="2.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Error state."/>
+			<config default="0.7" name="Warning_Min" nameView="Warning_Min" max="2.0" min="0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
+		</configs>
+		<configs name="DIW_Return_Flow" nameView="DIWater_Pressure">
+			<config default="48.0" name="Error_Max" nameView="Error_Max" max="60.0" min="10.0" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum pressure, in psi (pounds per square inch), above which this interlock will transition to an Error state."/>
+			<config default="45.0" name="Warning_Max" nameView="Warning_Max" max="60.0" min="10.0" paramter="" tag="" unit="" type="Double"  description="This value defines the maximum pressure, in psi (pounds per square inch), above which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
+			<config default="25.0" name="Error_Min" nameView="Error_Min" max="60.0" min="10.0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Error state."/>
+			<config default="30.0" name="Warning_Min" nameView="Warning_Min" max="60.0" min="10.0" paramter="" tag="" unit="" type="Double"  description="This value defines the minimum pressure, in psi (pounds per square inch), below which this interlock will transition to an Warning state.  Note corresponding Error_Min/Error_Max testing supersedes this test."/>
+		</configs>
 	</configs>
 	<configs name="SRD">
 		<config default="-500" name="ChuckVacuumOnLimit" nameView="ChuckVacuumOnLimit" description="Chuck vacuum is ON if vacuum pressure is less than this value." max="0" min="-760" paramter="" tag="" unit="s" type="Integer"/>

+ 30 - 13
PunkHPX8_RT/Devices/Facilities/SystemFacilities.cs

@@ -17,8 +17,7 @@ namespace PunkHPX8_RT.Devices.Facilities
     public class SystemFacilities : BaseDevice, IDevice
     {
         #region 常量
-        private const string FACILITIES = "Facilities";
-        private const string FACILITIES_DATA = "Facilities_Data";
+
         private const string CDA_1_PRESSURE = "CDA_1_Pressure";
         private const string CDA_2_PRESSURE = "CDA_2_Pressure";
         private const string N2_1A_PRESSURE = "N2_1A_Pressure";
@@ -29,20 +28,14 @@ namespace PunkHPX8_RT.Devices.Facilities
         private const string HOUSE_CHILLED_WATER_FLOW = "HouseChilledWater_Flow";
         private const string CDA_EXTERNAL_PRESSURE = "CDA_External_Pressure";
         private const string VACUUM_PRESSURE = "Vacuum_Pressure";
-        private const string EXHAUST_PRESSURE = "Exhaust_Pressure";
+        private const string EXHAUST_PRESSURE1 = "Exhaust_Pressure1";
+        private const string EXHAUST_PRESSURE2 = "Exhaust_Pressure2";
+        private const string DIW_RETRUN_FLOW = "DIW_Return_Flow";
         private const string ERROR_MAX = "Error_Max";
         private const string ERROR_MIN = "Error_Min";
         private const string WARNING_MAX = "Warning_Max";
         private const string WARNING_MIN = "Warning_Min";
-        private const string N2_ENABLE = "N2Enable";
-        private const string CDA_ENABLE = "CDAEnable";
-        private const string EXTERNAL_CDA_ENABLE = "ExternalCDAEnable";
-        private const string DI_WATER_ENABLE = "DiWaterEnable";
-        private const string HOUSE_CHILLED_WATER_ENABLE = "HouseChilledWaterEnable";
-        private const string DI_REPLEN_ENABLE = "DiReplenEnable";
-        private const string DI_FILL_ENABLE = "DiFillEnable";
         private const string LOADER_DI_ENABLE = "LoaderDiEnable";
-        private const string FILTER_PURGE_ENABLE = "FilterPurgeEnable";
         private const string N2_1A_PRESSURE_VALUE = "Nitrogen1APressure";
         private const string N2_1B_PRESSURE_VALUE = "Nitrogen1BPressure";
         private const string N2_2A_PRESSURE_VALUE = "Nitrogen2APressure";
@@ -54,7 +47,6 @@ namespace PunkHPX8_RT.Devices.Facilities
         private const string HOUSE_CHILLED_WATER_PRESSURE_VALUE = "HouseChilledWaterPressure";
         private const string EXHAUST_PRESSURE_VALUE = "ExhaustPressure";
         private const string VACUUM_PRESSURE_VALUE = "VacuumPressure";
-        private const string N2_BLANKET_PRESSURE_VALUE = "N2BlanketPressure";
         private const string SAMPLE_ENABLE = "SampleEnable";
         private const string SAMPLE_FLOW_1_ENABLE = "SampleFlow1Enable";
         private const string SAMPLE_FLOW_2_ENABLE = "SampleFlow2Enable";
@@ -67,6 +59,27 @@ namespace PunkHPX8_RT.Devices.Facilities
         private const string ARS_FLUID_DETECT = "ArsFluidDetect";
         private const string PROCESS_FLUID_DETECT = "ProcessFluidDetect";
         private const string SAMPLE_FLUID_DETECT = "SampleFluidDetect";
+        private const string FACILITIES = "Facilities";
+        private const string FACILITIES_DATA = "Facilities_Data";
+        private const string N2_ENABLE = "N2Enable";
+        private const string CDA_ENABLE = "CDAEnable";
+        private const string EXTERNAL_CDA_ENABLE = "ExternalCDAEnable";
+        private const string DI_WATER_ENABLE = "DiWaterEnable";
+        private const string HOUSE_CHILLED_WATER_ENABLE = "HouseChilledWaterEnable";
+        private const string VPW_DI_ENABLE = "VpwDiEnable";
+        private const string DI_REPLEN_ENABLE = "DiReplenEnable";
+        private const string DI_FILL_ENABLE = "DiFillEnable";
+        private const string SRD_DI_ENABLE = "SrdDiEnable";
+        private const string SAMPLE_STATION_ENABLE = "SampleStationEnable";
+        private const string FILTER_PURGE_ENABLE = "FilterPurgeEnable";
+        private const string N2_BLANKET_PRESSURE_VALUE = "N2BlanketPressure";
+        private const string N2_OVERFLOW_PRESSURE_VALUE = "N2OverflowPressure";
+        private const string CLAMSHELL_CYLINDER_PRESSURE_VALUE = "ClamshellCylinderPressure";
+        private const string TILT_CYLINDER_PRESSURE_VALUE = "TiltCylinderPressure";
+        private const string FFU_PLATECELL_PRESSURE_ERROR = "FFUPlateCellPressureError";
+        private const string FFU_CORRIDOR_PRESSURE_ERROR = "FFUCorridorPressureError";
+        private const string FFU_PLATECELL_PRESSURE_PRESSURE = "FFUPlateCellPressure";
+        private const string FFU_CORRIDOR_PRESSURE = "FFUCorridorPressure";
         #endregion
 
         #region 内部常量
@@ -296,8 +309,12 @@ namespace PunkHPX8_RT.Devices.Facilities
             _facilitiesDataDic[CDA_EXTERNAL_PRESSURE_VALUE] = _facilitiesDataList[8];
             _facilitiesDataList.Add(InitialFacilitiesData(VACUUM_PRESSURE));
             _facilitiesDataDic[VACUUM_PRESSURE_VALUE] = _facilitiesDataList[9];
-            _facilitiesDataList.Add(InitialFacilitiesData(EXHAUST_PRESSURE));
+            _facilitiesDataList.Add(InitialFacilitiesData(EXHAUST_PRESSURE1));
             _facilitiesDataDic[EXHAUST_PRESSURE_VALUE] = _facilitiesDataList[10];
+            _facilitiesDataList.Add(InitialFacilitiesData(EXHAUST_PRESSURE2));
+            _facilitiesDataDic[EXHAUST_PRESSURE_VALUE] = _facilitiesDataList[11];
+            _facilitiesDataList.Add(InitialFacilitiesData(DIW_RETRUN_FLOW));
+            _facilitiesDataDic[EXHAUST_PRESSURE_VALUE] = _facilitiesDataList[12];
 
             DATA.Subscribe($"{Module}.{Name}.{FACILITIES_DATA}", () => _facilitiesDataList, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.{Name}.{N2_ENABLE}", () => _n2Enabled, SubscriptionAttribute.FLAG.IgnoreSaveDB);

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

@@ -195,6 +195,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
             if (DateTime.Now.Subtract(_pumpDownTime).TotalMilliseconds >= _pumpDownTimeOut)
             {
                 _isNeedRetry = true;
+                return true;
             }
             return false;
         }
@@ -282,7 +283,7 @@ namespace PunkHPX8_RT.Modules.VpwCell
         private bool LastCheckVacuumValue()
         {
             double vacuumValue = _vpwCellDevice.CommonData.VacuumPressure;
-            if (vacuumValue >= _recipe.VacuumTarget)
+            if (vacuumValue <= _recipe.VacuumTarget)
             {
                 return true;
             }

+ 18 - 1
PunkHPX8_Twincate/PunkHPX8/PlcTest/POUs/MAIN.TcPOU

@@ -388,7 +388,18 @@ ELSE
  	Safety_SDI_CHANNEL_EL1904_NS100_3:=FALSE;
 	Safety_SDI_CHANNEL_EL1904_NS100_4:=FALSE;
 END_IF
-]]></ST>
+
+IF MAIN_IO_RELAY_4CHANNEL_EL2624_N106_1=TRUE AND VPW_PNEU_SMC_EX260_BYTE1.3=TRUE THEN
+	VPW_AI_8CHANNEL_0_10V_EL3068_N105_1:=25000;
+ELSE
+	VPW_AI_8CHANNEL_0_10V_EL3068_N105_1:=29000;
+END_IF
+
+IF MAIN_IO_RELAY_4CHANNEL_EL2624_N106_1=TRUE AND VPW_PNEU_SMC_EX260_BYTE1.4=TRUE THEN
+	VPW_AI_8CHANNEL_0_10V_EL3068_N105_2:=25000;
+ELSE
+	VPW_AI_8CHANNEL_0_10V_EL3068_N105_2:=29000;
+END_IF]]></ST>
     </Implementation>
     <LineIds Name="MAIN">
       <LineId Id="52" Count="5" />
@@ -438,7 +449,13 @@ END_IF
       <LineId Id="716" Count="1" />
       <LineId Id="723" Count="0" />
       <LineId Id="712" Count="0" />
+      <LineId Id="941" Count="0" />
       <LineId Id="690" Count="0" />
+      <LineId Id="942" Count="0" />
+      <LineId Id="944" Count="1" />
+      <LineId Id="943" Count="0" />
+      <LineId Id="947" Count="4" />
+      <LineId Id="946" Count="0" />
     </LineIds>
   </POU>
 </TcPlcObject>