Browse Source

优化跑片动画

lixiang 1 year ago
parent
commit
631916b7de

+ 21 - 15
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -775,18 +775,18 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("LP3.CassettePlaced");
         }
 
-        private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
-        {
-            InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
-        }
-        private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
-        {
-            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
-        }
-        private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
-        {
-            InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
-        }
+        //private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
+        //{
+        //    InvokeClient.Instance.Service.DoOperation($"{obj?.ModuleName}.SlitDoor.{obj?.IsOpen}");
+        //}
+        //private void UIEvents_LLTDoorRaiseChangedEvent(DoorPara obj)
+        //{
+        //    InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}TSlitDoor.{obj?.IsOpen}");
+        //}
+        //private void UIEvents_LLEDoorRaiseChangedEvent(DoorPara obj)
+        //{
+        //    InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
+        //}
         private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
         {
             if (oldValue == null || newValue == null)
@@ -816,7 +816,10 @@ namespace Venus_MainPages.ViewModels
                     Robot1TAction = robot1Robot1TAction;
                     await Task.Delay(1500);
                     Robot1XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot1XAction = WaferRobotXAction.Retract;
                 }
                 else if (arm == "ArmB")
@@ -827,7 +830,10 @@ namespace Venus_MainPages.ViewModels
                     Robot2TAction = robot2Robot1TAction;
                     await Task.Delay(1500);
                     Robot2XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot2XAction = WaferRobotXAction.Retract;
                 }
             }
@@ -910,7 +916,7 @@ namespace Venus_MainPages.ViewModels
             { 
                 CurrentRobotPosition = RobotPosition.Origin;
             }
-            await Task.Delay(1500);
+            await Task.Delay(600);
         }
         #endregion
 

+ 24 - 26
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -42,8 +42,6 @@ namespace Venus_MainPages.ViewModels
         private WaferRobotTAction m_Robot4TAction;
         private WaferRobotXAction m_Robot4XAction;
         private RobotMoveInfo m_robotMoveInfo;
-        int arm1oldWaferStatus = 100;
-        int arm2oldWaferStatus = 100;
         private WaferInfo m_PMAWafer;
         private WaferInfo m_PMBWafer;
         private WaferInfo m_PMCWafer;
@@ -452,7 +450,7 @@ namespace Venus_MainPages.ViewModels
         public OperationOverViewModel()
         {
             DispatcherTimer timer = new DispatcherTimer();
-            timer.Interval = TimeSpan.FromSeconds(0.5);
+            timer.Interval = TimeSpan.FromSeconds(0.1);
             timer.Tick += Timer_Tick;
             timer.Start();
 
@@ -720,17 +718,23 @@ namespace Venus_MainPages.ViewModels
                 if (arm == "ArmA")
                 {
                     Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-                    await Task.Delay(1500);
+                    await Task.Delay(600);
                     Robot1XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot1XAction = WaferRobotXAction.Retract;
                 }
                 else if (arm == "ArmB")
                 {
                     Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-                    await Task.Delay(1500);
+                    await Task.Delay(600);
                     Robot2XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot2XAction = WaferRobotXAction.Retract;
                 }
             }
@@ -790,8 +794,6 @@ namespace Venus_MainPages.ViewModels
 
             }
             #endregion
-            arm1oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus;
-            arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
 
         }
         private async void EFEMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
@@ -820,29 +822,32 @@ namespace Venus_MainPages.ViewModels
                 if (arm == "ArmA")
                 {
                     var robot3Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-                    await Task.Delay(2000);
+                    //await Task.Delay(1000);
                     await ChangePosition(robot3Robot3TAction);
                     Robot3TAction = robot3Robot3TAction;
-                    await Task.Delay(1500);
-
-                    //ChangePosition(Robot3TAction);
-                   // await Task.Delay(2000);
+                    await Task.Delay(600);
 
                     Robot3XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot3XAction = WaferRobotXAction.Retract;
                 }
                 else if (arm == "ArmB")
                 {
                     var robot4Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-                    await Task.Delay(2000);
+                    //await Task.Delay(1000);
                     await ChangePosition(robot4Robot4TAction);
                     Robot4TAction = robot4Robot4TAction;
-                    await Task.Delay(1500);
+                    await Task.Delay(600);
                     //ChangePosition(Robot4TAction);
                     //await Task.Delay(2000);
                     Robot4XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot4XAction = WaferRobotXAction.Retract;
                 }
             }
@@ -945,13 +950,6 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("PMC.CurrentRecipeResult");
             m_RtDataKeys.Add("PMD.CurrentRecipeResult");
 
-
-
-
-
-
-
-
         }
 
         private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)
@@ -1025,7 +1023,7 @@ namespace Venus_MainPages.ViewModels
             {
                 CurrentRobotPosition = RobotPosition.Origin;
             }
-            await Task.Delay(1500);
+            await Task.Delay(600);
         }
         #endregion
     }

+ 13 - 34
Venus/Venus_MainPages/ViewModels/TMViewModel.cs

@@ -194,49 +194,28 @@ namespace Venus_MainPages.ViewModels
                 if (arm == "ArmA")
                 {
                     Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-                    await Task.Delay(1500);
+                    await Task.Delay(1100);
                     Robot1XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    //await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus!= 0)|| (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
                     Robot1XAction = WaferRobotXAction.Retract;
                 }
                 else if (arm == "ArmB")
                 {
                     Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-                    await Task.Delay(1500);
+                    await Task.Delay(1100);
                     Robot2XAction = WaferRobotXAction.Extend;
-                    await Task.Delay(3000);
+                    while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus == 0))
+                    {
+                        await Task.Delay(100);
+                    }
+                    //await Task.Delay(3000);
                     Robot2XAction = WaferRobotXAction.Retract;
                 }
-            }
-          
-
-            //if ((oldValue.Action==RobotAction.Placing||oldValue.Action==RobotAction.Picking) && newValue.Action==RobotAction.None)
-            //{
-            //    var TMRobotMoveActionBladeTarget = oldValue.BladeTarget;
-            //    if (TMRobotMoveActionBladeTarget != null)
-            //    {
-            //        RobotTarget = TMRobotMoveActionBladeTarget.ToString();
-            //    }
-            //    else
-            //    {
-            //        return;
-            //    }
-            //    var values = RobotTarget.Split('.');
-            //    var arm = values[0];
-            //    var module = values[1];
-
-            //    if (arm == "ArmA")
-            //    {
-
-            //        Robot1XAction = WaferRobotXAction.Retract;
-            //    }
-            //    else if (arm == "ArmB")
-            //    {
-            //        Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
-            //        await Task.Delay(1500);
-            //        Robot2XAction = WaferRobotXAction.Retract;
-            //    }
-            //}
+            }       
 
             #endregion
 

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

@@ -69,7 +69,7 @@
                         <DataTemplate>
                             <StackPanel Orientation="Horizontal">
                                 <TextBlock Text="{Binding Key}" Width="300"/>
-                                <Button  Width="42" FontSize="11"  Height="20"  Background="{Binding Color,UpdateSourceTrigger=PropertyChanged}" Click="OnChangeLineColor"/>
+                                <Button  Width="42" FontSize="11"  Height="20"  Background="{Binding Color,UpdateSourceTrigger=PropertyChanged}" Click="OnChangeLineColor" Tag="{Binding UniqueId}"/>
                             </StackPanel>
                         </DataTemplate>
                     </ListBox.ItemTemplate>

+ 2 - 2
Venus/Venus_Simulator/Devices/EfemSimulator.cs

@@ -224,12 +224,12 @@ namespace Venus_Simulator.Devices
             case EfemOperation.Map:
             case EfemOperation.GetWaferInfo:
             case EfemOperation.Align:
-                sec = 300;
+                sec = 2200;
                 break;
             case EfemOperation.Pick:
             case EfemOperation.Place:
             case EfemOperation.Orgsh:
-                sec = 400;
+                sec = 2200;
                 break;
             case EfemOperation.Light:
             case EfemOperation.SigStatus:

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

@@ -142,21 +142,21 @@
                                         <VisualTransition To="PMA">
                                             <Storyboard FillBehavior="HoldEnd">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                    <LinearDoubleKeyFrame Value="0" KeyTime="0:0:1"/>
+                                                    <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0.5"/>
                                                 </DoubleAnimationUsingKeyFrames>
                                             </Storyboard>
                                         </VisualTransition>
                                         <VisualTransition To="PMB">
                                             <Storyboard FillBehavior="HoldEnd">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                    <LinearDoubleKeyFrame Value="60" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="60" KeyTime="0:0:0.5"/>
                                                 </DoubleAnimationUsingKeyFrames>
                                             </Storyboard>
                                         </VisualTransition>
                                         <VisualTransition To="PMC">
                                             <Storyboard FillBehavior="HoldEnd">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                    <LinearDoubleKeyFrame Value="120" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="120" KeyTime="0:0:0.5"/>
                                                 </DoubleAnimationUsingKeyFrames>
                                             </Storyboard>
                                         </VisualTransition>
@@ -170,14 +170,14 @@
                                         <VisualTransition To="LLA">
                                             <Storyboard FillBehavior="HoldEnd">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                    <LinearDoubleKeyFrame Value="-65" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-65" KeyTime="0:0:0.5"/>
                                                 </DoubleAnimationUsingKeyFrames>
                                             </Storyboard>
                                         </VisualTransition>
                                         <VisualTransition To="LLB">
                                             <Storyboard FillBehavior="HoldEnd">
                                                 <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                    <LinearDoubleKeyFrame Value="-115" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-115" KeyTime="0:0:0.5"/>
                                                 </DoubleAnimationUsingKeyFrames>
                                             </Storyboard>
                                         </VisualTransition>
@@ -504,7 +504,7 @@
                                     <VisualTransition To="T_Origin">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
@@ -512,63 +512,63 @@
                                     <VisualTransition To="Aligner1">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LP1">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LP2">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LP3">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LLA">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="60" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="60" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LLB">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="125" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="125" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="RightLocation">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
-                                                <LinearDoubleKeyFrame Value="80" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="80" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LeftLocation">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
-                                                <LinearDoubleKeyFrame Value="-80" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-80" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="PMD">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="180" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="180" KeyTime="0:0:0.5"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>

+ 4 - 4
Venus/Venus_Themes/UserControls/EFEM.xaml

@@ -15,28 +15,28 @@
                 <VisualTransition To="Left">
                     <Storyboard FillBehavior="HoldEnd">
                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="X">
-                            <LinearDoubleKeyFrame Value="-210" KeyTime="0:0:1"/>
+                            <LinearDoubleKeyFrame Value="-210" KeyTime="0:0:0.5"/>
                         </DoubleAnimationUsingKeyFrames>
                     </Storyboard>
                 </VisualTransition>
                 <VisualTransition To="Right">
                     <Storyboard FillBehavior="HoldEnd">
                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="X">
-                            <LinearDoubleKeyFrame Value="510" KeyTime="0:0:1"/>
+                            <LinearDoubleKeyFrame Value="510" KeyTime="0:0:0.5"/>
                         </DoubleAnimationUsingKeyFrames>
                     </Storyboard>
                 </VisualTransition>
                 <VisualTransition To="Middle">
                     <Storyboard FillBehavior="HoldEnd">
                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="X">
-                            <LinearDoubleKeyFrame Value="130" KeyTime="0:0:1"/>
+                            <LinearDoubleKeyFrame Value="130" KeyTime="0:0:0.5"/>
                         </DoubleAnimationUsingKeyFrames>
                     </Storyboard>
                 </VisualTransition>
                 <VisualTransition To="Origin">
                     <Storyboard FillBehavior="HoldEnd">
                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="X">
-                            <LinearDoubleKeyFrame Value="0" KeyTime="0:0:1"/>
+                            <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0.5"/>
                         </DoubleAnimationUsingKeyFrames>
                     </Storyboard>
                 </VisualTransition>