瀏覽代碼

recipeviewmodel uodate && simulator update

Intern01 1 年之前
父節點
當前提交
41052afc3b

+ 141 - 131
Venus/Venus_MainPages/ViewModels/OverVenusViewModel.cs

@@ -19,6 +19,7 @@ using Venus_Unity;
 using MECF.Framework.Common.CommonData.DeviceData;
 using System.Windows.Shapes;
 using Path = System.IO.Path;
+using Aitex.Core.RT.Log;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -1437,145 +1438,154 @@ namespace Venus_MainPages.ViewModels
         }
         void timer_Tick(object sender, EventArgs e)
         {
-            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
-
-            if (RtDataValues==null)
+            try
             {
-                return;
-            }
 
-            TurboN2FlowSetPoint = Convert.ToInt32( QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.TurboN2FlowSetPoint"));
-
-            PVN21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN21.IsOpen");
-            GasFinalValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveGasFinal.IsOpen");
-            PV11ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV11.IsOpen"); 
-            PV12ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV12.IsOpen");
-            PV21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV21.IsOpen"); 
-            PV22ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV22.IsOpen");
-            PV31ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV31.IsOpen");
-            PV32ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV32.IsOpen");
-            PV41ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV41.IsOpen");
-            PV42ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV42.IsOpen");
-            MFC1ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc1.IsOpen"); 
-            MFC2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc2.IsOpen");
-            MFC3ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc3.IsOpen");
-            MFC4ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc4.IsOpen");
-            MFC5ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc5.IsOpen");
-            MFC6ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc6.IsOpen");
-            MFC7ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc7.IsOpen");
-            MFC8ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc8.IsOpen");
-            N2ValveIsOpen =   CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveN2.IsOpen"); 
-            SoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveSoftPump.IsOpen");
-            FastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveFastPump.IsOpen"); 
-            GuageValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveGuage.IsOpen"); 
-            PVHe1ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe1.IsOpen"); 
-            PVHe2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe2.IsOpen");
-            PVN21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN21.IsOpen");
-            PVN22ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN22.IsOpen");        
-            TurboPumpPumpingValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveTurboPumpPumping.IsOpen");
-            TurboPumpPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveTurboPumpPurge.IsOpen");
-            PVHe3ValveIsOpen= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe3.IsOpen");
-            HeISOValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveHeISO.IsOpen");
-
-
-
-            PumpIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.PumpIsRunning");
-            TurboIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpIsRunning");
-
-
-            LiftPinIsUp= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.LiftPinIsUp");
-            IsSlitDoorClosed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsSlitDoorClosed");
-            IsLidClosed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsLidClosed");
-
-            PendulumValvePosition = CommonFunction.GetValue<float>(RtDataValues,$"{ModuleName}.GetPVPosition");
-            TurboPumpRotationalSpeed = Convert.ToInt32( RtDataValues[$"{ModuleName}.TurboPumpRotationalSpeed"].ToString());
-
-            PositionValue = -((int)((PendulumValvePosition) * 0.09));
-
-
-            PMCurrentState = (PMState)Enum.Parse(typeof(PMState), RtDataValues[$"{ModuleName}.FsmState"].ToString());
-  
-            GasIsFlowing = PMCurrentState == PMState.GasFlowing;
-            IsProcessing=PMCurrentState == PMState.Processing;
-            MFC1Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas1");
-            MFC2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas2");
-            MFC3Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas3");
-            MFC4Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas4");
-            MFC5Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas5");
-            MFC6Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas6");
-            MFC7Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas7");
-            MFC8Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas8");
-            MFCHeData = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcHe");
-            MFCN2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcN2");
-
-            SRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.Rf}.DeviceData");
-            BRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasRf}.DeviceData");
-            PendulumValveData = CommonFunction.GetValue<AITPendulumValveData>(RtDataValues, $"{ModuleName}.{VenusDevice.PendulumValve}.DeviceData");
-            ESCHVData= CommonFunction.GetValue<AITHVData>(RtDataValues, $"{ModuleName}.{VenusDevice.ESCHV}.DeviceData");
-
-
-            ValveHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ValveHeater.DeviceData"];
-            ForelineHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ForelineHeater.DeviceData"];
-            WallHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.WallHeater.DeviceData"];
-
-            ProcessHighPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessHighPressure");
-            ProcessLowPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessLowPressure");
-            ForelinePressure = float.Parse(RtDataValues[$"{ModuleName}.ForelinePressure"].ToString());
-            ESCHePressure = float.Parse(RtDataValues[$"{ModuleName}.ESCHePressure"].ToString());
-
-            ChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.Chiller.Temp"].ToString());
-
-            HVTemperature = float.Parse(RtDataValues[$"{ModuleName}.{VenusDevice.ESCHV}.Temp"].ToString());
-
-
-
-            ChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.Chiller.IsOn");
-
-            SourceRFFanInterlock= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.SourceRFFanInterlock");
-            IsWLK= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWLK");
-            IsWaterFlowOk= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWaterFlowOk");
-            IsTurboPumpInterlock= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpInterlock");
-            IsCDAOK= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsCDA_OK");
-            SensorGasBoxDoor= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.GasBoxDoorSW.Value"); 
-            SensorGasBoxPressure= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.GasBoxPressureSW.Value"); 
-
-            IsATM= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsATM"); 
-            IsVAC = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsVAC"); 
-
-            ESCHVOutputVoltage= CommonFunction.GetValue<int>(RtDataValues, $"{ModuleName}.ESCHV.OutputVoltage");
 
-            
-            MatchC1 = CommonFunction.GetValue<float>(RtDataValues,$"{ModuleName}.{VenusDevice.Match}.C1");
-            MatchC2 = CommonFunction.GetValue<float>(RtDataValues,$"{ModuleName}.{VenusDevice.Match}.C2");
-          
-            BiasMatchC1 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C1");
-            BiasMatchC2 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C2");
-            TurboPumpWaterFlowSwitch = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpWaterFlowSwitch.Value");
-            IsTurboPumpAtSpeed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpAtSpeed"); 
-            IsHasWafer= CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.HasWafer"); 
+                RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
 
+                if (RtDataValues == null)
+                {
+                    return;
+                }
 
-            if (PMCurrentState == PMState.Processing)
-            {
-                CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
-                if (CurrentRecipeResult.RecipeStepNumber != null)
-                { 
-                 CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32( CurrentRecipeResult.RecipeStepNumber) - 1];
+                TurboN2FlowSetPoint = Convert.ToInt32(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.TurboN2FlowSetPoint"));
+
+                PVN21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN21.IsOpen");
+                GasFinalValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveGasFinal.IsOpen");
+                PV11ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV11.IsOpen");
+                PV12ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV12.IsOpen");
+                PV21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV21.IsOpen");
+                PV22ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV22.IsOpen");
+                PV31ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV31.IsOpen");
+                PV32ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV32.IsOpen");
+                PV41ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV41.IsOpen");
+                PV42ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePV42.IsOpen");
+                MFC1ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc1.IsOpen");
+                MFC2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc2.IsOpen");
+                MFC3ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc3.IsOpen");
+                MFC4ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc4.IsOpen");
+                MFC5ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc5.IsOpen");
+                MFC6ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc6.IsOpen");
+                MFC7ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc7.IsOpen");
+                MFC8ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveMfc8.IsOpen");
+                N2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveN2.IsOpen");
+                SoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveSoftPump.IsOpen");
+                FastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveFastPump.IsOpen");
+                GuageValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveGuage.IsOpen");
+                PVHe1ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe1.IsOpen");
+                PVHe2ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe2.IsOpen");
+                PVN21ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN21.IsOpen");
+                PVN22ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVN22.IsOpen");
+                TurboPumpPumpingValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveTurboPumpPumping.IsOpen");
+                TurboPumpPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveTurboPumpPurge.IsOpen");
+                PVHe3ValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValvePVHe3.IsOpen");
+                HeISOValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.ValveHeISO.IsOpen");
+
+
+
+                PumpIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.PumpIsRunning");
+                TurboIsOpen = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpIsRunning");
+
+
+                LiftPinIsUp = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.LiftPinIsUp");
+                IsSlitDoorClosed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsSlitDoorClosed");
+                IsLidClosed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsLidClosed");
+
+                PendulumValvePosition = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.GetPVPosition");
+                TurboPumpRotationalSpeed = Convert.ToInt32(RtDataValues[$"{ModuleName}.TurboPumpRotationalSpeed"].ToString());
+
+                PositionValue = -((int)((PendulumValvePosition) * 0.09));
+
+
+                PMCurrentState = (PMState)Enum.Parse(typeof(PMState), RtDataValues[$"{ModuleName}.FsmState"].ToString());
+
+                GasIsFlowing = PMCurrentState == PMState.GasFlowing;
+                IsProcessing = PMCurrentState == PMState.Processing;
+                MFC1Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas1");
+                MFC2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas2");
+                MFC3Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas3");
+                MFC4Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas4");
+                MFC5Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas5");
+                MFC6Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas6");
+                MFC7Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas7");
+                MFC8Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcGas8");
+                MFCHeData = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcHe");
+                MFCN2Data = CommonFunction.GetValue<AITMfcData>(RtDataValues, $"{ModuleName}.MfcN2");
+
+                SRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.Rf}.DeviceData");
+                BRFData = CommonFunction.GetValue<AITRfData>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasRf}.DeviceData");
+                PendulumValveData = CommonFunction.GetValue<AITPendulumValveData>(RtDataValues, $"{ModuleName}.{VenusDevice.PendulumValve}.DeviceData");
+                ESCHVData = CommonFunction.GetValue<AITHVData>(RtDataValues, $"{ModuleName}.{VenusDevice.ESCHV}.DeviceData");
+
+
+                ValveHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ValveHeater.DeviceData"];
+                ForelineHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.ForelineHeater.DeviceData"];
+                WallHeaterData = (AITHeaterData)RtDataValues[$"{ModuleName}.WallHeater.DeviceData"];
+
+                ProcessHighPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessHighPressure");
+                ProcessLowPressure = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.ProcessLowPressure");
+                ForelinePressure = float.Parse(RtDataValues[$"{ModuleName}.ForelinePressure"].ToString());
+                ESCHePressure = float.Parse(RtDataValues[$"{ModuleName}.ESCHePressure"].ToString());
+
+                ChillerTemperature = float.Parse(RtDataValues[$"{ModuleName}.Chiller.Temp"].ToString());
+
+                HVTemperature = float.Parse(RtDataValues[$"{ModuleName}.{VenusDevice.ESCHV}.Temp"].ToString());
+
+
+
+                ChillerIsOn = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.Chiller.IsOn");
+
+                SourceRFFanInterlock = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.SourceRFFanInterlock");
+                IsWLK = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWLK");
+                IsWaterFlowOk = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsWaterFlowOk");
+                IsTurboPumpInterlock = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpInterlock");
+                IsCDAOK = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsCDA_OK");
+                SensorGasBoxDoor = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.GasBoxDoorSW.Value");
+                SensorGasBoxPressure = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.GasBoxPressureSW.Value");
+
+                IsATM = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsATM");
+                IsVAC = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsVAC");
+
+                ESCHVOutputVoltage = CommonFunction.GetValue<int>(RtDataValues, $"{ModuleName}.ESCHV.OutputVoltage");
+
+
+                MatchC1 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.Match}.C1");
+                MatchC2 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.Match}.C2");
+
+                BiasMatchC1 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C1");
+                BiasMatchC2 = CommonFunction.GetValue<float>(RtDataValues, $"{ModuleName}.{VenusDevice.BiasMatch}.C2");
+                TurboPumpWaterFlowSwitch = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.TurboPumpWaterFlowSwitch.Value");
+                IsTurboPumpAtSpeed = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.IsTurboPumpAtSpeed");
+                IsHasWafer = CommonFunction.GetValue<bool>(RtDataValues, $"{ModuleName}.HasWafer");
+
+
+                if (PMCurrentState == PMState.Processing)
+                {
+                    CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
+                    if (CurrentRecipeResult.RecipeStepNumber != null)
+                    {
+                        CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32(CurrentRecipeResult.RecipeStepNumber) - 1];
+                    }
+                }
+                else
+                {
+                    CurrentRecipeResult = null;
+                    CurrentRecipeStep = null;
                 }
-            }
-            else
-            {
-                CurrentRecipeResult = null;
-                CurrentRecipeStep = null;
-            }
 
-            if (Math.Abs(100 - ProcessLowPressure) > 1 && ProcessLowPressure<100)
-            {
-                ChamberPressureFeedBack =  ProcessLowPressure;
+                if (Math.Abs(100 - ProcessLowPressure) > 1 && ProcessLowPressure < 100)
+                {
+                    ChamberPressureFeedBack = ProcessLowPressure;
+                }
+                else
+                {
+                    ChamberPressureFeedBack = ProcessHighPressure;
+                }
             }
-            else
-            { 
-                ChamberPressureFeedBack =  ProcessHighPressure;
+            catch (Exception ex)
+            {
+                LOG.WriteExeption(ex.Message, ex);
             }
         }       
         public void addDataKeys()

+ 66 - 16
Venus/Venus_MainPages/ViewModels/RecipeViewModel.cs

@@ -190,6 +190,7 @@ namespace Venus_MainPages.ViewModels
         private void OnSaveRecipe()
         {
             SaveRecipe(CurrentRecipeName, RecipeUnity.RecipeToString(CurrentRecipe));
+            LoadHeadWrapPanel(headWrapPanel, CurrentRecipe);
         }
         private void OnLoaded(Object myrecipeView)
         {
@@ -428,6 +429,11 @@ namespace Venus_MainPages.ViewModels
                 }
             }
         }
+        private IEnumerable<string> GetFilesNames(string path)
+        {
+            return Directory.GetFiles(path, "*.rcp")
+      .Select(Path.GetFileNameWithoutExtension);
+        }
         private void LoadHeadWrapPanel(WrapPanel HeadWrapPanel, Recipe recipe)
         {
             HeadWrapPanel.Children.Clear();
@@ -448,14 +454,37 @@ namespace Venus_MainPages.ViewModels
                     Mode = BindingMode.TwoWay,        // 绑定模式  
                     UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged    //触发器
                 };
+
                 var propertyTypeName = propertyInfo.PropertyType.Name;
                 var propertyInfoName = propertyInfo.Name;
                 Control control = new Control();
-
-                switch (propertyTypeName)
+                switch (propertyInfoName)
                 {
-                    case "Int32":
-                    case "String":
+                    case "ChamberType":
+                    case "Type":
+                        control = new ComboBox();
+                        control.Height = 23;
+                        control.SetBinding(ComboBox.SelectedItemProperty, binding);
+                        ItemsControlHelper.SetEnumValuesToItemsSource(control, true);
+                        break;
+                    case "ChuckRecipe":
+                        control = new ComboBox()
+                        {
+                            ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList().Where(item => item.ToLower().Contains("chuck")&& (item.ToLower().Contains("dechuck")==false))
+                        };
+                        control.Height = 23;
+                        control.SetBinding(ComboBox.SelectedItemProperty, binding);
+                        break;
+                    case "DechuckRecipe":
+                        control = new ComboBox()
+                        {
+                            ItemsSource= GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList().Where(item=>item.ToLower().Contains("dechuck"))
+                         };
+                        control.Height = 23;                   
+                        control.SetBinding(ComboBox.SelectedItemProperty, binding);
+
+                        break;
+                    default:
                         control = new TextBox();
 
                         control.Margin = new Thickness(1, 0, 0, 0);
@@ -473,19 +502,40 @@ namespace Venus_MainPages.ViewModels
                             (control as TextBox).IsReadOnly = true;
                         }
                         break;
-
-                    case "Boolean":
-                        control = new CheckBox();
-                        control.SetBinding(CheckBox.IsCheckedProperty, binding);
-                        break;
-
-                    default:
-                        control = new ComboBox();
-                        control.Height = 23;
-                        control.SetBinding(ComboBox.SelectedItemProperty, binding);
-                        ItemsControlHelper.SetEnumValuesToItemsSource(control, true);
-                        break;
                 }
+                //switch (propertyTypeName)
+                //{
+                //    case "Int32":
+                //    case "String":
+                //        control = new TextBox();
+                //        control.Margin = new Thickness(1, 0, 0, 0);
+                //        control.BorderThickness = new Thickness(0, 0, 0, 1);
+                //        //control.BorderBrush = Brushes.Black;
+                //        control.FontSize = 15;
+                //        control.Foreground = Brushes.Green;
+                //        control.Background = Brushes.Transparent;
+                //        control.VerticalAlignment = VerticalAlignment.Center;
+                //        control.MinWidth = 15;
+                //        control.SetBinding(TextBox.TextProperty, binding);
+                //        object[] objAttrs = propertyInfo.GetCustomAttributes(typeof(IsOnlyReadAttribute), true);
+                //        if (objAttrs.Length > 0)
+                //        {
+                //            (control as TextBox).IsReadOnly = true;
+                //        }
+                //        break;
+
+                //    case "Boolean":
+                //        control = new CheckBox();
+                //        control.SetBinding(CheckBox.IsCheckedProperty, binding);
+                //        break;
+
+                //    default:
+                //        control = new ComboBox();
+                //        control.Height = 23;
+                //        control.SetBinding(ComboBox.SelectedItemProperty, binding);
+                //        ItemsControlHelper.SetEnumValuesToItemsSource(control, true);
+                //        break;
+                //}
                 HeadWrapPanel.Children.Add(control);
             }
         }

+ 1 - 1
Venus/Venus_MainPages/Views/OverVenusView.xaml

@@ -978,7 +978,7 @@
                 <TextBlock Grid.Row="15"  Grid.Column="1" Text="{Binding MFC6Data.FeedBack,StringFormat='F1'}"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="16"  Grid.Column="1" Text="{Binding MFC7Data.FeedBack,StringFormat='F1'}"       Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="17"  Grid.Column="1" Text="{Binding MFC8Data.FeedBack,StringFormat='F1'}"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
-                <TextBlock Grid.Row="18"  Grid.Column="1" Text="{Binding ESCHVOutputVoltage}"          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center" />
+                <TextBlock Grid.Row="18"  Grid.Column="1" Text="{Binding ESCHVData.OutputVoltage}"          Background="#E9EDF4"  TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center" />
                 <TextBlock Grid.Row="19"  Grid.Column="1" Text="{Binding ChillerTemperature,StringFormat='F1'}"        Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="20"  Grid.Column="1" Text="{Binding ESCHePressure,StringFormat='F1'}"       Background="#E9EDF4"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>
                 <TextBlock Grid.Row="21"  Grid.Column="1" Text="{Binding MFCHeData.FeedBack,StringFormat='F1'}"       Background="#D0D8E8"   TextBlock.TextAlignment="Center" Padding="0,5,0,0" Block.TextAlignment="Center"/>

+ 2 - 2
Venus/Venus_RT/Config/PM/Kepler2200A/Kepler2200AInterlock.xml

@@ -180,7 +180,7 @@
   <Action do="DO_Slit_Door_Open" value="true" tip="Slit Door Open" tip.zh-CN="" tip.en-US="DO-24" >
     <Limit di="DI_Lid_Closed"		value="true" tip="DI Lid Closed"			tip.zh-CN="" tip.en-US="DI-0"/>
     <Limit di="DI_CDA_Pressure_Switch"			value="true" tip="DI CDA Pressure"			tip.zh-CN="" tip.en-US="DI-12" />
-    <Limit di="DI_Arm_Not_Extend_to_PM"	value="true" tip="Arm Not Extend  to PM"	tip.zh-CN="" tip.en-US="DI-76" />
+    <Limit di="DI_Arm_Not_Extend_to_PM"	value="true" tip="Arm Not Extend to PM"	tip.zh-CN="" tip.en-US="DI-76" />
 
   </Action>
 
@@ -188,7 +188,7 @@
   <Action do="DO_Slit_Door_Close" value="true" tip="Slit Door Close" tip.zh-CN="" tip.en-US="DO-25" >
     <Limit di="DI_Lid_Closed"		value="true" tip="DI Lid Closed"			tip.zh-CN="" tip.en-US="DI-0"/>
     <Limit di="DI_CDA_Pressure_Switch"			value="true" tip="DI CDA Pressure"			tip.zh-CN="" tip.en-US="DI-12"/>
-    <Limit di="DI_Arm_Not_Extend_to_PM"	value="true" tip="Arm Not Extend  to PM"	tip.zh-CN="" tip.en-US="DI-76" />
+    <Limit di="DI_Arm_Not_Extend_to_PM"	value="true" tip="Arm Not Extend to PM"	tip.zh-CN="" tip.en-US="DI-76" />
   </Action>
 
   <Action do="DO_Turbo_Pump_Pumping_Valve" value="true" tip="Turbo Pump Pumping Valve" tip.zh-CN="" tip.en-US="DO-29" >

+ 37 - 2
Venus/Venus_Simulator/Instances/SimulatorSystem.cs

@@ -226,7 +226,13 @@ namespace Venus_Simulator.Instances
 
                     IO.DI[$"{mod}.DI_Gas_Box_Door_Switch"].Value = true;
                     IO.DI[$"{mod}.DI_Gas_Box_Pressure_Switch"].Value = true;
-
+                    IO.DI[$"{mod}.DI_Source_RF_Water_Flow_Switch"].Value = true;
+                    IO.DI[$"{mod}.DI_S_Valve_OT_Switch_Alarm"].Value = false;
+                    IO.DI[$"{mod}.DI_Foreline_OT_Switch_Alarm"].Value = false;         
+                    IO.DI[$"{mod}.DI_Arm_Not_Extend_to_PM"].Value = true;
+                    IO.DI[$"{mod}.DI_EFEM_Door_Colse"].Value = true;
+                    IO.DI[$"{mod}.DI_ESC_Inner_Coolant_Flow_SW"].Value = true;
+                    IO.DI[$"{mod}.DI_ESC_Outer_Coolant_Flow_SW"].Value = true;
 
 
                     //// pressure
@@ -464,7 +470,36 @@ namespace Venus_Simulator.Instances
 
                         break;
                 }
-              
+                //switch (SimulatorJetChamber.CurrentPMCChamber)
+                //{
+                //    case JetChamber.Venus:
+                //        // PMC
+                //        MonitorSlitDoor(ModuleName.PMC);
+                //        MonitorPin(ModuleName.PMC);
+                //        MonitorPressure(ModuleName.PMC);
+                //        //MonitorTemperature(ModuleName.PMB);
+                //        MonitorGas(ModuleName.PMC);
+                //        // MonitorRF(ModuleName.PMB);
+                //        ChangeTime(ModuleName.PMC);
+                //        //MonitorIOPumpCtrl(ModuleName.PMB);
+                //        break;
+
+                //    case JetChamber.Kepler2300:
+                //    case JetChamber.Kepler2200A:
+                //    case JetChamber.Kepler2200B:
+                //        // PMC
+                //        MonitorSlitDoor(ModuleName.PMC);
+                //        MonitorPin(ModuleName.PMC);
+                //        MonitorPressure_Kepler(ModuleName.PMC);
+                //        //MonitorTemperature(ModuleName.PMB);
+                //        MonitorGas(ModuleName.PMC);
+                //        // MonitorRF(ModuleName.PMB);
+                //        ChangeTime(ModuleName.PMC);
+                //        //MonitorIOPumpCtrl(ModuleName.PMB);
+                //        MonitorLid(ModuleName.PMC);
+                //        break;
+                //}
+
                 ChangeTime(ModuleName.TM);
 
                 MonitorMFSlitDoor();