Browse Source

bug提交

lixiang 1 year ago
parent
commit
b1e6a9ce63

+ 19 - 5
Venus/Venus_MainPages/ViewModels/DataHistoryViewModel.cs

@@ -44,6 +44,7 @@ namespace Venus_MainPages.ViewModels
         DispatcherTimer timer = new DispatcherTimer();
         public List<SolidColorBrush> solidColorBrushes = new List<SolidColorBrush> ();
         DateTime currentTime;
+        private bool firstFlag = true;
         #endregion
 
         #region 属性
@@ -70,6 +71,10 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<object> LoadCommand =>
             _LoadCommand ?? (_LoadCommand = new DelegateCommand<object>(OnLoad));
 
+        private DelegateCommand _UnLoadCommand;
+        public DelegateCommand UnLoadCommand =>
+            _UnLoadCommand ?? (_UnLoadCommand = new DelegateCommand(OnUnLoad));
+
         private DelegateCommand<object> _ParameterCheckCommand;
         public DelegateCommand<object> ParameterCheckCommand =>
             _ParameterCheckCommand ?? (_ParameterCheckCommand = new DelegateCommand<object>(OnParameterCheck));
@@ -118,11 +123,20 @@ namespace Venus_MainPages.ViewModels
         #region 命令方法
         private void OnLoad(Object eventView)
         {
-            this.DataHistoryView = (DataHistoryView)eventView;
-            this.DataHistoryView.wfTimeFrom.Value = DateTime.Today;
-            this.DataHistoryView.wfTimeTo.Value = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 23, 59, 59, 999);
-            //this.DataHistoryView.MyDrawGraphicsControl.PointCollections=new PointCollection(new Point[] {})
-
+            if (firstFlag)
+            {
+                this.DataHistoryView = (DataHistoryView)eventView;
+                this.DataHistoryView.wfTimeFrom.Value = DateTime.Today;
+                this.DataHistoryView.wfTimeTo.Value = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 23, 59, 59, 999);
+                //this.DataHistoryView.MyDrawGraphicsControl.PointCollections=new PointCollection(new Point[] {})
+            }
+        }
+        private void OnUnLoad()
+        {
+            GC.Collect(); // This should pick up the control removed at a previous MouseDown
+            GC.WaitForPendingFinalizers(); // Doesn't help either
+            GC.Collect();
+            GC.WaitForPendingFinalizers(); // Doesn't help either
         }
         private void OnParameterCheck(object obj)
         {      

+ 6 - 4
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -518,17 +518,19 @@ namespace Venus_MainPages.ViewModels
         }
         private void OnStart(object obj)
         {
-            var info = obj as WaferAssociationInfo;
-            
+            var info = obj as WaferAssociationInfo;           
             InvokeClient.Instance.Service.DoOperation("System.StartJob", info.LotId);
         }
         private void OnStop(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation("System.PauseJob", obj.ToString());
+            var info = obj as WaferAssociationInfo;
+            InvokeClient.Instance.Service.DoOperation("System.PauseJob", info.JobID);
         }
         private void OnAbort(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation("System.ResumeJob", obj.ToString());
+            var info = obj as WaferAssociationInfo;
+
+            InvokeClient.Instance.Service.DoOperation("System.ResumeJob", info.JobID);
         }
         private void OnHomeAll()
         {

+ 1 - 5
Venus/Venus_MainPages/ViewModels/OverVenusViewModel.cs

@@ -1578,11 +1578,7 @@ namespace Venus_MainPages.ViewModels
 
                 if (PMCurrentState == PMState.Processing)
                 {
-                    //var cr= CommonFunction.GetValue<Recipe>(RtDataValues, $"{ModuleName}.CurrentRecipe");
-                    //if (cr == null) 
-                    //{
-                    //    return;
-                    //}
+
 
                     CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
                     if (CurrentRecipeResult.RecipeStepNumber != null)

+ 2 - 0
Venus/Venus_MainPages/ViewModels/RecipeViewModel.cs

@@ -109,6 +109,8 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand<Object> LoadedCommand =>
             _LoadedCommand ?? (_LoadedCommand = new DelegateCommand<Object>(OnLoaded));
 
+      
+
         private DelegateCommand _SaveRecipeCommand;
         public DelegateCommand SaveRecipeCommand =>
             _SaveRecipeCommand ?? (_SaveRecipeCommand = new DelegateCommand(OnSaveRecipe));

File diff suppressed because it is too large
+ 11 - 8
Venus/Venus_MainPages/Views/DataHistoryView.xaml


+ 3 - 3
Venus/Venus_MainPages/Views/TMView.xaml

@@ -228,9 +228,9 @@
             <Viewbox Width="420" Height="720" Stretch="Fill" >
                 <Canvas Canvas.Top="100" Width="450" Height="800">
                     <userControls:MainTM Width="300" Height="250" Canvas.Left="380" Canvas.Top="90"/>
-                    
-                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot"  RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}" RobotWafer="{Binding BladeAWafer}"/>
-                    <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
+
+                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot"  RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}" RobotWafer="{Binding BladeAWafer}"  RobotSpeed="15"/>
+                    <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}" RobotSpeed="12"/>
 
 
                     <userControls:LoadLockLeft  Width="150" Height="150"  Canvas.Top="310"  Canvas.Left="358"   DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLAESlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>

+ 2 - 2
Venus/Venus_MainPages/Views/WaferAssociationUnit.xaml

@@ -92,7 +92,7 @@
                                     </i:EventTrigger>
                                 </i:Interaction.Triggers>-->
                     </Button>
-                    <Button Content="Stop" Width="100" Height="25" Margin="30,0,0,0" Command="{Binding StopCommand}" CommandParameter="{Binding ElementName=txtJobID,Path=Text}">
+                    <Button Content="Stop" Width="100" Height="25" Margin="30,0,0,0" Command="{Binding StopCommand}" CommandParameter="{Binding ElementName=WaferUnit,Path=WAInfo}">
                         <!--<i:Interaction.Triggers>
                                     <i:EventTrigger EventName="Click">
                                         <cal:ActionMessage MethodName="Pause">
@@ -101,7 +101,7 @@
                                     </i:EventTrigger>
                                 </i:Interaction.Triggers>-->
                     </Button>
-                    <Button Content="Abort" Width="100" Height="25" Margin="30,0,0,0" Command="{Binding AbortCommand}" CommandParameter="{Binding ElementName=txtJobID,Path=Text}">
+                    <Button Content="Abort" Width="100" Height="25" Margin="30,0,0,0" Command="{Binding AbortCommand}" CommandParameter="{Binding ElementName=WaferUnit,Path=WAInfo}">
                         <!--<i:Interaction.Triggers>
                                     <i:EventTrigger EventName="Click">
                                         <cal:ActionMessage MethodName="Resume">

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

@@ -181,10 +181,10 @@ namespace Venus_RT.Devices
         public override float BiasReflectPower => _GeneratorBias.ReflectPower;
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
-        public override float RFMatchC1 => _Match.TunePosition1;
-        public override float RFMatchC2 => _Match.TunePosition2;
-        public override float BiasRFMatchC1 => _BiasMatch.TunePosition1;
-        public override float BiasRFMatchC2 => _BiasMatch.TunePosition1;
+        public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
+        public override float RFMatchC2 => _Match != null ? _Match.TunePosition2 : 0;
+        public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
         public new ModuleName Module { get; }
 
         public override MovementPosition LiftPinPosition

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

@@ -200,10 +200,10 @@ namespace Venus_RT.Devices
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
 
-        public override float RFMatchC1 => _Match.TunePosition1;
-        public override float RFMatchC2 => _Match.TunePosition2;
-        public override float BiasRFMatchC1 => _BiasMatch.TunePosition1;
-        public override float BiasRFMatchC2 => _BiasMatch.TunePosition1;
+        public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
+        public override float RFMatchC2 => _Match != null ? _Match.TunePosition2 : 0;
+        public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
 
         public new ModuleName Module { get; }
 

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

@@ -185,10 +185,10 @@ namespace Venus_RT.Devices
         public override float BiasReflectPower => _GeneratorBias.ReflectPower;
 
         public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
-        public override float RFMatchC1 => _Match.TunePosition1;
-        public override float RFMatchC2 => _Match.TunePosition2;
-        public override float BiasRFMatchC1 => _BiasMatch.TunePosition1;
-        public override float BiasRFMatchC2 => _BiasMatch.TunePosition1;
+        public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
+        public override float RFMatchC2 => _Match != null ? _Match.TunePosition2 : 0;
+        public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
+        public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
 
 
         public new ModuleName Module { get; }

+ 10 - 10
Venus/Venus_Simulator/Instances/SimulatorSystem.cs

@@ -1599,16 +1599,16 @@ namespace Venus_Simulator.Instances
         void MonitorGas(ModuleName mod)
         {
             // gas
-            this.SimulateMFC(ModuleName.PMA, 1);
-            this.SimulateMFC(ModuleName.PMA, 2);
-            this.SimulateMFC(ModuleName.PMA, 3);
-            this.SimulateMFC(ModuleName.PMA, 4);
-            this.SimulateMFC(ModuleName.PMA, 5);
-            this.SimulateMFC(ModuleName.PMA, 6);
-            this.SimulateMFC(ModuleName.PMA, 7);
-            this.SimulateMFC(ModuleName.PMA, 8);
-            this.SimulateN2(ModuleName.PMA);
-            this.SimulateHe(ModuleName.PMA);
+            this.SimulateMFC(mod, 1);
+            this.SimulateMFC(mod, 2);
+            this.SimulateMFC(mod, 3);
+            this.SimulateMFC(mod, 4);
+            this.SimulateMFC(mod, 5);
+            this.SimulateMFC(mod, 6);
+            this.SimulateMFC(mod, 7);
+            this.SimulateMFC(mod, 8);
+            this.SimulateN2(mod);
+            this.SimulateHe(mod);
         }
 
         private void SimulateMFC(ModuleName mod, byte gasNum)

+ 17 - 1
Venus/Venus_Themes/CustomControls/CustomRobot.cs

@@ -138,8 +138,23 @@ namespace Venus_Themes.CustomControls
             set => SetValue(RobotTActionProperty, value);
         }
 
+        public static readonly DependencyProperty RobotSpeedProperty = DependencyProperty.Register(
+           "RobotSpeed",
+           typeof(double),
+           typeof(WaferRobotControl),
+            new PropertyMetadata(9.0d, RobotSpeedPropertyChangedCallback));
 
-       public string OriginT { get; set; }
+        public double RobotSpeed
+        {
+            get => (double)GetValue(RobotSpeedProperty);
+            set => SetValue(RobotSpeedProperty, value);
+        }
+        private static void RobotSpeedPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            
+            
+        }
+        public string OriginT { get; set; }
 
         private static void RobotTActionPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
@@ -159,5 +174,6 @@ namespace Venus_Themes.CustomControls
             VisualStateManager.GoToState(this, WaferRobotXAction.X_Origin.ToString(), true);
             VisualStateManager.GoToState(this, OriginT, true);
         }
+        
     }
 }

+ 4 - 4
Venus/Venus_Themes/Themes/Generic.xaml

@@ -38,7 +38,7 @@
                                 <VisualStateGroup Name="RobotXActions">
                                     <VisualStateGroup.Transitions>
                                         <VisualTransition To="Extend">
-                                            <Storyboard FillBehavior="HoldEnd" SpeedRatio="6">
+                                        <Storyboard FillBehavior="HoldEnd" Timeline.SpeedRatio="9">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
                                                     <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
                                                 <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:9"/>
@@ -62,7 +62,7 @@
                                             </Storyboard>
                                         </VisualTransition>
                                         <VisualTransition To="Retract">
-                                            <Storyboard FillBehavior="HoldEnd" SpeedRatio="6">
+                                            <Storyboard FillBehavior="HoldEnd" SpeedRatio="9">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
                                                     <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:0"/>
                                                     <LinearDoubleKeyFrame Value="90" KeyTime="0:0:9"/>
@@ -408,7 +408,7 @@
                             <VisualStateGroup Name="RobotXActions">
                                 <VisualStateGroup.Transitions>
                                     <VisualTransition To="Extend">
-                                        <Storyboard FillBehavior="HoldEnd" SpeedRatio="6">
+                                        <Storyboard FillBehavior="HoldEnd" SpeedRatio="9">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
                                                 <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
                                                 <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:9"/>
@@ -432,7 +432,7 @@
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="Retract">
-                                        <Storyboard FillBehavior="HoldEnd" SpeedRatio="6">
+                                        <Storyboard FillBehavior="HoldEnd" SpeedRatio="9">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
                                                 <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:0"/>
                                                 <LinearDoubleKeyFrame Value="90" KeyTime="0:0:9"/>