Browse Source

robot place 删除测试代码

lixiang 1 year ago
parent
commit
1a9114214b

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

@@ -8,7 +8,7 @@
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             Width="300" Height="350" WindowStyle="None" MouseLeftButtonDown="Window_MouseLeftButtonDown" Background="#B1D2F2">
+             Width="300" Height="300" WindowStyle="None" ResizeMode="CanMinimize" BorderThickness="1" MouseLeftButtonDown="Window_MouseLeftButtonDown" Background="#B1D2F2">
     <Window.Resources>
         <converters:BoolToValueConverter x:Key="BoolToValueConverter"/>
         <converters:BoolToBool x:Key="BoolToBool"/>

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

@@ -6,7 +6,7 @@
              xmlns:local="clr-namespace:Venus_MainPages.Views"
              xmlns:converters="clr-namespace:Venus_Themes.Converters;assembly=Venus_Themes"
              mc:Ignorable="d" 
-             Height="260" Width="310" WindowStyle="None"  MouseLeftButtonDown="Window_MouseLeftButtonDown" Background="#B1D2F2"> 
+             Height="260" Width="310" WindowStyle="None" ResizeMode="CanMinimize" BorderThickness="1"  MouseLeftButtonDown="Window_MouseLeftButtonDown" Background="#B1D2F2"> 
     <Window.Resources>
         <converters:BoolToBool x:Key="BoolToBool"/>
     </Window.Resources>

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

@@ -467,8 +467,8 @@
                     <StackPanel Grid.Row="1" Grid.ColumnSpan="5" Orientation="Horizontal" HorizontalAlignment="Center" Height="35">
                         <customControls:PathButton Content="Home"              Width="110" Height="28" Margin="0,0,5,0"   Command="{Binding HomeCommand}" IsEnabled="{Binding Path=TMIsOFFline}"/>
                         <customControls:PathButton Content="Vent"              Width="110" Height="28" Margin="0 0 5 0"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding VentCommand}"/>
-                        <customControls:PathButton Content="Pump"              Width="114" Height="28" Margin="0 0 0 0"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding PumpCommand}"/>
-                        <customControls:PathButton Content="Check Load"        Width="110" Height="28" Margin="5,0,0,0" Visibility="{Binding ElementName=tmRadioButton,Path=IsChecked,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding Path=TMIsOFFline}"/>
+                        <customControls:PathButton Content="Pump"              Width="110" Height="28" Margin="0 0 0 0"  IsEnabled="{Binding Path=TMIsOFFline}" Command="{Binding PumpCommand}"/>
+                        <customControls:PathButton Content="Check Load"        Width="114" Height="28" Margin="5,0,0,0" Visibility="{Binding ElementName=tmRadioButton,Path=IsChecked,Converter={StaticResource bool2VisibilityConverter}}" IsEnabled="{Binding Path=TMIsOFFline}"/>
                         <customControls:PathButton Content="Abort"             Width="110"  Height="28" Margin="5,0,5,0" Command="{Binding AbortCommand}" IsEnabled="{Binding Path=TMIsOFFline}"/>
 
                     </StackPanel>
@@ -638,7 +638,7 @@
                                 </TransformGroup>
                             </Path.RenderTransform>
                         </Path>
-                        <TextBlock  Margin="5,0,0,0" Text="PM Operation" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                        <TextBlock  Margin="5,0,0,0" Text="Door Operation" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_White}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     </StackPanel>
                 </Border>
                 <Border  Grid.Row="1" BorderBrush="{DynamicResource Table_BD}"  BorderThickness="1,0,1,1" >

+ 25 - 33
Venus/Venus_RT/Modules/TM/MFPMPlaceRoutine.cs

@@ -56,27 +56,27 @@ namespace Venus_RT.Modules.TM
             _targetSlot = placeItem.Peek().DestinationSlot;
             _hand = placeItem.Peek().RobotHand;
 
-            //if (ModuleHelper.IsPm(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
-            //{
-            //    _pmModule = Singleton<RouteManager>.Instance.GetPM(_targetModule);
-            //}
-            //else
-            //{
-            //    LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for placing action");
-            //    return RState.Failed;
-            //}
-
-            //if (WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)_hand))
-            //{
-            //    LOG.Write(eEvent.ERR_TM, Module, $"Cannot Place as TM Robot Arm: {_hand} has no wafer");
-            //    return RState.Failed;
-            //}
-
-            //if (WaferManager.Instance.CheckHasWafer(_targetModule, _targetSlot))
-            //{
-            //    LOG.Write(eEvent.ERR_TM, Module, $"Cannot Place as {_targetModule} Slot {_targetSlot} already has a wafer");
-            //    return RState.Failed;
-            //}
+            if (ModuleHelper.IsPm(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
+            {
+                _pmModule = Singleton<RouteManager>.Instance.GetPM(_targetModule);
+            }
+            else
+            {
+                LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for placing action");
+                return RState.Failed;
+            }
+
+            if (WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)_hand))
+            {
+                LOG.Write(eEvent.ERR_TM, Module, $"Cannot Place as TM Robot Arm: {_hand} has no wafer");
+                return RState.Failed;
+            }
+
+            if (WaferManager.Instance.CheckHasWafer(_targetModule, _targetSlot))
+            {
+                LOG.Write(eEvent.ERR_TM, Module, $"Cannot Place as {_targetModule} Slot {_targetSlot} already has a wafer");
+                return RState.Failed;
+            }
 
             var wafer = WaferManager.Instance.GetWafer(ModuleName.TMRobot, (int)_hand);
             LOG.Write(eEvent.INFO_TM_ROBOT, ModuleName.TMRobot, $"{wafer.WaferOrigin} will be move from TM Robot {_hand}  to {_targetModule} {_targetSlot + 1}");
@@ -90,21 +90,13 @@ namespace Venus_RT.Modules.TM
 
         public RState Monitor()
         {
-            //Runner.Wait((int)PlaceStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
-            //    .Run((int)PlaceStep.PMPrepare,      ModulePrepare,          IsModulePrepareReady)
-            //    .Run((int)PlaceStep.ArmExtend,      ArmExtend,              WaitRobotExtendDone)
-            //    .Run((int)PlaceStep.LiftUpWafer,    NotifyPMPlaceWafer,     WaitPMWaferLiftUp)
-            //    .Delay((int)PlaceStep.PlaceDelay,   _placeDelayTime)
-            //    .Run((int)PlaceStep.ArmRetract,     ArmRetract,             WaitRobotRetractDone)
-            //    .End((int)PlaceStep.NotifyDone,     NotifyPMDone,           _delay_50ms);
-            Runner.Wait((int)PlaceStep.WaitPMReady, () => { return true; }, _delay_60s)
-                .Run((int)PlaceStep.PMPrepare, () => { return true; }, () => { return true; })
+            Runner.Wait((int)PlaceStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
+                .Run((int)PlaceStep.PMPrepare, ModulePrepare, IsModulePrepareReady)
                 .Run((int)PlaceStep.ArmExtend, ArmExtend, WaitRobotExtendDone)
-                .Run((int)PlaceStep.LiftUpWafer, () => { return true; }, () => { return true; })
+                .Run((int)PlaceStep.LiftUpWafer, NotifyPMPlaceWafer, WaitPMWaferLiftUp)
                 .Delay((int)PlaceStep.PlaceDelay, _placeDelayTime)
                 .Run((int)PlaceStep.ArmRetract, ArmRetract, WaitRobotRetractDone)
-                .End((int)PlaceStep.NotifyDone, () => { return true; }, _delay_50ms);
-
+                .End((int)PlaceStep.NotifyDone, NotifyPMDone, _delay_50ms);
             return Runner.Status;
         }
 

+ 28 - 35
Venus/Venus_RT/Modules/TM/MFPlaceRoutine.cs

@@ -54,27 +54,27 @@ namespace Venus_RT.Modules.TM
             _targetSlot = placeItem.Peek().DestinationSlot;
             _hand = placeItem.Peek().RobotHand;
 
-            //if (ModuleHelper.IsLoadLock(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
-            //{
-            //    _llModule = Singleton<RouteManager>.Instance.GetLL(_targetModule);
-            //}
-            //else
-            //{
-            //    LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for place action");
-            //    return RState.Failed;
-            //}
-
-            //if (WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)_hand))
-            //{
-            //    LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as TM Robot Arm: {_hand} has no wafer");
-            //    return RState.Failed;
-            //}
-
-            //if (WaferManager.Instance.CheckHasWafer(_targetModule, _targetSlot))
-            //{
-            //    LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as {_targetModule} Slot {_targetSlot} already has a wafer");
-            //    return RState.Failed;
-            //}
+            if (ModuleHelper.IsLoadLock(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
+            {
+                _llModule = Singleton<RouteManager>.Instance.GetLL(_targetModule);
+            }
+            else
+            {
+                LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for place action");
+                return RState.Failed;
+            }
+
+            if (WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)_hand))
+            {
+                LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as TM Robot Arm: {_hand} has no wafer");
+                return RState.Failed;
+            }
+
+            if (WaferManager.Instance.CheckHasWafer(_targetModule, _targetSlot))
+            {
+                LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as {_targetModule} Slot {_targetSlot} already has a wafer");
+                return RState.Failed;
+            }
 
             Reset();
             _placingTimeout = SC.GetValue<int>($"TM.PlaceTimeout") * 1000;
@@ -84,25 +84,18 @@ namespace Venus_RT.Modules.TM
 
         public RState Monitor()
         {
-            //Runner.Wait((int)PlaceStep.WaitModuleReady, () => _llModule.IsIdle, _delay_60s)
-            //    .Run((int)PlaceStep.ModulePrepare, ModulePrepare, IsModulePrepareReady)
-            //    .Run((int)PlaceStep.OpenSlitDoor, OpenSlitDoor, IsSlitDoorOpen)
-            //    .Run((int)PlaceStep.Placing, Placing, WaitPlaceDone)
-            //    .Run((int)PlaceStep.CloseSlitDoor, CloseSlitDoor, IsSlitDoorClosed)
-            //    .End((int)PlaceStep.NotifyDone, NotifyLLDone, _delay_50ms);
-            Runner.Wait((int)PlaceStep.WaitModuleReady, () => true, _delay_60s)
-               .Run((int)PlaceStep.ModulePrepare, () => { return true; }, () => { return true; })
-               .Run((int)PlaceStep.OpenSlitDoor, () => { return true; }, () => { return true; })
-               .Run((int)PlaceStep.Placing, Placing, WaitPlaceDone)
-               .Run((int)PlaceStep.CloseSlitDoor, () => { return true; }, () => { return true; })
-               .End((int)PlaceStep.NotifyDone, () => { return true; },() => { return true; }, _delay_50ms);
-
+            Runner.Wait((int)PlaceStep.WaitModuleReady, () => _llModule.IsIdle, _delay_60s)
+                .Run((int)PlaceStep.ModulePrepare, ModulePrepare, IsModulePrepareReady)
+                .Run((int)PlaceStep.OpenSlitDoor, OpenSlitDoor, IsSlitDoorOpen)
+                .Run((int)PlaceStep.Placing, Placing, WaitPlaceDone)
+                .Run((int)PlaceStep.CloseSlitDoor, CloseSlitDoor, IsSlitDoorClosed)
+                .End((int)PlaceStep.NotifyDone, NotifyLLDone, _delay_50ms);          
             return Runner.Status;
         }
 
         private bool ModulePrepare()
         {
-           // _llModule.PostMsg(LLEntity.MSG.Prepare_TM);
+            _llModule.PostMsg(LLEntity.MSG.Prepare_TM);
             return true;
         }
 

+ 3 - 3
Venus/Venus_Themes/UserControls/MainTM.xaml

@@ -12,10 +12,10 @@
                 <RotateTransform Angle="90"/>
             </Canvas.RenderTransform>-->
 
-            <Polygon Points="28,735 28,263 435,28 843,263 843,735 435,970 28,735" Fill="#FFE5E5E5" StrokeThickness="10" Stroke="Gray">
+            <Polygon Points="28,735 28,263 438,28 843,263 843,735 435,970 28,735" Fill="#FFE5E5E5" StrokeThickness="10" Stroke="Gray">
              
             </Polygon>
-            <Polygon Points="28,735 843,263 843,735 435,970 28,735" Fill="#FFE5E5E5" />
+            <Polygon Points="28,735 843,263 843,735 438,970 28,735" Fill="#FFE5E5E5" />
             <Ellipse  Width="746" Height="746" Canvas.Left="62" Canvas.Top="126">
                 <Ellipse.Fill>
                     <RadialGradientBrush >
@@ -27,7 +27,7 @@
                     </RadialGradientBrush>
                 </Ellipse.Fill>
             </Ellipse>
-            <Polyline Points="28,735 28,263 435,28 843,263 843,735 435,970 28,735" Stroke="#FF000000" StrokeThickness="3" />
+            <Polyline Points="28,735 28,263 438,28 843,263 843,735 435,970 28,735" Stroke="#FF000000" StrokeThickness="3" />
         </Canvas>
     </Viewbox>