Explorar el Código

1. SETM will be Init while While SETM Abort Homing
2. TurboPumpPumping Valve turn on will check dryPump is open
3. Add ShareCOM for chiller
4. Check HeGasSetpoint > 0 Before HeFlow ON

zhouhr hace 1 año
padre
commit
12fa756895

+ 6 - 2
Venus/Venus_MainPages/ViewModels/OverVenusSEViewModel.cs

@@ -1313,8 +1313,12 @@ namespace Venus_MainPages.ViewModels
                 {
                     InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetBacksideHeFlow", HeGasSetpoint);
                 }
-                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", (int)ValveType.PVHe3, true);
-                InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", (int)ValveType.HeISO, true);
+
+                if (HeGasSetpoint > 0)
+                {
+                    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", (int)ValveType.PVHe3, true);
+                    InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ControlValve", (int)ValveType.HeISO, true);
+                }
             }
         }
         private void OnRf()

+ 1 - 1
Venus/Venus_RT/App.config

@@ -32,7 +32,7 @@
 	<connectionStrings>
 		<add name="PostgreSQL"   connectionString="Server=localhost;Port=5432;User Id=postgres;Password=123456;Database=postgres;Enlist=true;Preload Reader=true;" />
 		<!--0是other,1是kepler2300,2是Kepler2200,3是VenusSE,4是VenusDE-->
-		<add name="ConfigType"   connectionString="2"/>
+		<add name="ConfigType"   connectionString="3"/>
 	</connectionStrings>
 	<system.serviceModel>
 		<!--<diagnostics>

+ 17 - 1
Venus/Venus_RT/Config/System_VenusSE.sccfg

@@ -456,8 +456,9 @@
 		<configs name="Chiller" nameView="Chiller">
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
 			<!--<config default="false" name="ChillerSameWithPMB" nameView="Chiller Same With PMB" description="enable chiller same with PMB or not" max="1" min="0" tag="" unit="" type="Bool" />-->
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
-			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
+			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet;3:RS485" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM44" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
 			<config default="10" name="ChillerTemperatureOffset" nameView="Chiller Temperature Offset" description="" max="100" min="0" paramter="" tag="" unit="degree" type="Double" />
 			<config default="300" name="SetPointLimitMax" nameView="Chiller Set Point Limit Max" description="" max="500" min="0" paramter="" tag="" unit="degree" type="Double" />
@@ -468,6 +469,7 @@
 		</configs>
 		<configs name="InnerChiller" nameView="InnerChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM45" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -480,6 +482,7 @@
 		</configs>
 		<configs name="OuterChiller" nameView="OuterChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM46" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -492,6 +495,7 @@
 		</configs>
 		<configs name="TopChiller" nameView="TopChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM47" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1094,6 +1098,7 @@
 
 		<configs name="Chiller" nameView="Chiller" >
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="false" name="ChillerSameWithPMA" nameView="Chiller Same With PMA" description="enable chiller same with PMA or not" max="1" min="0" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -1107,6 +1112,7 @@
 		</configs>
 		<configs name="InnerChiller" nameView="InnerChiller" >
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM71" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1119,6 +1125,7 @@
 		</configs>
 		<configs name="OuterChiller" nameView="OuterChiller" >
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM46" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1131,6 +1138,7 @@
 		</configs>
 		<configs name="TopChiller" nameView="TopChiller" >
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM47" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1737,6 +1745,7 @@
 
 		<configs name="Chiller" nameView="Chiller" >
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="false" name="ChillerSameWithPMA" nameView="Chiller Same With PMA" description="enable chiller same with PMA or not" max="1" min="0" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -1750,6 +1759,7 @@
 		</configs>
 		<configs name="InnerChiller" nameView="InnerChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM45" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1762,6 +1772,7 @@
 		</configs>
 		<configs name="OuterChiller" nameView="OuterChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM46" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -1774,6 +1785,7 @@
 		</configs>
 		<configs name="TopChiller" nameView="TopChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM47" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -2370,6 +2382,7 @@
 
 		<configs name="Chiller" nameView="Chiller" >
 			<config default="true" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="false" name="ChillerSameWithPMA" nameView="Chiller Same With PMA" description="enable chiller same with PMA or not" max="1" min="0" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
@@ -2383,6 +2396,7 @@
 		</configs>
 		<configs name="InnerChiller" nameView="InnerChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM45" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -2395,6 +2409,7 @@
 		</configs>
 		<configs name="OuterChiller" nameView="OuterChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM46" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />
@@ -2407,6 +2422,7 @@
 		</configs>
 		<configs name="TopChiller" nameView="TopChiller" >
 			<config default="false" name="EnableChiller" nameView="Enable Chiller" description="enable chiller or not" max="1" min="0" tag="" unit="" type="Bool" />
+			<config default="false" name="ShareCOM" nameView="Share COM" description="true=>Share COM;false => Not Share" max="1" min="0" paramter="" tag="" unit="" type="Bool" />
 			<config default="1" name="MFG" nameView="MFG" description="厂商, 1:SMC; 2, AIRSYS" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="1" name="CommunicationType" nameView="Communication Type" description="0:Analogue; 1:RS232; 2:Ethernet" max="10" min="0" paramter="" tag="" unit="" type="Integer" />
 			<config default="COM47" name="Port" nameView="Port" description="serial port name of pump" max="" min="" paramter="" tag="" unit="" type="String" />

+ 1 - 1
Venus/Venus_RT/Devices/DataDefine.cs

@@ -5,7 +5,7 @@ using Venus_Core;
 
 namespace Venus_RT
 {
-    public enum CommunicationType { Analogue, RS232, Ethernet }
+    public enum CommunicationType { Analogue, RS232, Ethernet, RS485 }
     //public enum BusyFlag { Idle, Busy, Error }
 
     public enum OnlineFlag { Offline, Online }

+ 13 - 0
Venus/Venus_RT/Devices/DeviceManager.cs

@@ -274,6 +274,19 @@ namespace Venus_RT.Instances
                     AddCustomModuleDevice(new AIRSYSChiller(mod, chillerType.ToString()));
                 }
             }
+            else if (SC.GetValue<bool>($"{mod}.{chillerType}.EnableChiller") &&
+                SC.GetValue<int>($"{mod}.{chillerType}.CommunicationType") == (int)CommunicationType.RS485 &&
+                SC.GetValue<bool>($"{mod}.{chillerType}.ShareCOM"))
+            {
+                if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.SMC)
+                {
+                    AddCustomModuleDevice(new SMCShareChiller(mod, chillerType.ToString()));
+                }
+                //else if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.AIRSYS)
+                //{
+                //    AddCustomModuleDevice(new AIRSYSChiller(mod, chillerType.ToString()));
+                //}
+            }
         }
         private void AddMatch(ModuleName mod)
         {

+ 14 - 15
Venus/Venus_RT/Devices/JetVenusSEPM.cs

@@ -985,19 +985,20 @@ namespace Venus_RT.Devices
                     return;
                 }
 
-                //if (vlvType == ValveType.TurboPumpPumping && on)
-                //{
-                //    if (!_MainPump.IsOn)
-                //    {
-                //        LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Pump, cause Dry Pump Valve is not open");
-                //        return;
-                //    }
-
-                //    if (ForelinePressure > SC.GetValue<int>($"{Module}.TurboPumpPumpingValveMinForelinePressure"))
-                //    {
-                        
-                //    }
-                //}
+                if (vlvType == ValveType.TurboPumpPumping && on)
+                {
+                    if (!_MainPump.IsRunning)
+                    {
+                        LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Pump, cause Dry Pump Valve is not open");
+                        return;
+                    }
+
+                    if (ForelinePressure > SC.GetValue<int>($"{Module}.TurboPumpPumpingValveMinForelinePressure"))
+                    {
+                        LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Pump, cause forelinePressure:{ForelinePressure}");
+                        return;
+                    }
+                }
 
                 Valve2IO[vlvType].TurnValve(on, out _);
                 LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{(on ? "打开" : "关闭")} 阀 {vlvType.ToString()}");
@@ -1308,9 +1309,7 @@ namespace Venus_RT.Devices
                 SetPVPressure(pressureSetpoint);
                 OpenValve(ValveType.PV14, true);
                 OpenValve(ValveType.GasFinal, false);
-                //OpenValve(ValveType.N2, true);
                 OpenValve(ValveType.PVN22, true);
-                //FlowGas(12, flowSetpoint);
                 return true;
             }
             else

+ 1 - 1
Venus/Venus_RT/Modules/TM/VenusEntity/SETMEntity.cs

@@ -237,7 +237,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
 
             //Home
             Transition(STATE.Initializing,      FSM_MSG.TIMER,      fnHomeTimeout,      STATE.Idle);
-            Transition(STATE.Initializing,      MSG.Abort,          fnAbortHome,        STATE.Idle);
+            Transition(STATE.Initializing,      MSG.Abort,          fnAbortHome,        STATE.Init);
 
             //Pick
             Transition(STATE.Idle,              MSG.Pick,           fnStartPick,        STATE.Picking);

+ 2 - 0
Venus/Venus_RT/Venus_RT.csproj

@@ -226,6 +226,8 @@
     <Compile Include="Devices\RevtechMatch.cs" />
     <Compile Include="Devices\SkyPump.cs" />
     <Compile Include="Devices\SMCChiller.cs" />
+    <Compile Include="Devices\SMCChillerDrive.cs" />
+    <Compile Include="Devices\SMCShareChiller.cs" />
     <Compile Include="Devices\SMIF\FortrendPLUS500.cs" />
     <Compile Include="Devices\SMIF\ISMIF.cs" />
     <Compile Include="Devices\TruPlasmaRF_Ethercat.cs" />