Browse Source

1.修复TM Swap 不能开门/状态比对不过bug
2.添加PM ID停chamber

lixiang 1 year ago
parent
commit
e818b037a2

+ 20 - 8
Venus/Venus_MainPages/ViewModels/TopViewModel.cs

@@ -1,5 +1,6 @@
 using Aitex.Core.Common.DeviceData;
 using Aitex.Core.RT.Event;
+using Aitex.Core.RT.Log;
 using Aitex.Core.Util;
 using Aitex.Core.WCF;
 using MECF.Framework.Common.DataCenter;
@@ -37,7 +38,7 @@ namespace Venus_MainPages.ViewModels
         private ObservableCollection<EventItem> m_EventLogList = new ObservableCollection<EventItem>();
         private EventItem m_CurrentEventItem = new EventItem();
         private string m_CurrentEventItemValue;
-        private object _lockObj = new object();
+        //private object _lockObj = new object();
         private int m_EventLogListSelectedIndex;
         private Queue<EventItem> alarmQuery = new Queue<EventItem>();//控制alarm log 在 top UI显示
 
@@ -57,8 +58,14 @@ namespace Venus_MainPages.ViewModels
         private bool m_TMIsInstalled;
         private bool m_EFEMIsInstalled;
 
-        private List<int> stopEntityId = new List<int>() { 17 };
-
+        private List<eEvent> stopEntityId = new List<eEvent>() 
+        {
+            eEvent.ERR_MATCH,
+            eEvent.ERR_RF,
+            eEvent.ERR_PENDULUM_VALVE,
+            eEvent.ERR_DEVICE_INFO
+        };
+        private PressureType m_PressureType;
 
         #endregion
 
@@ -301,7 +308,8 @@ namespace Venus_MainPages.ViewModels
             EventClient.Instance.Start();
             Title = QueryDataClient.Instance.Service.GetConfig($"System.Name").ToString();
 
-
+            object obj = QueryDataClient.Instance.Service.GetData("System.PressureUnitType");
+            m_PressureType = (PressureType)Convert.ToInt32(obj);
 
         }
         #endregion
@@ -432,10 +440,14 @@ namespace Venus_MainPages.ViewModels
                         if (eventItem.Level == EventLevel.Alarm)
                         {
                             alarmQuery.Enqueue(eventItem);
-                            //if (stopEntityId.Contains(eventItem.Id) && eventItem.Source.Contains("PM"))
-                            //{
-                            //    InvokeClient.Instance.Service.DoOperation($"{eventItem.Source}.PmError");
-                            //}
+                            if (m_PressureType == PressureType.Pa)
+                            {
+                                if (stopEntityId.Contains((eEvent)eventItem.Id) && eventItem.Source.Contains("PM"))
+                                {
+                                    InvokeClient.Instance.Service.DoOperation($"{eventItem.Source}.PmError");
+                                }
+                            }
+
                         }
                         if (alarmQuery.Count > 0)
                         {

File diff suppressed because it is too large
+ 850 - 839
Venus/Venus_MainPages/Views/OverKepler2300View.xaml


+ 16 - 16
Venus/Venus_MainPages/Views/TMOperationView.xaml

@@ -84,9 +84,9 @@
                 </userControls:FlowPipe.IsFlowing>
             </userControls:FlowPipe>
             <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="260" Canvas.Top="335" RotateTransformValue="90" IsFlowing="{Binding LLAVentValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="55" Canvas.Left="260" Canvas.Top="335" RotateTransformValue="0" IsFlowing="{Binding LLAPurgeValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="55" Canvas.Left="320" Canvas.Top="340" RotateTransformValue="90" IsFlowing="{Binding LLAPurgeValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="256" Canvas.Top="395" RotateTransformValue="0" IsFlowing="{Binding LLAPurgeValveIsOpen}" IsReverse="True"/>
+            <userControls:FlowPipe   Height="8"  Width="85" Canvas.Left="260" Canvas.Top="335" RotateTransformValue="0" IsFlowing="{Binding LLAPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="55" Canvas.Left="350" Canvas.Top="340" RotateTransformValue="90" IsFlowing="{Binding LLAPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="90" Canvas.Left="256" Canvas.Top="395" RotateTransformValue="0" IsFlowing="{Binding LLAPurgeValveIsOpen}" IsReverse="True"/>
             <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="260" Canvas.Top="395" RotateTransformValue="90" >
                 <userControls:FlowPipe.IsFlowing>
                     <MultiBinding Converter="{StaticResource AnyMultiValueConverter}">
@@ -145,9 +145,9 @@
                     </MultiBinding>
                 </userControls:FlowPipe.IsFlowing>
             </userControls:FlowPipe>
-            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="1066" Canvas.Top="336" RotateTransformValue="180" IsFlowing="{Binding LLBPurgeValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="58" Canvas.Left="1006" Canvas.Top="334" RotateTransformValue="90" IsFlowing="{Binding LLBPurgeValveIsOpen}"/>
-            <userControls:FlowPipe   Height="8"  Width="60" Canvas.Left="1066" Canvas.Top="396" RotateTransformValue="180" IsFlowing="{Binding LLBPurgeValveIsOpen}" IsReverse="True"/>
+            <userControls:FlowPipe   Height="8"  Width="90" Canvas.Left="1066" Canvas.Top="336" RotateTransformValue="180" IsFlowing="{Binding LLBPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="58" Canvas.Left="976" Canvas.Top="334" RotateTransformValue="90" IsFlowing="{Binding LLBPurgeValveIsOpen}"/>
+            <userControls:FlowPipe   Height="8"  Width="90" Canvas.Left="1066" Canvas.Top="396" RotateTransformValue="180" IsFlowing="{Binding LLBPurgeValveIsOpen}" IsReverse="True"/>
 
             <userControls:FlowPipe   Height="8"  Width="265" Canvas.Left="800" Canvas.Top="450"  IsReverse="True">
                 <userControls:FlowPipe.IsFlowing>
@@ -258,10 +258,10 @@
             <customControls:CommonValveControl Status="{Binding TMValveN2IsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="160" Canvas.Top="44"  Tag="TMValveN2" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
             <customControls:CommonValveControl Status="{Binding TMFastVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Horizontal" Height="20" Width="20"  Canvas.Left="440" Canvas.Top="204"  Tag="TMVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
             <customControls:CommonValveControl Status="{Binding LLAVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="245.5" Canvas.Top="360"  Tag="LLAVentValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
-            <customControls:CommonValveControl Status="{Binding LLAPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="307" Canvas.Top="360"  Tag="LLAPurgeValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
+            <customControls:CommonValveControl Status="{Binding LLAPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="337" Canvas.Top="360"  Tag="LLAPurgeValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
 
             <customControls:CommonValveControl Status="{Binding LLBVentValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="1058" Canvas.Top="350"   Tag="LLBVentValve"  Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
-            <customControls:CommonValveControl Status="{Binding LLBPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="992" Canvas.Top="350"  Tag="LLBPurgeValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
+            <customControls:CommonValveControl Status="{Binding LLBPurgeValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="962" Canvas.Top="350"  Tag="LLBPurgeValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
 
             <customControls:CommonValveControl Status="{Binding TMSoftPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="603" Canvas.Top="570"  Tag="TMSoftPumpValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
             <customControls:CommonValveControl Status="{Binding TMFastPumpValveIsOpen,Mode=TwoWay}"  ValveOrientation="Vertical"   Height="20" Width="20"  Canvas.Left="683" Canvas.Top="570"  Tag="TMFastPumpValve" Command="{Binding ControlValveCommand}" CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}" IsCanEdit="{Binding TMIsOFFline}"/>
@@ -300,11 +300,11 @@
             <userControls:Pipe2    Canvas.Left="807"  Canvas.Top="715" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90"/>
 
 
-            <userControls:Pipe2    Canvas.Left="307"  Canvas.Top="335" HorizontalAlignment="Left" VerticalAlignment="Top" />
-            <userControls:Pipe2    Canvas.Left="320"  Canvas.Top="390" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
+            <userControls:Pipe2    Canvas.Left="337"  Canvas.Top="335" HorizontalAlignment="Left" VerticalAlignment="Top" />
+            <userControls:Pipe2    Canvas.Left="350"  Canvas.Top="390" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="90" />
 
-            <userControls:Pipe2    Canvas.Left="1011"  Canvas.Top="396" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="180"/>
-            <userControls:Pipe2    Canvas.Left="998"  Canvas.Top="341" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="270"/>
+            <userControls:Pipe2    Canvas.Left="981"  Canvas.Top="396" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="180"/>
+            <userControls:Pipe2    Canvas.Left="968"  Canvas.Top="341" HorizontalAlignment="Left" VerticalAlignment="Top" RotateTransformValue="270"/>
 
 
 
@@ -313,10 +313,10 @@
             <TextBlock  FontSize="15" Canvas.Top="310" Canvas.Left="420" Text="Soft Vent"/>
 
             <TextBlock  FontSize="15" Canvas.Top="345" Canvas.Left="212" Text="Fast&#x0A;Vent&#x0A; V9"/>
-            <TextBlock  FontSize="15" Canvas.Top="345" Canvas.Left="332" Text="Soft&#x0A;Vent&#x0A; V8"/>
+            <TextBlock  FontSize="15" Canvas.Top="345" Canvas.Left="362" Text="Soft&#x0A;Vent&#x0A; V8"/>
 
             <TextBlock  FontSize="15" Canvas.Top="335" Canvas.Left="1080" Text="Fast&#x0A;Vent&#x0A;V15"/>
-            <TextBlock  FontSize="15" Canvas.Top="335" Canvas.Left="960" Text="Soft&#x0A;Vent&#x0A;V14"/>
+            <TextBlock  FontSize="15" Canvas.Top="335" Canvas.Left="930" Text="Soft&#x0A;Vent&#x0A;V14"/>
 
             <TextBlock  FontSize="15" Canvas.Top="808" Canvas.Left="625" Text="LL Pump"/>
             <TextBlock  FontSize="15" Canvas.Top="700" Canvas.Left="620" Text="TM Pump"/>
@@ -407,8 +407,8 @@
             </Border>
             <userControls:TextboxWithLabel  Canvas.Left="668" Canvas.Top="729" LabelValue="{Binding PressureType, StringFormat=CM7({0})}" TextBoxValue="{Binding RtDataValues[TM.LoadlockForelineGauge.Value],StringFormat='F1',Converter={StaticResource mTorrToPaConverter}}" TextBoxColor="#E6ECF5"/>
 
-            <userControls:TextboxWithLabel  Canvas.Left="351" Canvas.Top="425" LabelValue="{Binding PressureType, StringFormat=Pressure({0})}" TextBoxValue="{Binding RtDataValues[TM.TMPressureCtrl.LLAChamberSetPoint]}" TextBoxColor="#E6ECF5"/>
-            <userControls:TextboxWithLabel  Canvas.Left="881" Canvas.Top="425" LabelValue="{Binding PressureType, StringFormat=Pressure({0})}" TextBoxValue="{Binding RtDataValues[TM.TMPressureCtrl.LLBChamberSetPoint]}" TextBoxColor="#E6ECF5"/>
+            <userControls:TextboxWithLabel  Canvas.Left="266" Canvas.Top="310" LabelValue="{Binding PressureType, StringFormat=Pressure({0})}" TextBoxValue="{Binding RtDataValues[TM.TMPressureCtrl.LLAChamberSetPoint]}" TextBoxColor="#E6ECF5"/>
+            <userControls:TextboxWithLabel  Canvas.Left="985" Canvas.Top="302" LabelValue="{Binding PressureType, StringFormat=Pressure({0})}" TextBoxValue="{Binding RtDataValues[TM.TMPressureCtrl.LLBChamberSetPoint]}" TextBoxColor="#E6ECF5"/>
 
 
         </Canvas>

+ 1 - 1
Venus/Venus_RT/App.config

@@ -27,7 +27,7 @@
 	</startup>
 	<connectionStrings>
 		<add name="PostgreSQL"   connectionString="Server=localhost;Port=5432;User Id=postgres;Password=123456;Database=postgres;Enlist=true;Preload Reader=true;" />
-		<!--0是mTorr,1是Pa-->
+		<!--0是other,1是kepler2200-->
 		<add name="PressureType" connectionString="1"/>
 	</connectionStrings>
 	<system.serviceModel>

+ 4 - 4
Venus/Venus_RT/Devices/AdTecRF.cs

@@ -512,10 +512,10 @@ namespace Venus_RT.Devices
             str = "";
 
             _chamber = DEVICE.GetDevice<JetPMBase>(Module);
-            if (on && !_chamber.CheckGeneratorAndHVInterlock(_device))
-            {
-                return false;
-            }
+            //if (on && !_chamber.CheckGeneratorAndHVInterlock(_device))
+            //{
+            //    return false;
+            //}
 
             if (on)
             {

+ 6 - 51
Venus/Venus_RT/Devices/JetKepler2200APM.cs

@@ -764,22 +764,7 @@ namespace Venus_RT.Devices
             return _pendulumValve.Position;
         }
 
-        //public override async void HeatChiller(ChillerType chillerType, double value, double offset)
-        //{
-        //    _Chiller?.SetChillerTemp((float)value, (float)offset);
-        //    await Task.Delay(1000);
-        //    _Chiller?.SetChillerOnOff(true);
-        //}
-
-        //public override void OnOffChiller(ChillerType chillerType, bool onoff)
-        //{
-        //    _Chiller?.SetChillerOnOff(onoff);
-        //}
-
-        //public override bool CheckChillerStatus()
-        //{
-        //    return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
-        //}
+       
 
         public override void SetGeneratorCommunicationMode(int mode)
         {
@@ -808,44 +793,13 @@ namespace Venus_RT.Devices
             return true;
         }
 
-        //public override bool GeneratorBiasPowerOn(bool on)
-        //{
-        //    if (_GeneratorBias == null) return false;
-
-        //    if (on && !IsRFGInterlockOn)
-        //    {
-        //        LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
-        //        return false;
-        //    }
-
-        //    return _GeneratorBias.SetPowerOnOff(on, out _);
-        //}
-
-        //public override bool GeneratorBiasSetpower(float val)
-        //{
-        //    if (_GeneratorBias == null) return false;
-
-        //    if (Math.Abs(val) > 0.01)
-        //        _GeneratorBias.SetPower((ushort)val);
-        //    return true;
-        //}
-
-        //public override bool OnOffSetESCHV(bool val)
-        //{
-        //    return _ESCHV.SetPowerOnOff(val);
-        //}
+       
 
         public override bool SetWallTCTemperature(float value)
         {
             return _WallTC.RampTemp(value);
         }
-        //public override bool GeneratorBiasSetMatchMode(bool val)
-        //{
-        //    if (_GeneratorBias == null) return false;
-        //    string reason = string.Empty;
-        //    _GeneratorBias.SetMatchingAutoMode(val, out reason);
-        //    return true;
-        //}
+       
 
         public override bool SetMatchPosition(float c1, float c2)
         {
@@ -930,7 +884,7 @@ namespace Venus_RT.Devices
         {
             OpenValve(ValveType.N2, false);
             OpenValve(ValveType.PVN22, false);
-            await Task.Delay(1000);
+            await Task.Delay(500);
             OpenValve(ValveType.Purge, false);
             return true;
         }
@@ -1048,8 +1002,9 @@ namespace Venus_RT.Devices
                 {
                     _GasRFStopWatch.Start();
                 }
-                if (_GasRFStopWatch.ElapsedMilliseconds > 1000)
+                if (_GasRFStopWatch.ElapsedMilliseconds > 1500 && _GasRFStopWatch.ElapsedMilliseconds < 2500)
                 {
+                    var item = _GasRFStopWatch.ElapsedMilliseconds;
                     _GasRFStopWatch.Reset();
                     _GasFlag = true;
                     return true;

+ 3 - 1
Venus/Venus_RT/Devices/JetKepler2200BPM.cs

@@ -1067,8 +1067,10 @@ namespace Venus_RT.Devices
                 {
                     _GasRFStopWatch.Start();
                 }
-                if (_GasRFStopWatch.ElapsedMilliseconds > 1000)
+                if (_GasRFStopWatch.ElapsedMilliseconds > 1500 && _GasRFStopWatch.ElapsedMilliseconds < 2500)
                 {
+                    var item = _GasRFStopWatch.ElapsedMilliseconds;
+
                     _GasRFStopWatch.Reset();
                     _GasFlag = true;
                     return true;

+ 4 - 1
Venus/Venus_RT/Modules/PMs/PMEntity.cs

@@ -528,6 +528,8 @@ namespace Venus_RT.Modules.PMs
             Transition(PMState.PreparePick,     MSG.PreparePick,    null,                   PMState.PreparePick);
             Transition(PMState.ReadyForPick,    MSG.Abort,          FnAbortPick,            PMState.Idle);
             Transition(PMState.ReadyForPick,    MSG.DropDownWafer,  FnStartDropDownWafer,   PMState.DropDownWafer);
+
+            
             Transition(PMState.ReadyForPick,    MSG.PreparePick,    null,                   PMState.ReadyForPick);
             Transition(PMState.DropDownWafer,   FSM_MSG.TIMER,      FnDropDownTimeout,      PMState.DropDownReady);
             Transition(PMState.DropDownReady,   MSG.PickReady,      FnStartFinishPick,      PMState.FinishPick);
@@ -553,6 +555,7 @@ namespace Venus_RT.Modules.PMs
 
             // Swap Wafer With PM
             Transition(PMState.DropDownReady,   MSG.PreparePlace,   FnStartSwapPlace,       PMState.PreparePlace);
+            Transition(PMState.ReadyForPick,    MSG.PreparePlace,   FnStartPreparePlace,    PMState.PreparePlace);
 
             Transition(PMState.Idle,                    MSG.PartialPressure,    FnStartPartialPressure,     PMState.PartialPressureTesting);
             Transition(PMState.PartialPressureTesting,  FSM_MSG.TIMER,          FnPartialPressureTimeout,   PMState.Idle);
@@ -635,7 +638,7 @@ namespace Venus_RT.Modules.PMs
 
             OP.Subscribe($"{Module}.{RtOperation.PmOnline}", (cmd, args) => CheckToPostMessage((int)MSG.Online));
             OP.Subscribe($"{Module}.{RtOperation.PmOffline}", (cmd, args) => CheckToPostMessage((int)MSG.Offline));
-            //OP.Subscribe($"{Module}.{RtOperation.PmError}", (cmd, args) => CheckToPostMessage((int)MSG.Error));
+            OP.Subscribe($"{Module}.{RtOperation.PmError}", (cmd, args) => CheckToPostMessage((int)MSG.Error));
 
 
             LOG.PMErrorInterrupt += (pmname)=> PMErrorInterrupt(pmname);

+ 0 - 114
Venus/Venus_RT/Modules/TM/MFControlPressureRoutine.cs

@@ -1,114 +0,0 @@
-//using Aitex.Core.RT.Routine;
-//using Aitex.Core.RT.SCCore;
-//using MECF.Framework.Common.Equipment;
-//using System;
-//using System.Collections.Generic;
-//using System.Linq;
-//using System.Text;
-//using System.Threading.Tasks;
-//using Venus_Core;
-//using Venus_RT.Devices;
-//using Venus_RT.Modules.PMs;
-
-//namespace Venus_RT.Modules.TM
-//{
-   
-//    class MFControlPressureRoutine : ModuleRoutineBase, IRoutine
-//    {
-//        private enum ControlPressureStep
-//        {
-//            PumpDown,
-//            Delay1s,
-//            StartControlPressure,
-//            End
-//        }
-
-//        private readonly JetTM _JetTM;
-//        private readonly MFPumpRoutine _pumpDownRoutine;
-//        private int _controlPressureCheckPoint = 100;
-//        private int _controlPressureSetPoint = 90;
-//        private int  _controlFlowSetPoint = 90;
-
-//        public MFControlPressureRoutine(JetTM jetTM, MFPumpRoutine pumpDownRoutine) : base(ModuleName.TM)
-//        {
-//            _JetTM = jetTM;
-//            _pumpDownRoutine = pumpDownRoutine;
-//        }
-//        public RState Start(params object[] objs)
-//        {
-//            _controlPressureCheckPoint= SC.GetValue<int>($"TM.ControlPressureCheckPoint");
-//            _controlPressureSetPoint= SC.GetValue<int>($"TM.ControlPressureSetPoint");
-//            _controlFlowSetPoint= SC.GetValue<int>($"TM.TM_MFC1.DefaultSetPoint");
-//            return Runner.Start(Module, Name);
-//        }
-
-//        public RState Monitor()
-//        {
-
-//            Runner.Run(ControlPressureStep.PumpDown,              PumpingDown,          StopPumpDone)
-//                .Delay(ControlPressureStep.Delay1s,               _delay_1s)
-//                .Run(ControlPressureStep.StartControlPressure,    StartControlPressure)
-
-//                .End(ControlPressureStep.End,                     End);
-//            return Runner.Status;
-//        }
-
-//        private bool PumpingDown()
-//        {
-//            return _pumpDownRoutine.Start() == RState.Running;
-
-//        }
-
-//        private bool StopPumpDone()
-//        {
-//            var status = _pumpDownRoutine.Monitor();
-//            if (_JetTM.ChamberPressure <= _controlPressureCheckPoint && status == RState.End)
-//            {
-//                _JetTM.TurnSoftPumpValve(ModuleName.TM, false);
-//                _JetTM.TurnFastPumpValve(ModuleName.TM, false);
-//                _JetTM.TurnFastPumpValve(ModuleName.TM,true);
-//                return true;
-//            }
-//            else
-//            {
-//                return false;
-//            }
-//        }
-
-//        private bool StartControlPressure()
-//        {
-//            _JetTM.TurnN2Valve(true);
-//            _JetTM.TurnPurgeValve(ModuleName.TM, true);
-//            if (_JetTM.AllPMSlitDoorClosed)
-//            {
-//                _JetTM.SwitchTMPressureMode(true);             
-//                _JetTM.SetTMPressure(_controlPressureSetPoint);
-//            }
-//            else
-//            {
-//                _JetTM.SwitchTMPressureMode(false);
-//                _JetTM.SetTMFlow(_controlFlowSetPoint);
-//            }
-//            return true;
-//        }
-
-
-
-//        private bool End()
-//        {
-
-//            return true;
-//        }
-//        public void Abort()
-//        {
-//            if(_JetTM != null)
-//            {
-//                _JetTM.TurnFastPumpValve(ModuleName.TM, false);
-//                _JetTM.TurnN2Valve(false);
-//                _JetTM.TurnPurgeValve(ModuleName.TM, false);
-//                _JetTM.SetTMPressure(0);
-//                _JetTM.SetTMFlow(0);
-//            }
-//        }
-//    }
-//}

+ 53 - 27
Venus/Venus_RT/Modules/TM/MFPMSwapRoutine.cs

@@ -37,10 +37,12 @@ namespace Venus_RT.Modules.TM
         {
             WaitPMReady,
             PreRotation,
+            OpenSlitDoor,
             PickPrepare,
             Picking,
             PlacePrepare,
             Placing,
+            CloseSlitDoor,
             NotifyDone,
         }
         private readonly JetTM _JetTM;
@@ -106,7 +108,7 @@ namespace Venus_RT.Modules.TM
             var wafer = WaferManager.Instance.GetWafer(_targetModule, _targetSlot);
             if (wafer.ChuckState == EnumWaferChuckStatus.Chucked)
             {
-                LOG.Write(eEvent.ERR_TM, Module, $"Cannot pick the wafer in {_targetModule } as the wafer is chucked");
+                LOG.Write(eEvent.ERR_TM, Module, $"Cannot pick the wafer in {_targetModule} as the wafer is chucked");
                 return RState.Failed;
             }
 
@@ -140,32 +142,34 @@ namespace Venus_RT.Modules.TM
                 case JetChamber.Venus:
                 case JetChamber.Kepler2300:
 
-         Runner.Wait(SwapStep.WaitPMReady,          () => _pmModule.IsIdle,                              _delay_60s)
-               .RunIf(SwapStep.PreRotation,         _JetTM.PreRotateModules.ContainsKey(_targetModule),  RotateArm,            WaitRotateDone)
-               .Run(SwapStep.PickPrepare,           PickPrepare,                                         IsModuleReadyForPick)
-               .Run(SwapStep.PickExtend,            PickExtend,                                          WaitRobotExtendDone)
-               .Run(SwapStep.DropDownWafer,         NotifyPMPickWafer,                                   WaitPMWaferDropDown)
-               .Delay(SwapStep.PickDelay,           _pickDelayTime)
-               .Run(SwapStep.PickRetract,           PickRetract,                                         WaitRobotRetractDone)
-               .Run(SwapStep.PlacePrepare,          PlacePrepare,                                        IsModuleReadyForPlace)
-               .Run(SwapStep.PlaceExtend,           PlaceExtend,                                         WaitRobotExtendDone)
-               .Run(SwapStep.LiftUpWafer,           NotifyLiftUpWafer,                                   WaitPMWaferLiftUp)
-               .Delay(SwapStep.PlaceDelay,          _placeDelayTime)
-               .Run(SwapStep.PlaceRetract,          PlaceRetract,                                        WaitRobotRetractDone)
-               .End(SwapStep.NotifyDone,            NotifyPMDone,                                        _delay_50ms);
-                break;
+                    Runner.Wait(SwapStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
+                          .RunIf(SwapStep.PreRotation, _JetTM.PreRotateModules.ContainsKey(_targetModule), RotateArm, WaitRotateDone)
+                          .Run(SwapStep.PickPrepare, PickPrepare, IsModuleReadyForPick)
+                          .Run(SwapStep.PickExtend, PickExtend, WaitRobotExtendDone)
+                          .Run(SwapStep.DropDownWafer, NotifyPMPickWafer, WaitPMWaferDropDown)
+                          .Delay(SwapStep.PickDelay, _pickDelayTime)
+                          .Run(SwapStep.PickRetract, PickRetract, WaitRobotRetractDone)
+                          .Run(SwapStep.PlacePrepare, PlacePrepare, IsModuleReadyForPlace)
+                          .Run(SwapStep.PlaceExtend, PlaceExtend, WaitRobotExtendDone)
+                          .Run(SwapStep.LiftUpWafer, NotifyLiftUpWafer, WaitPMWaferLiftUp)
+                          .Delay(SwapStep.PlaceDelay, _placeDelayTime)
+                          .Run(SwapStep.PlaceRetract, PlaceRetract, WaitRobotRetractDone)
+                          .End(SwapStep.NotifyDone, NotifyPMDone, _delay_50ms);
+                    break;
 
                 case JetChamber.Kepler2200A:
                 case JetChamber.Kepler2200B:
 
-                    Runner.Wait(SwapStep.WaitPMReady,           () => _pmModule.IsIdle, _delay_60s)
-                .RunIf(SwapStep.PreRotation,          _JetTM.PreRotateModules.ContainsKey(_targetModule),   RotateArm,         WaitRotateDone)
-                .Run(SwapStep.PickPrepare,            PickPrepare,                                          IsModuleReadyForPick)
-                .Run(SwapWithHeaterStep.Picking,      Picking,                                              WaitPickDone)
-                .Run(SwapWithHeaterStep.PlacePrepare, PlacePrepare,                                         IsModuleReadyForPlace)
-                .Run(SwapWithHeaterStep.Placing,      Placing,                                              WaitPlaceDone)
-                .End(SwapStep.NotifyDone,             NotifyPMDone,                                         _delay_50ms);
-                break;
+                    Runner.Wait(SwapWithHeaterStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
+                          .RunIf(SwapWithHeaterStep.PreRotation, _JetTM.PreRotateModules.ContainsKey(_targetModule), RotateArm, WaitRotateDone)
+                          .Run(SwapWithHeaterStep.OpenSlitDoor, OpenPMSlitDoor, OpenPMSlitDoorIsOK)
+                          .Run(SwapWithHeaterStep.PickPrepare, PickPrepare, IsModuleReadyForPick)
+                          .Run(SwapWithHeaterStep.Picking, Picking, WaitPickDone)
+                          .Run(SwapWithHeaterStep.PlacePrepare, PlacePrepare, IsModuleReadyForPlace)
+                          .Run(SwapWithHeaterStep.Placing, Placing, WaitPlaceDone)
+                          .Run(SwapWithHeaterStep.CloseSlitDoor, ClosePMSlitDoor, ClosePMSlitDoorIsOK)
+                          .End(SwapStep.NotifyDone, NotifyPMDone, _delay_50ms);
+                    break;
             }
             return Runner.Status;
         }
@@ -175,10 +179,27 @@ namespace Venus_RT.Modules.TM
             _pmModule.PostMsg(PMEntity.MSG.PreparePick);
             return true;
         }
-
+        private bool OpenPMSlitDoor()
+        {
+            return _JetTM.TurnMFSlitDoor(_targetModule, true, out _);
+        }
+        private bool OpenPMSlitDoorIsOK()
+        {
+            return _JetTM.IsPMSlitdoorOpened(_targetModule);
+        }
+        private bool ClosePMSlitDoor()
+        {
+            return _JetTM.TurnMFSlitDoor(_targetModule, false, out _);
+        }
+        private bool ClosePMSlitDoorIsOK()
+        {
+            return _JetTM.IsPMSlitdoorClosed(_targetModule);
+        }
         private bool IsModuleReadyForPick()
         {
-            return _pmModule.Status == PMEntity.PMStatus.Ready_For_Pick && _pmModule.IsSlitDoorOpen;
+            //return _pmModule.Status == PMEntity.PMStatus.Ready_For_Pick && _pmModule.IsSlitDoorOpen;
+            return _pmModule.Status == PMEntity.PMStatus.Ready_For_Pick;
+
         }
 
         private bool PickExtend()
@@ -198,7 +219,9 @@ namespace Venus_RT.Modules.TM
 
         private bool IsModuleReadyForPlace()
         {
-            return _pmModule.Status == PMEntity.PMStatus.Ready_For_Place && _pmModule.IsSlitDoorOpen;
+            //return _pmModule.Status == PMEntity.PMStatus.Ready_For_Place && _pmModule.IsSlitDoorOpen;
+            return _pmModule.Status == PMEntity.PMStatus.Ready_For_Place;
+
         }
 
         private bool PlaceExtend()
@@ -239,6 +262,9 @@ namespace Venus_RT.Modules.TM
             }
             else if (_robot.Status == RState.End)
             {
+                
+                
+
                 //WaferManager.Instance.WaferMoved(ModuleName.TM, (int)_hand, _targetModule, _targetSlot);
                 WaferManager.Instance.WaferMoved(_targetModule, _targetSlot, ModuleName.TMRobot, (int)_pickHand);
 
@@ -337,7 +363,7 @@ namespace Venus_RT.Modules.TM
         }
         private bool WaitPMWaferLiftUp()
         {
-            if(_pmModule.Status == PMEntity.PMStatus.Exchange_Ready)
+            if (_pmModule.Status == PMEntity.PMStatus.Exchange_Ready)
             {
                 WaferManager.Instance.WaferMoved(ModuleName.TMRobot, (int)_placeHand, _targetModule, _targetSlot);
                 return true;

+ 0 - 1
Venus/Venus_RT/Venus_RT.csproj

@@ -313,7 +313,6 @@
     <Compile Include="Modules\SEManualTransfer.cs" />
     <Compile Include="Modules\SETMCycle.cs" />
     <Compile Include="Modules\TMCycle.cs" />
-    <Compile Include="Modules\TM\MFControlPressureRoutine.cs" />
     <Compile Include="Modules\TM\MFHomeRoutine.cs" />
     <Compile Include="Modules\TM\MFLeakCheckRoutine.cs" />
     <Compile Include="Modules\TM\MFPickRoutine.cs" />

+ 3 - 0
Venus/Venus_Themes/UserControls/Axes2D.xaml.cs

@@ -111,8 +111,11 @@ namespace Venus_Themes.UserControls
                     Width = rc,
                     Height = rc,
                     ToolTip = point.info,
+                    Cursor = Cursors.Hand,
                     Fill = point.arm == 1 ? new SolidColorBrush(Colors.Blue) : new SolidColorBrush(Colors.Yellow),
                 };
+                ToolTipService.SetShowOnDisabled(ellipse, false);
+                ToolTipService.SetShowDuration(ellipse, 10000);
                 Canvas.SetZIndex(ellipse, 10);//显示层级
                 double bottom = (point.y / 10000 + 5) * (CanvasInPath.Height) / 10 - rc / 2 - .8;
                 double left = (point.x / 10000 + 5) * (CanvasInPath.Width) / 10 - rc / 2 + .4;