Browse Source

1.Datalog添加高温Haeter开关显示
2.TM/LL Vent功能重写,添加平衡阀
3.添加N2 wafer flow报警降低高温heater温度
4.修复ui界面process setp number bug

lixiang 11 months ago
parent
commit
464c53cd94

+ 0 - 4
Venus/Venus_Core/RecipeResult.cs

@@ -1,9 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace Venus_Core
 {

BIN
Venus/Venus_RT/Config/PM/Kepler2200A/Kepler2200ADeviceModel.xml


BIN
Venus/Venus_RT/Config/PM/Kepler2200B/Kepler2200BDeviceModel.xml


+ 5 - 5
Venus/Venus_RT/Config/System_Kepler2200.sccfg

@@ -12,7 +12,7 @@
 		<config default="1" name="MaxTemperatureToleranceToTarget" nameView="Max Temperature Tolerance To Target" description="工艺最大温度差" max="100" min="1" paramter="" tag="" unit="℃" type="Double" />
 		<!--<config default="30" name="DefaultCoolingTime" nameView="Default Cooling Time" description="晶圆默认冷却时间" max="300" min="1" paramter="" tag="" unit="s" type="Integer" />-->
 		<config default="true" name="DisplayPopDialogWhenJobComplete" nameView="Pop Dialog When Job Complete" description="是否弹出Job结束对话框" max="" min="" paramter="" tag="" unit="" type="Bool" />
-		<config default="15" name="PMLLMaxPressureDifference" nameView="Max PM/LL Pressure difference for open slit valve" description="" max="70" min="3" paramter="" tag="" unit="Pa" type="Double" />
+		<!--<config default="15" name="PMLLMaxPressureDifference" nameView="Max PM/LL Pressure difference for open slit valve" description="" max="70" min="3" paramter="" tag="" unit="Pa" type="Double" />-->
 		<config default="15" name="TMLLMaxPressureDifference" nameView="Max TM/LL Pressure difference for open slit valve" description="" max="70" min="3" paramter="" tag="" unit="Pa" type="Double" />
 		<config default="15" name="PMTMMaxPressureDifference" nameView="Max PM/TM Pressure difference for open slit valve" description="" max="70" min="3" paramter="" tag="" unit="Pa" type="Double" />
 		<config default="LLA,PMA,EfemRobot" name="InstalledModules" description="安装的模块" max="" min="" paramter="" tag="" unit="" visible="false" type="String" />
@@ -327,7 +327,7 @@
 		<config default="false" name="EnableGridHeater" nameView="Enable Chamber Grid Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="5" name="RecipeToleranceIgnoreTime" nameView="Ignore Time Before Check Recipe Step Tolerance" description="" max="60" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="1" name="RecipeRunningMode" nameView="0, only run current recipe; 1, include chuck/dechuck recipe" description="" max="5" min="0" paramter="" tag="" unit="" type="Integer" />
-		<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />
+		<!--<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />-->
 		<config default="false" name="IsEnableRecipeExtension" nameView="Is Enable Recipe Extension"  description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="80"   name="ControlPressureSetPoint"       nameView="Control Pressure SetPoint"   description="PM Chamber 控压 设定值" max="300" min="0" paramter="" tag="" unit="Pa" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />
@@ -671,7 +671,7 @@
 		<config default="false" name="EnableGridHeater" nameView="Enable Chamber Grid Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="5" name="RecipeToleranceIgnoreTime" nameView="Ignore Time Before Check Recipe Step Tolerance" description="" max="60" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="1" name="RecipeRunningMode" nameView="0, only run current recipe; 1, include chuck/dechuck recipe" description="" max="5" min="0" paramter="" tag="" unit="" type="Integer" />
-		<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />
+		<!--<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />-->
 		<config default="false" name="IsEnableRecipeExtension" nameView="Is Enable Recipe Extension"  description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="80"   name="ControlPressureSetPoint"       nameView="Control Pressure SetPoint"   description="PM Chamber 控压 设定值" max="300" min="0" paramter="" tag="" unit="Pa" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />
@@ -997,7 +997,7 @@
 		<config default="false" name="EnableGridHeater" nameView="Enable Chamber Grid Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="5" name="RecipeToleranceIgnoreTime" nameView="Ignore Time Before Check Recipe Step Tolerance" description="" max="60" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="1" name="RecipeRunningMode" nameView="0, only run current recipe; 1, include chuck/dechuck recipe" description="" max="5" min="0" paramter="" tag="" unit="" type="Integer" />
-		<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />
+		<!--<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />-->
 		<config default="false" name="IsEnableRecipeExtension" nameView="Is Enable Recipe Extension"  description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="80"   name="ControlPressureSetPoint"       nameView="Control Pressure SetPoint"   description="PM Chamber 控压 设定值" max="300" min="0" paramter="" tag="" unit="Pa" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />
@@ -1322,7 +1322,7 @@
 		<config default="false" name="EnableGridHeater" nameView="Enable Chamber Grid Heater" description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="5" name="RecipeToleranceIgnoreTime" nameView="Ignore Time Before Check Recipe Step Tolerance" description="" max="60" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="1" name="RecipeRunningMode" nameView="0, only run current recipe; 1, include chuck/dechuck recipe" description="" max="5" min="0" paramter="" tag="" unit="" type="Integer" />
-		<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />
+		<!--<config default="100" name="ForelineInterlockPressure" nameView="Foreline Interlock Pressure" description="" max="300" min="60" paramter="" tag="" unit="Pa" type="Double" />-->
 		<config default="false" name="IsEnableRecipeExtension" nameView="Is Enable Recipe Extension"  description="" max="10" min="0" paramter="" tag="" unit="" type="Bool" />
 		<config default="80"   name="ControlPressureSetPoint"       nameView="Control Pressure SetPoint"   description="PM Chamber 控压 设定值" max="300" min="0" paramter="" tag="" unit="Pa" type="Integer" />
 		<config default="300"  name="ControlPressureN2FlowSetPoint"   nameView="Control Pressure N2 Flow SetPoint"   description="PM Chamber 控压 设定值" max="500" min="0" paramter="" tag="" unit="sccm" type="Integer" />

+ 3 - 0
Venus/Venus_RT/Devices/IODevices/IoHighTemperatureHeater.cs

@@ -310,6 +310,9 @@ namespace Venus_RT.Devices.IODevices
 
             DATA.Subscribe($"{Module}.{Name}.Position", () => (int)CurrentPosition-1);
 
+            DATA.Subscribe($"{Module}.{Name}.IsOn", () => DeviceData.HighTemperatureHeaterIsonFeedBack);
+
+
 
             _SetRealFloat(_aoLiftServoPosition1, 20);
             _SetRealFloat(_aoLiftServoPosition2, -30);

+ 28 - 19
Venus/Venus_RT/Devices/JetKepler2200APM.cs

@@ -11,6 +11,7 @@ using Venus_RT.Devices.IODevices;
 using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
 using System.Threading.Tasks;
 using System.Diagnostics;
+using Aitex.Core.Util;
 
 namespace Venus_RT.Devices
 {
@@ -69,8 +70,10 @@ namespace Venus_RT.Devices
         private readonly IoSensor _TurboPumpInterlock;
         private readonly IoSensor _GasBoxDoor;
         private readonly IoSensor _GasBoxPressure;
+        private readonly IoSensor _GasBoxN2Flow_sw;
 
         private readonly IoHighTemperatureHeater _highTemperatureHeater;
+        private readonly F_TRIG _GasBoxN2FlowSwitchTrigger = new F_TRIG();
 
 
         private readonly PumpBase _MainPump;
@@ -189,7 +192,7 @@ namespace Venus_RT.Devices
         public override float PendulumPressure => _pendulumValve.Pressure;
         public override float PendulumPosition => _pendulumValve.Position;
 
-        public new ModuleName Module { get; }     
+        public new ModuleName Module { get; }
 
         public override bool CheckAtm()
         {
@@ -204,7 +207,7 @@ namespace Venus_RT.Devices
         {
             return _slitDoor.State == CylinderState.Close;
         }
-      
+
         public override double TotalGasSetpoint
         {
             get
@@ -297,7 +300,7 @@ namespace Venus_RT.Devices
             _TurboPumpInterlock = DEVICE.GetDevice<IoSensor>($"{Module}.TurboPumpInterlock");
             _GasBoxDoor = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxDoorSW");
             _GasBoxPressure = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxPressureSW");
-
+            _GasBoxN2Flow_sw = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxN2FlowSwitch");
 
             _ForelineTC = DEVICE.GetDevice<IoHeater>($"{Module}.ForelineHeater");
             _WallTC = DEVICE.GetDevice<IoHeater>($"{Module}.WallHeater");
@@ -396,7 +399,7 @@ namespace Venus_RT.Devices
             //    _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.BiasMatch}");
             //}
 
-            _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
+            _foreline_interlock_pressure = SC.GetValue<int>($"{Module}.PendulumValve.ForelinePressureLimit");
 
             _GasRFStopWatch.Stop();
 
@@ -558,12 +561,12 @@ namespace Venus_RT.Devices
                 case ValveType.Mfc6:
                     _Mfc6Valve.TurnValve(on, out _);
                     break;
-                //case ValveType.Mfc7:
-                //    _Mfc7Valve.TurnValve(on, out _);
-                //    break;
-                //case ValveType.Mfc8:
-                //    _Mfc8Valve.TurnValve(on, out _);
-                //    break;
+                    //case ValveType.Mfc7:
+                    //    _Mfc7Valve.TurnValve(on, out _);
+                    //    break;
+                    //case ValveType.Mfc8:
+                    //    _Mfc8Valve.TurnValve(on, out _);
+                    //    break;
                     //default:
                     //    throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
 
@@ -578,26 +581,32 @@ namespace Venus_RT.Devices
             }
 
             CheckPermanentInterlock();
-        }
 
+            CheckHighTemperatureHeaterInterlock();
+        }
 
+        private void CheckHighTemperatureHeaterInterlock()
+        {
+            _GasBoxN2FlowSwitchTrigger.CLK = _GasBoxN2Flow_sw.Value;
+            if (_GasBoxN2FlowSwitchTrigger.Q)
+            {
+                var limitTemperature = SC.GetValue<double>($"{Module}.HighTemperatureHeater.N2WarningTemperatureLimit");
+                SetHighTemperatureHeaterTemperature((int)limitTemperature);
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Gas Box N2 Flow Trigger Warning,HighTemperatureHeater Cool Down to {limitTemperature} ℃");
+            }
+        }
         protected override void CheckPermanentInterlock()
         {
-            //if (ProcessPressure > processPressureLimit && _GuageValve.SetPoint)
-            //{
-            //    _GuageValve.TurnValve(false, out _);
-            //    LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed {processPressureLimit} Pa, Guage Valve (DO-31) closed automaticlly.");
-            //}
             if (ChamberPressure >= processPressureLimit && _GuageValve.SetPoint)
             {
                 _GuageValve.TurnValve(false, out _);
-                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} exceed {processPressureLimit} Pa mtorr, Guage Valve (DO-31) closed automaticlly.");
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} exceed {processPressureLimit} Pa, Guage Valve (DO-31) closed automaticlly.");
             }
 
             if (ChamberPressure < processPressureLimit && !_GuageValve.SetPoint)
             {
                 _GuageValve.TurnValve(true, out _);
-                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} less than {processPressureLimit} Pa mtorr, Guage Valve (DO-31) open automaticlly.");
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} less than {processPressureLimit} Pa, Guage Valve (DO-31) open automaticlly.");
             }
         }
 
@@ -640,7 +649,7 @@ namespace Venus_RT.Devices
 
 
 
-       
+
         public override bool FlowGas(int gasNum, double val)
         {
             if (_gasLines.Length <= gasNum)

+ 28 - 76
Venus/Venus_RT/Devices/JetKepler2200BPM.cs

@@ -11,6 +11,8 @@ using Venus_RT.Devices.IODevices;
 using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
 using System.Threading.Tasks;
 using System.Diagnostics;
+using CommunityToolkit.HighPerformance;
+using Aitex.Core.Util;
 
 namespace Venus_RT.Devices
 {
@@ -72,10 +74,15 @@ namespace Venus_RT.Devices
         private readonly IoSensor _TurboPumpInterlock;
         private readonly IoSensor _GasBoxDoor;
         private readonly IoSensor _GasBoxPressure;
+        private readonly IoSensor _GasBoxN2Flow_sw;
+
+        
 
-        private readonly IoHighTemperatureHeater _highTemperatureHeater;
 
 
+        private readonly IoHighTemperatureHeater _highTemperatureHeater;
+        private readonly F_TRIG _GasBoxN2FlowSwitchTrigger = new F_TRIG();
+
         private readonly PumpBase _MainPump;
         //private readonly ESC5HighVoltage _ESCHV;
         private readonly AdixenTurboPump _TurboPump;
@@ -177,27 +184,7 @@ namespace Venus_RT.Devices
         public override double ProcessPressure => _pendulumValve.Pressure;
         public override double ChamberPressure => _pressureController.PressureGauge.Value;
         public override double ForelinePressure => _pressureController.ForelineGauge.Value;
-        public override double TargetPressure => ChamberPressure;
-        //public override double LoadlockPressure => 0;
-        //public override double ESCHePressure => 0;
-
-        //public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
-        //public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
-
-        //public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
-        //public override bool IsHVOn => _ESCHV.IsOn;
-
-        //public override float CoolantInletTempFB => 0;
-        //public override float CoolantOutletTempFB => 0;
-
-        //public override bool ChillerIsRunning => false;
-
-        //Loadlock_Arm
-        //public override bool IsLoadlockArmRetract => _LoadLockArm.OFFFeedback;
-        //public override bool IsLoadlockArmExtend => _LoadLockArm.ONFeedback;
-        ////Loadlock_Arm DO
-        //public override bool LoadlockArmRetract => _LoadLockArm.OFFSetPoint;
-        //public override bool LoadlockArmExtend => _LoadLockArm.ONSetPoint;
+        public override double TargetPressure => ChamberPressure;      
 
         public override float ReflectPower => _Generator.ReflectPower;
         //public override float BiasReflectPower => _GeneratorBias.ReflectPower;
@@ -220,28 +207,7 @@ namespace Venus_RT.Devices
         public override float PendulumPressure => _pendulumValve.Pressure;
         public override float PendulumPosition => _pendulumValve.Position;
 
-        public new ModuleName Module { get; }
-
-        //public override MovementPosition LiftPinPosition
-        //{
-        //    get
-        //    {
-        //        MovementPosition pos = MovementPosition.Unknown;
-        //        if (_LiftPin == null)
-        //        {
-        //            return MovementPosition.Down;
-        //        }
-        //        if (_LiftPin.ONFeedback && !_LiftPin.OFFFeedback)
-        //        {
-        //            pos = MovementPosition.Up;
-        //        }
-        //        else if (!_LiftPin.ONFeedback && _LiftPin.OFFFeedback)
-        //        {
-        //            pos = MovementPosition.Down;
-        //        }
-        //        return pos;
-        //    }
-        //}
+        public new ModuleName Module { get; }      
 
         public override bool CheckAtm()
         {
@@ -259,16 +225,7 @@ namespace Venus_RT.Devices
         public override bool IsBiasRFAble()
         {
             return false;
-        }
-        //public override bool CheckLiftUp()
-        //{
-        //    return _LiftPin.State == CylinderState.Open;
-        //}
-
-        //public override bool CheckLiftDown()
-        //{
-        //    return _LiftPin.State == CylinderState.Close;
-        //}
+        }     
         public override double TotalGasSetpoint
         {
             get
@@ -360,6 +317,8 @@ namespace Venus_RT.Devices
             _TurboPumpInterlock = DEVICE.GetDevice<IoSensor>($"{Module}.TurboPumpInterlock");
             _GasBoxDoor = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxDoorSW");
             _GasBoxPressure = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxPressureSW");
+            _GasBoxN2Flow_sw = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxN2FlowSwitch");
+
 
 
             _ForelineTC = DEVICE.GetDevice<IoHeater>($"{Module}.ForelineHeater");
@@ -421,19 +380,7 @@ namespace Venus_RT.Devices
                 _Generator = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.Rf}");
             }
 
-            // Ethernet Comet Generator Bias
-            //if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
-            //{
-            //    if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
-            //        SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
-            //    {
-            //        _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
-            //    }
-            //    else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
-            //    {
-            //        _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
-            //    }
-            //}
+         
             processPressureLimit = ConvertPressureUnit.ConvertmTorrToPa(1950);
 
             if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
@@ -461,7 +408,7 @@ namespace Venus_RT.Devices
                 _RFBox = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VenusDevice.RFBox}");
             }
 
-            _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
+            _foreline_interlock_pressure = SC.GetValue<int>($"{Module}.PendulumValve.ForelinePressureLimit");
             //_PressureType = (PressureType)SC.GetValue<int>("System.PressureUnitType");
 
             //DATA.Subscribe($"{Name}.SCR1", () => GetAiValue($"{Module}.AI_CHB_M-HT_SCR1_PWR_OUT"));
@@ -643,26 +590,31 @@ namespace Venus_RT.Devices
             }
 
             CheckPermanentInterlock();
+            CheckHighTemperatureHeaterInterlock();
+        }
+        private void CheckHighTemperatureHeaterInterlock()
+        {
+            _GasBoxN2FlowSwitchTrigger.CLK = _GasBoxN2Flow_sw.Value;
+            if (_GasBoxN2FlowSwitchTrigger.Q)
+            {
+                var limitTemperature = SC.GetValue<double>($"{Module}.HighTemperatureHeater.N2WarningTemperatureLimit");
+                SetHighTemperatureHeaterTemperature((int)limitTemperature);
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Gas Box N2 Flow Trigger Warning,HighTemperatureHeater Cool Down to {limitTemperature} ℃");
+            }
         }
-
 
         protected override void CheckPermanentInterlock()
         {
-            //if (ProcessPressure >= processPressureLimit && _GuageValve.SetPoint)
-            //{
-            //    _GuageValve.TurnValve(false, out _);
-            //    LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed {processPressureLimit} Pa, Guage Valve (DO-31) closed automaticlly.");
-            //}
             if (ChamberPressure >= processPressureLimit && _GuageValve.SetPoint)
             {
                 _GuageValve.TurnValve(false, out _);
-                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} exceed {processPressureLimit} Pa mtorr, Guage Valve (DO-31) closed automaticlly.");
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} exceed {processPressureLimit} Pa, Guage Valve (DO-31) closed automaticlly.");
             }
 
             if (ChamberPressure < processPressureLimit && !_GuageValve.SetPoint)
             {
                 _GuageValve.TurnValve(true, out _);
-                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} less than {processPressureLimit} Pa mtorr, Guage Valve (DO-31) open automaticlly.");
+                LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} less than {processPressureLimit} Pa, Guage Valve (DO-31) open automaticlly.");
             }
         }
 

+ 106 - 73
Venus/Venus_RT/Devices/TM/JetTM.cs

@@ -25,7 +25,7 @@ namespace Venus_RT.Devices
 
         private readonly IoLid _PMALid;
         private readonly IoLid _PMBLid;
-        private readonly IoLid _PMCLid; 
+        private readonly IoLid _PMCLid;
         private readonly IoLid _PMDLid;
 
 
@@ -165,7 +165,7 @@ namespace Venus_RT.Devices
 
         public bool IsTMVentValveOpen => _TMVentValve.Status;
 
-       // public bool IsTMFastVentValveOpen => _TMFastVentValve.Status;
+        // public bool IsTMFastVentValveOpen => _TMFastVentValve.Status;
 
         public bool IsTMPurgeValveOpen => _TMPurgeValve.Status;
         public bool IsTMFastPumpOpen => _TMFastPumpValve.Status;
@@ -187,8 +187,8 @@ namespace Venus_RT.Devices
         public double LLBForelinePressure => _presureCtrl.LLBForelineGauge.Value;
 
 
-        public bool TMPumpIsRunning => _TMPump!=null? _TMPump.IsRunning:false;
-        public  bool LLAPumpIsRunning => _LLAPump != null ? _LLAPump.IsRunning : false;
+        public bool TMPumpIsRunning => _TMPump != null ? _TMPump.IsRunning : false;
+        public bool LLAPumpIsRunning => _LLAPump != null ? _LLAPump.IsRunning : false;
         public bool LLBPumpIsRunning => _LLBPump != null ? _LLBPump.IsRunning : false;
 
 
@@ -225,7 +225,7 @@ namespace Venus_RT.Devices
 
         public bool AllPMSlitDoorClosed
         {
-            get 
+            get
             {
                 if (PMASlitDoorClosed == true && PMBSlitDoorClosed == true && PMCSlitDoorClosed == true && PMDSlitDoorClosed == true)
                 {
@@ -238,11 +238,11 @@ namespace Venus_RT.Devices
             }
         }
 
-        public  Dictionary<ModuleName, ModuleName> PreRotateModules { get; private set; }
+        public Dictionary<ModuleName, ModuleName> PreRotateModules { get; private set; }
 
         public JetTM() : base("TM")
         {
-            _TMLid  = DEVICE.GetDevice<IoLid>($"TM.{VenusDevice.TMLid}");
+            _TMLid = DEVICE.GetDevice<IoLid>($"TM.{VenusDevice.TMLid}");
             _LLALid = DEVICE.GetDevice<IoLid>($"TM.{VenusDevice.LLALid}");
             _LLBLid = DEVICE.GetDevice<IoLid>($"TM.{VenusDevice.LLBLid}");
 
@@ -263,18 +263,18 @@ namespace Venus_RT.Devices
             _PMCSlitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.PMCSlitDoor");
             _PMDSlitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.PMDSlitDoor");
 
-            _TMN2Valve          = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMValveN2}");
-            _TMSoftPumpValve    = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMSoftPumpValve}");
-            _TMFastPumpValve    = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMFastPumpValve}");
-            _TMPurgeValve       = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMPurgeValve}");
-            _TMVentValve        = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMVentValve}");
+            _TMN2Valve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMValveN2}");
+            _TMSoftPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMSoftPumpValve}");
+            _TMFastPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMFastPumpValve}");
+            _TMPurgeValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMPurgeValve}");
+            _TMVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMVentValve}");
             //_TMSoftVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMSoftVentValve}");
             //_TMFastVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMFastVentValve}");
 
             _LLASoftPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLASoftPumpValve}");
-            _LLAFastPumpValve   = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAFastPumpValve}");
-            _LLAPurgeValve      = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAPurgeValve}");
-            _LLAVentValve       = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAVentValve}");
+            _LLAFastPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAFastPumpValve}");
+            _LLAPurgeValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAPurgeValve}");
+            _LLAVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAVentValve}");
 
             _LLASoftVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLASoftVentValve}");
             _LLAFastVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAFastVentValve}");
@@ -283,45 +283,45 @@ namespace Venus_RT.Devices
 
             _TMVacAtmMode = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMVacAtmMode}");
 
-            _TMVentExhaustValve= DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMVentExhaustValve}");
+            _TMVentExhaustValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.TMVentExhaustValve}");
             _LLAVentExhaustValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLAVentExhaustValve}");
             _LLBVentExhaustValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBVentExhaustValve}");
 
 
             _LLBSoftPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBSoftPumpValve}");
-            _LLBFastPumpValve   = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBFastPumpValve}");
-            _LLBPurgeValve      = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBPurgeValve}");
-            _LLBVentValve       = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBVentValve}");
-            _WaferRelayValve    = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.ValveWaterRelay}");
-
-            _TMPowerOn          = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMPowerOn}");
-            _TMInSafty          = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMInSafty}");
-            _WaferLeakSensor    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.WaferLeakSensor}");
+            _LLBFastPumpValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBFastPumpValve}");
+            _LLBPurgeValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBPurgeValve}");
+            _LLBVentValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.LLBVentValve}");
+            _WaferRelayValve = DEVICE.GetDevice<IoValve>($"TM.{VenusDevice.ValveWaterRelay}");
+
+            _TMPowerOn = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMPowerOn}");
+            _TMInSafty = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMInSafty}");
+            _WaferLeakSensor = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.WaferLeakSensor}");
             _EFEMSideDoorClosed = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.EFEMSideDoorClosed}");
-            _TMPCWFlowSwitch    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMPCWFlowSwitch}");
-            _LLAPCWFlowSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLAPCWFlowSwitch}");
-            _LLBPCWFlowSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLBPCWFlowSwitch}");
-            _TMLidClosed        = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMLidClosed}");
-
-            _CDAPressureSwitch      = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.CDAPressureSwitch}");
-            _VaccumPressureSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.VaccumPressureSwitch}");
-            _N2PressureSwitch       = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.N2PressureSwitch}");
-
-            _TMRobotNotExtendPMA    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMA}");
-            _TMRobotNotExtendPMB    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMB}");
-            _TMRobotNotExtendPMC    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMC}");
-            _TMRobotNotExtendPMD    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMD}");
-            _TMRobotNotExtendLLA    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendLLA}");
-            _TMRobotNotExtendLLB    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendLLB}");
-            _EfemRobotNotExtendLLA  = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.EfemRobotNotExtendLLA}");
-            _EfemRobotNotExtendLLB  = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.EfemRobotNotExtendLLB}");
-
-            _TMVacSwitch    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMVacSwitch}");
-            _LLAVacSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLAVacSwitch}");
-            _LLBVacSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLBVacSwitch}");
-            _TMATMSwitch    = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMATMSwitch}");
-            _LLAATMSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLAATMSwitch}");
-            _LLBATMSwitch   = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLBATMSwitch}");
+            _TMPCWFlowSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMPCWFlowSwitch}");
+            _LLAPCWFlowSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLAPCWFlowSwitch}");
+            _LLBPCWFlowSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLBPCWFlowSwitch}");
+            _TMLidClosed = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMLidClosed}");
+
+            _CDAPressureSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.CDAPressureSwitch}");
+            _VaccumPressureSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.VaccumPressureSwitch}");
+            _N2PressureSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.N2PressureSwitch}");
+
+            _TMRobotNotExtendPMA = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMA}");
+            _TMRobotNotExtendPMB = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMB}");
+            _TMRobotNotExtendPMC = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMC}");
+            _TMRobotNotExtendPMD = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendPMD}");
+            _TMRobotNotExtendLLA = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendLLA}");
+            _TMRobotNotExtendLLB = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMRobotNotExtendLLB}");
+            _EfemRobotNotExtendLLA = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.EfemRobotNotExtendLLA}");
+            _EfemRobotNotExtendLLB = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.EfemRobotNotExtendLLB}");
+
+            _TMVacSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMVacSwitch}");
+            _LLAVacSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLAVacSwitch}");
+            _LLBVacSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLBVacSwitch}");
+            _TMATMSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.TMATMSwitch}");
+            _LLAATMSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLAATMSwitch}");
+            _LLBATMSwitch = DEVICE.GetDevice<IoSensor>($"TM.{VenusDevice.LLBATMSwitch}");
 
             _LLAWaferSizeCheck = DEVICE.GetDevice<IoSwitch>($"TM.{VenusDevice.LLAWaferSizeCheckSwitch}");
             _LLBWaferSizeCheck = DEVICE.GetDevice<IoSwitch>($"TM.{VenusDevice.LLBWaferSizeCheckSwitch}");
@@ -329,12 +329,12 @@ namespace Venus_RT.Devices
             _PMBWaferSizeCheck = DEVICE.GetDevice<IoSwitch>($"TM.{VenusDevice.PMBWaferSizeCheckSwitch}");
             _PMCWaferSizeCheck = DEVICE.GetDevice<IoSwitch>($"TM.{VenusDevice.PMCWaferSizeCheckSwitch}");
             _PMDWaferSizeCheck = DEVICE.GetDevice<IoSwitch>($"TM.{VenusDevice.PMDWaferSizeCheckSwitch}");
-            _TM_PressureMode_Switch  = DEVICE.GetDevice<IoSwitch>("TM.TMPressureModeSwitch");
+            _TM_PressureMode_Switch = DEVICE.GetDevice<IoSwitch>("TM.TMPressureModeSwitch");
             _LLA_PressureMode_Switch = DEVICE.GetDevice<IoSwitch>("TM.LLAPressureModeSwitch");
             _LLB_PressureMode_Switch = DEVICE.GetDevice<IoSwitch>("TM.LLBPressureModeSwitch");
 
 
-            _TMMfc  = DEVICE.GetDevice<IoMfc>($"{Module}.TM_MFC1");
+            _TMMfc = DEVICE.GetDevice<IoMfc>($"{Module}.TM_MFC1");
             _LLAMfc = DEVICE.GetDevice<IoMfc>($"{Module}.LLA_MFC1");
             _LLBMfc = DEVICE.GetDevice<IoMfc>($"{Module}.LLB_MFC1");
 
@@ -424,7 +424,7 @@ namespace Venus_RT.Devices
                 _TMMfc.SetPoint = (int)(args[0]);
                 return true;
             });
-            OP.Subscribe($"TM.SetMFSlitDoor", (cmd, args) => 
+            OP.Subscribe($"TM.SetMFSlitDoor", (cmd, args) =>
             {
                 var module = (ModuleName)Enum.Parse(typeof(ModuleName), args[0].ToString());
                 TurnMFSlitDoor(module, (bool)args[1], out _);
@@ -448,16 +448,16 @@ namespace Venus_RT.Devices
 
             }
             else if (_WaferLeakSensor.Value == false && _WaferRelayValve.Status == true)
-            { 
+            {
                 _WaferRelayValve.TurnValve(false, out string _);
 
             }
         }
 
-        
+
         public void TurnSoftPumpValve(ModuleName mod, bool bOn)
         {
-            switch(mod)
+            switch (mod)
             {
                 case ModuleName.TM:
                     _TMSoftPumpValve.TurnValve(bOn, out string _);
@@ -474,7 +474,7 @@ namespace Venus_RT.Devices
 
         public void TurnFastPumpValve(ModuleName mod, bool bOn)
         {
-            switch(mod)
+            switch (mod)
             {
                 case ModuleName.TM:
                     _TMFastPumpValve.TurnValve(bOn, out string _);
@@ -504,13 +504,13 @@ namespace Venus_RT.Devices
             }
         }
 
-      
+
 
 
 
         public void TurnPurgeValve(ModuleName mod, bool bOn)
         {
-            switch(mod)
+            switch (mod)
             {
                 case ModuleName.TM:
                     _TMPurgeValve.TurnValve(bOn, out string _);
@@ -630,7 +630,7 @@ namespace Venus_RT.Devices
         public bool IsPMSlitdoorOpened(ModuleName mod)
         {
             switch (mod)
-            {             
+            {
                 case ModuleName.PMA:
                     return PMASlitDoorOpened;
                 case ModuleName.PMB:
@@ -658,19 +658,37 @@ namespace Venus_RT.Devices
             }
             return false;
         }
+
+        public bool TurnExhaustValve(ModuleName mod, bool bOn)
+        {
+            switch (mod)
+            {
+                case ModuleName.TM:
+                    _TMVentExhaustValve.TurnValve(bOn,out _);
+                    return true;
+                case ModuleName.LLA:
+                    _LLAVentExhaustValve.TurnValve(bOn, out _);
+                    return true;
+                case ModuleName.LLB:
+                    _LLBVentExhaustValve.TurnValve(bOn, out _);
+                    return true;
+                default: 
+                    return false;
+            }
+        }
         public bool CheckLidClosed(ModuleName mod)
         {
             switch (mod)
             {
                 case ModuleName.TM:
-                    if(!TMLidClosed)
+                    if (!TMLidClosed)
                     {
                         LOG.Write(eEvent.ERR_TM, ModuleName.TM, "TM Lid not closed");
                         return false;
                     }
                     break;
                 case ModuleName.LLA:
-                    if(!LLALidClosed)
+                    if (!LLALidClosed)
                     {
                         LOG.Write(eEvent.ERR_TM, ModuleName.LLA, "LLA Lid not closed");
                         return false;
@@ -786,7 +804,7 @@ namespace Venus_RT.Devices
                         LOG.Write(eEvent.ERR_TM, ModuleName.TM, "TM Fast Pump Valve not closed");
                         return false;
                     }
-                    else if(IsTMSoftPumpOpen)
+                    else if (IsTMSoftPumpOpen)
                     {
                         LOG.Write(eEvent.ERR_TM, ModuleName.TM, "TM Soft Pump Valve not closed");
                         return false;
@@ -798,7 +816,7 @@ namespace Venus_RT.Devices
                         LOG.Write(eEvent.ERR_TM, ModuleName.LLA, "LLA Fast Pump Valve not closed");
                         return false;
                     }
-                    else if(IsLLASoftPumpOpen)
+                    else if (IsLLASoftPumpOpen)
                     {
                         LOG.Write(eEvent.ERR_TM, ModuleName.LLA, "LLA Soft Pump Valve not closed");
                         return false;
@@ -810,7 +828,7 @@ namespace Venus_RT.Devices
                         LOG.Write(eEvent.ERR_TM, ModuleName.LLB, "LLB Fast Pump Valve not closed");
                         return false;
                     }
-                    else if(IsLLBSoftPumpOpen)
+                    else if (IsLLBSoftPumpOpen)
                     {
                         LOG.Write(eEvent.ERR_TM, ModuleName.LLB, "LLB Soft Pump Valve not closed");
                         return false;
@@ -886,14 +904,29 @@ namespace Venus_RT.Devices
                 }
                 else
                 {
-                    if(!IsModuleVaccum(moduleName))
+                    if (!IsModuleVaccum(moduleName))
                     {
                         reason = $"{moduleName} is notVacuum, can not open slit door";
                         LOG.Write(eEvent.ERR_DEVICE_INFO, Module, reason);
                         return false;
                     }
-
-                    double maxPressureDifference = SC.GetValue<double>("System.TMLLMaxPressureDifference");
+                    double maxPressureDifference;
+                    switch (moduleName)
+                    {
+                        case ModuleName.LLA:
+                        case ModuleName.LLB:
+                            maxPressureDifference = SC.GetValue<double>("System.TMLLMaxPressureDifference");
+                            break;
+                        case ModuleName.PMA:
+                        case ModuleName.PMB:
+                        case ModuleName.PMC:
+                        case ModuleName.PMD:
+                            maxPressureDifference = SC.GetValue<double>("System.PMTMMaxPressureDifference");
+                            break;
+                        default:
+                            maxPressureDifference = SC.GetValue<double>("System.PMTMMaxPressureDifference");
+                            break;
+                    }
                     if (Math.Abs(GetModulePressure(moduleName) - GetModulePressure(ModuleName.TM)) > maxPressureDifference)
                     {
                         reason = $"{moduleName}:{GetModulePressure(moduleName)} and TM : {GetModulePressure(ModuleName.TM)} pressure difference exceeds the max limit {maxPressureDifference}";
@@ -904,7 +937,7 @@ namespace Venus_RT.Devices
 
             }
 
-            switch(moduleName)
+            switch (moduleName)
             {
                 case ModuleName.LLA:
                     return _LLATSlitDoor.SetCylinder(open, out reason);
@@ -959,12 +992,12 @@ namespace Venus_RT.Devices
         //}
         public void SwitchTMPressureMode(bool isPressureMode)
         {
-            if (isPressureMode==true)
+            if (isPressureMode == true)
             {
                 _TM_PressureMode_Switch.TurnOn();
             }
             else
-            { 
+            {
                 _TM_PressureMode_Switch.TurnOff();
             }
         }
@@ -1069,8 +1102,8 @@ namespace Venus_RT.Devices
             {
                 _LLATSlitDoor.SetCylinder(false, out _);
             }
-            else if(IsLLASlitDoorOpen == true)
-            { 
+            else if (IsLLASlitDoorOpen == true)
+            {
                 _LLATSlitDoor.SetCylinder(true, out _);
             }
 
@@ -1104,7 +1137,7 @@ namespace Venus_RT.Devices
 
         public bool CheckPumpIsRunning(ModuleName moduleName)
         {
-            switch (moduleName) 
+            switch (moduleName)
             {
                 case ModuleName.LLA:
                     return LLAPumpIsRunning;
@@ -1113,7 +1146,7 @@ namespace Venus_RT.Devices
                 case ModuleName.TM:
                     return TMPumpIsRunning;
 
-                    default: 
+                default:
                     return false;
             }
         }

+ 1 - 1
Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

@@ -451,7 +451,7 @@ namespace Venus_RT.Modules.PMs
             currentRecipeResult.RecipeStepCount = _currentRecipe.Steps.Count;
             currentRecipeResult.RecipeName = _currentRecipe.Header.Name;
             currentRecipeResult.RecipeType = _currentRecipe.Header.Type.ToString();
-            currentRecipeResult.RecipeStepNumber = step.StepNo;
+            currentRecipeResult.RecipeStepNumber = (_currentStep+1);
             currentRecipeResult.RecipeStepType = step.Type.ToString();
             currentRecipeResult.RecipeStepDescription = string.IsNullOrEmpty(step.Description) ? "" : step.Description;
             switch (step.Type)

+ 1 - 1
Venus/Venus_RT/Modules/TM/MFPMPickRoutine.cs

@@ -181,7 +181,7 @@ namespace Venus_RT.Modules.TM
             }
             else
             {
-                if (Math.Abs((_pmModule.ChamberPressure - _JetTM.ChamberPressure)) < maxPressureDifference)
+                if (Math.Abs((_pmModule.ChamberPressure - _JetTM.ChamberPressure)) < (maxPressureDifference-5))
                 {
                     return true;
                 }

+ 2 - 2
Venus/Venus_RT/Modules/TM/MFPMSwapRoutine.cs

@@ -181,7 +181,7 @@ namespace Venus_RT.Modules.TM
                           .Run(SwapWithHeaterStep.PlacePrepare,    PlacePrepare,                        IsModuleReadyForPlace)
                           .Run(SwapWithHeaterStep.Placing,         Placing,                             WaitPlaceDone)
                           .Run(SwapWithHeaterStep.CloseSlitDoor,   ClosePMSlitDoor,                     ClosePMSlitDoorIsOK)
-                          .End(SwapStep.NotifyDone,                NotifyPMDone,                        _delay_50ms);
+                          .End(SwapWithHeaterStep.NotifyDone,                NotifyPMDone,                        _delay_50ms);
                     break;
             }
             return Runner.Status;
@@ -200,7 +200,7 @@ namespace Venus_RT.Modules.TM
             }
             else
             {
-                if (Math.Abs((_pmModule.ChamberPressure - _JetTM.ChamberPressure)) < maxPressureDifference)
+                if (Math.Abs((_pmModule.ChamberPressure - _JetTM.ChamberPressure)) < (maxPressureDifference-5))
                 {
                     LOG.Write(eEvent.INFO_TM, Module, $"TM Pressure {_JetTM.ChamberPressure},PM Pressure {_pmModule.ChamberPressure}");
                     return true;

+ 2 - 2
Venus/Venus_RT/Modules/TM/MFPickRoutine.cs

@@ -63,7 +63,6 @@ namespace Venus_RT.Modules.TM
                 _queryAwc = true;
             else
                 _queryAwc = false;
-            maxPressureDifference = SC.GetValue<double>("System.TMLLMaxPressureDifference");
 
 
         }
@@ -119,6 +118,7 @@ namespace Venus_RT.Modules.TM
 
             awcAlarmRange = SC.GetValue<int>($"TM.AWCAlarmRange");
             awcWarningRange = SC.GetValue<int>($"TM.AWCWarningRange");
+            maxPressureDifference = SC.GetValue<double>("System.TMLLMaxPressureDifference");
 
             return Runner.Start(Module, $"Pick from {_targetModule}");
         }
@@ -161,7 +161,7 @@ namespace Venus_RT.Modules.TM
                 {
                     llPressure = _JetTM.LLBPressure;
                 }
-                if (Math.Abs((llPressure - _JetTM.ChamberPressure)) < maxPressureDifference)
+                if (Math.Abs((llPressure - _JetTM.ChamberPressure)) < (maxPressureDifference-5))
                 {
                     return true;
                 }

+ 14 - 5
Venus/Venus_RT/Modules/TM/MFVentRoutine.cs

@@ -14,8 +14,9 @@ namespace Venus_RT.Modules.TM
             kVenting,
             kOpenSoftVent,
             KSwitchFastVent,
-            KDelay,
+            //KDelay,
             kCloseVentValves,
+            kOpenExhaustValve,
         }
 
         private int _ventingTimeout;
@@ -52,10 +53,12 @@ namespace Venus_RT.Modules.TM
             //Runner.Run(VentStep.kVenting,          OpenVentValve,      IsPressureReady,    _ventingTimeout)
             //    .End(VentStep.kCloseVentValves,    CloseVentValve,     _delay_50ms);
 
-            Runner.Run(VentStep.kOpenSoftVent,     OpenSoftVentValve,    IsSoftVentEnd)
-                  .Run(VentStep.KSwitchFastVent,   SwitchFastVentValve, IsPressureReady, _ventingTimeout)
-                  .Delay(VentStep.KDelay, _ventTimeDelay)
-                  .End(VentStep.kCloseVentValves,  CloseVentValve,        _delay_50ms);
+            Runner.Run(VentStep.kOpenSoftVent, OpenSoftVentValve, IsSoftVentEnd)
+                  .Run(VentStep.KSwitchFastVent, SwitchFastVentValve, IsPressureReady, _ventingTimeout)
+                  //.Delay(VentStep.KDelay, _ventTimeDelay)
+                  .Run(VentStep.kCloseVentValves,  CloseVentValve,        _delay_50ms)
+                  .End(VentStep.kOpenExhaustValve, OpenExhaustValve);
+
 
             return Runner.Status;
         }
@@ -66,6 +69,12 @@ namespace Venus_RT.Modules.TM
             _JetTM.TurnPurgeValve(Module, true);
             return true;
         }
+
+        private bool OpenExhaustValve()
+        {
+            _JetTM.TurnExhaustValve(Module, true);
+            return true;
+        }
         private bool IsSoftVentEnd()
         {
            return _JetTM.GetModulePressure(Module) > _SoftVentEndPressure;