Browse Source

优化传片动画

lixiang 1 year ago
parent
commit
3be4fea304

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

@@ -192,43 +192,47 @@ namespace Venus_MainPages.ViewModels
                     Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
                     await Task.Delay(1500);
                     Robot1XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot1XAction = WaferRobotXAction.Retract;
                 }
                 else if (arm == "ArmB")
                 {
                     Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
                     await Task.Delay(1500);
                     Robot2XAction = WaferRobotXAction.Extend;
+                    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;
-                }
-            }
+            //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
 
@@ -1150,6 +1154,9 @@ namespace Venus_MainPages.ViewModels
 
             m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
             m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
+
+            m_RtDataKeys.Add("TMCycle.CycleIndex");
+
         }
         #endregion
     }

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

@@ -1123,7 +1123,7 @@
             <TextBlock Grid.Row="4" Text="Wall Temp.(°C)" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="1,0,0,0"/>-->
 
 
-            <TextBox Grid.Row="0" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding ESCVoltage}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" unity:TextBoxMaxValue.MaxValue="100"/>
+            <TextBox Grid.Row="0" Grid.Column="1" Width="Auto" Height="Auto" Text="{Binding ESCVoltage}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0"/>
             <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.1"  TextBlock.TextAlignment="Center" VerticalAlignment="Bottom" Block.TextAlignment="Center" Margin="0,0,0,4"/>
             <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="1" Width="Auto" Height="Auto" Text="0.2" TextBlock.TextAlignment="Center" VerticalAlignment="Center" Block.TextAlignment="Center"/>
             <!--<TextBox Grid.Row="3" Grid.Column="1" Width="Auto" Height="Auto" Text="0.0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="White"  BorderThickness="0" />

+ 2 - 0
Venus/Venus_MainPages/Views/TMView.xaml

@@ -248,6 +248,8 @@
                         <CheckBox  Grid.Column="2" Margin="5" Grid.ColumnSpan="4" IsChecked="{Binding CycleEnable}"/>
                         <TextBlock Text="TM Cycle Count"             Grid.Row="1" Grid.ColumnSpan="2" Padding="0,5,0,5" Background="#D0D8E8"/>
                         <TextBlock Text="TM Cycle Count Remained"    Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" Padding="0,5,0,5" Background="#D0D8E8"/>
+                        <TextBlock Text="{Binding RtDataValues[TMCycle.CycleIndex]}"    Grid.Row="1" Grid.Column="5"  Padding="0,5,0,5" Background="#D0D8E8" HorizontalAlignment="Center"/>
+
                         <TextBox Grid.Row="1" Grid.Column="2" BorderThickness="0" VerticalContentAlignment="Center" Padding="36,0,0,0" Text="{Binding CycleCount}"/>
                     </Grid>
                 </Border>

+ 2 - 0
Venus/Venus_RT/Modules/RouteManager.cs

@@ -141,6 +141,8 @@ namespace Venus_RT.Modules
 
 
             DATA.Subscribe("SYSTEM.FsmState", () => (((RtState)fsm.State).ToString()));
+            DATA.Subscribe("TMCycle.CycleIndex", () => (_TMCycle.CycleIndex));
+
 
 
         }

+ 14 - 10
Venus/Venus_RT/Modules/TMCycle.cs

@@ -43,6 +43,8 @@ namespace Venus_RT.Modules
         Queue<MoveItem> _ReturnWafers = new Queue<MoveItem>();
         Queue<MoveItem> _runningItems = new Queue<MoveItem>();
         Queue<MoveItem> _CycleWafers = new Queue<MoveItem>();
+
+        public int CycleIndex;
         public TMCycle() : base(ModuleName.System)
         {
             Name = "TM Cycle";
@@ -65,6 +67,7 @@ namespace Venus_RT.Modules
 
         public RState Start(params object[] objs)
         {
+            CycleIndex = 0;
             if (objs.Length == 2)
             {
                 var modules = ((string[])objs[0]).ToList();
@@ -89,16 +92,16 @@ namespace Venus_RT.Modules
 
             // temp debug
             {
-                for(int i = 0; i < _sourceSlotNumber; i ++)
-                {
-                    WaferManager.Instance.CreateWafer(_sourceModule, i, Aitex.Core.Common.WaferStatus.Normal);
-                    WaferManager.Instance.DeleteWafer(_destinationModule, i);
-                }
-
-                WaferManager.Instance.DeleteWafer(ModuleName.TM, 0);
-                WaferManager.Instance.DeleteWafer(ModuleName.TM, 1);
-                WaferManager.Instance.DeleteWafer(ModuleName.PMA, 0);
-                WaferManager.Instance.DeleteWafer(ModuleName.PMB, 0);
+                //for(int i = 0; i < _sourceSlotNumber; i ++)
+                //{
+                //    WaferManager.Instance.CreateWafer(_sourceModule, i, Aitex.Core.Common.WaferStatus.Normal);
+                //    WaferManager.Instance.DeleteWafer(_destinationModule, i);
+                //}
+
+                //WaferManager.Instance.DeleteWafer(ModuleName.TM, 0);
+                //WaferManager.Instance.DeleteWafer(ModuleName.TM, 1);
+                //WaferManager.Instance.DeleteWafer(ModuleName.PMA, 0);
+                //WaferManager.Instance.DeleteWafer(ModuleName.PMB, 0);
             }
             // temp debug
 
@@ -117,6 +120,7 @@ namespace Venus_RT.Modules
 
         private bool StartReturn()
         {
+            CycleIndex += 1;
             _destinationModule = tmCycleRoutine.Last();
             _destinationSlotNumber = SC.GetValue<int>($"{_destinationModule}.SlotNumber");
             _sourceModule = tmCycleRoutine.First();