Browse Source

revise robot cycle routine

chenzk 3 weeks ago
parent
commit
20ecea3b8f

+ 3 - 0
CyberX8_MainPages/ViewModels/EfemViewModel.cs

@@ -1197,6 +1197,9 @@ namespace CyberX8_MainPages.ViewModels
             m_RtDataKeys.Add("LP2.CassettePlaced");
             m_RtDataKeys.Add("LP3.CassettePlaced");
 
+            m_RtDataKeys.Add("Dummy1.CassettePlaced");
+            m_RtDataKeys.Add("Dummy2.CassettePlaced");
+
             m_RtDataKeys.Add("PUF1.IsInRobotStation");
             m_RtDataKeys.Add("PUF2.IsInRobotStation");
 

+ 3 - 1
CyberX8_MainPages/ViewModels/OperationOverViewModel.cs

@@ -1403,7 +1403,9 @@ namespace CyberX8_MainPages.ViewModels
             m_RtDataKeys.Add("LP3.CurrentControlJob");
             m_RtDataKeys.Add("LP1.WaferSize");
             m_RtDataKeys.Add("LP2.WaferSize");
-            m_RtDataKeys.Add("LP3.WaferSize");
+            m_RtDataKeys.Add("LP3.WaferSize"); 
+            m_RtDataKeys.Add("Dummy1.CassettePlaced"); 
+            m_RtDataKeys.Add("Dummy2.CassettePlaced"); 
 
 
             m_RtDataKeys.Add("System.IsAutoMode");

+ 11 - 1
CyberX8_MainPages/ViewModels/RobotCycleViewModel.cs

@@ -41,6 +41,10 @@ namespace CyberX8_MainPages.ViewModels
         /// </summary>
         private int _inPutCycleTimes = 1;
         /// <summary>
+        /// Align调整角度度数
+        /// </summary>
+        private int _inPutAlignDegree = 0;
+        /// <summary>
         /// 当前正在执行第几次Cycle
         /// </summary>
         private int _currentCycle;
@@ -99,6 +103,12 @@ namespace CyberX8_MainPages.ViewModels
             get { return _currentCycle; }
             set { SetProperty(ref _currentCycle, value); }
         }
+        public int InPutAlignDegree
+        {
+            get { return _inPutAlignDegree; }
+            set { SetProperty(ref _inPutAlignDegree, value); }
+        }
+
         public bool IsDummySelected
         {
             get { return _isDummySelected; }
@@ -154,7 +164,7 @@ namespace CyberX8_MainPages.ViewModels
                 MessageBox.Show("Selected at least on module between srd and dummy!");
                 return;
             }
-            InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.RobotCycle}",SelectedLPName, SelectedAlignerName,SelectedDummyName, SelectedSrdName, InPutCycleTimes);
+            InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.RobotCycle}",SelectedLPName, SelectedAlignerName,SelectedDummyName, SelectedSrdName, InPutCycleTimes, InPutAlignDegree);
         }
         private void RobotCycleAbortAction(object param)
         {

+ 18 - 8
CyberX8_MainPages/Views/EfemView.xaml

@@ -34,22 +34,32 @@
             </StackPanel>
         </Border>
 
-        <userControls:FOUPFrontView UnitData="{Binding LP1ModuleInfo}"  Canvas.Top="70" Canvas.Left="20"/>
+        <userControls:FOUPFrontView UnitData="{Binding LP1ModuleInfo}"
+                                    IsCassettePlaced="{Binding RtDataValues[LP1.CassettePlaced]}"
+                                    Canvas.Top="70" Canvas.Left="20"/>
         <TextBlock Text="LP1" Canvas.Top="470" Canvas.Left="70" FontSize="12"></TextBlock>
-        <userControls:FOUPFrontView UnitData="{Binding LP2ModuleInfo}"  Canvas.Top="70" Canvas.Left="160"/>
+        <userControls:FOUPFrontView UnitData="{Binding LP2ModuleInfo}"
+                                    IsCassettePlaced="{Binding RtDataValues[LP2.CassettePlaced]}"
+                                    Canvas.Top="70" Canvas.Left="160"/>
         <TextBlock Text="LP2" Canvas.Top="470" Canvas.Left="210" FontSize="12"></TextBlock>
-        <userControls:FOUPFrontView UnitData="{Binding LP3ModuleInfo}"  Canvas.Top="70" Canvas.Left="300"/>
+        <userControls:FOUPFrontView UnitData="{Binding LP3ModuleInfo}"
+                                    IsCassettePlaced="{Binding RtDataValues[LP3.CassettePlaced]}"
+                                    Canvas.Top="70" Canvas.Left="300"/>
         <TextBlock Text="LP3" Canvas.Top="470" Canvas.Left="350" FontSize="12"></TextBlock>
 
 
         <StackPanel Canvas.Top="15" Canvas.Left="1700">
-            <userControls:FOUPFrontView UnitData="{Binding Dummy2ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+            <userControls:FOUPFrontView UnitData="{Binding Dummy2ModuleInfo}"
+                                        IsCassettePlaced="{Binding RtDataValues[Dummy2.CassettePlaced]}"
+                                        ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
             <TextBlock Text="Dummy2" HorizontalAlignment="Center" Margin="0,5,0,20" FontSize="12">
             </TextBlock>
         
         </StackPanel>
         <StackPanel Canvas.Top="15" Canvas.Left="1550">
-            <userControls:FOUPFrontView UnitData="{Binding Dummy1ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+            <userControls:FOUPFrontView UnitData="{Binding Dummy1ModuleInfo}"
+                                        IsCassettePlaced="{Binding RtDataValues[Dummy1.CassettePlaced]}"
+                                        ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
             <TextBlock Text="Dummy1" HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="12">
             </TextBlock>
         </StackPanel>
@@ -62,21 +72,21 @@
                 <Rectangle  Width="70" Height="70" Fill="Silver"  Opacity="0.8" RadiusX="0.1" RadiusY="0.1"
                             />
             </Grid>
-            <TextBlock Canvas.Top="485" Canvas.Left="450" Text="{Binding RtDataValues[LP1.WaferSize]}" Visibility="{Binding RtDataValues[LP1.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
+            <TextBlock Canvas.Top="485" Canvas.Left="430" Text="{Binding RtDataValues[LP1.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP1.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
                        HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
             <Grid Canvas.Left="499" Canvas.Top="538" Panel.ZIndex="2" Visibility="{Binding IsLP2Unable,Converter={StaticResource bool2VisibilityConverter}}">
                 <Rectangle  Width="70" Height="70" Fill="Silver"  Opacity="0.8" RadiusX="0.1" RadiusY="0.1"
                 />
             </Grid>
-            <TextBlock Canvas.Top="580" Canvas.Left="450" Text="{Binding RtDataValues[LP2.WaferSize]}" Visibility="{Binding RtDataValues[LP2.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
+            <TextBlock Canvas.Top="580" Canvas.Left="430" Text="{Binding RtDataValues[LP2.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP2.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
                        HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
             <Grid Canvas.Left="499" Canvas.Top="635" Panel.ZIndex="2" Visibility="{Binding IsLP3Unable,Converter={StaticResource bool2VisibilityConverter}}">
                 <Rectangle  Width="70" Height="70" Fill="Silver"  Opacity="0.8" RadiusX="0.1" RadiusY="0.1"
                                 />
             </Grid>
-            <TextBlock Canvas.Top="680" Canvas.Left="450" Text="{Binding RtDataValues[LP3.WaferSize]}" Visibility="{Binding RtDataValues[LP3.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
+            <TextBlock Canvas.Top="680" Canvas.Left="430" Text="{Binding RtDataValues[LP3.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP3.CassettePlaced], Converter={StaticResource BoolToVisibility2}}"
                        HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
             <Viewbox Width="890" Height="890" Canvas.Top="5" Canvas.Left="297" Stretch="Fill">

+ 18 - 8
CyberX8_MainPages/Views/OperationOverView.xaml

@@ -65,13 +65,13 @@
                 <Rectangle  Width="70" Height="70" Fill="Silver"  Opacity="0.8" RadiusX="0.1" RadiusY="0.1"
                          />
             </Grid>
-            <TextBlock Canvas.Top="220" Canvas.Left="70" Text="{Binding RtDataValues[LP1.WaferSize]}" Visibility="{Binding RtDataValues[LP1.CassettePlaced], Converter={StaticResource boolToVisibility2}}"
+            <TextBlock Canvas.Top="220" Canvas.Left="50" Text="{Binding RtDataValues[LP1.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP1.CassettePlaced], Converter={StaticResource boolToVisibility2}}"
     HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
-            <TextBlock Canvas.Top="320" Canvas.Left="70" Text="{Binding RtDataValues[LP2.WaferSize]}" Visibility="{Binding RtDataValues[LP2.CassettePlaced], Converter={StaticResource boolToVisibility2}}"
+            <TextBlock Canvas.Top="320" Canvas.Left="50" Text="{Binding RtDataValues[LP2.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP2.CassettePlaced], Converter={StaticResource boolToVisibility2}}"
     HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
-            <TextBlock Canvas.Top="420" Canvas.Left="70" Text="{Binding RtDataValues[LP3.WaferSize]}" Visibility="{Binding RtDataValues[LP3.CassettePlaced], Converter={StaticResource boolToVisibility2}}"
+            <TextBlock Canvas.Top="420" Canvas.Left="50" Text="{Binding RtDataValues[LP3.WaferSize], StringFormat=({0})}" Visibility="{Binding RtDataValues[LP3.CassettePlaced], Converter={StaticResource boolToVisibility2}}"
                HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="16">
             </TextBlock>
             <Canvas Canvas.Left="280">
@@ -98,7 +98,9 @@
                             <StackPanel>
                                 <TextBox Background="{DynamicResource Table_BG_Title}"  Text="LP1" Width="Auto" Height="15" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" 
                                      IsReadOnly="True" FontSize="10"/>
-                                <ctrls:FOUPFrontView UnitData="{Binding LP1ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}" />
+                                <ctrls:FOUPFrontView UnitData="{Binding LP1ModuleInfo}"
+                                                     IsCassettePlaced="{Binding RtDataValues[LP1.CassettePlaced]}"
+                                                     ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}" />
 
                                 <TextBlock  HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="12">
                                     <TextBlock.Text>
@@ -118,7 +120,9 @@
                             <StackPanel>
                                 <TextBox Background="{DynamicResource Table_BG_Title}" Text="LP2" Width="Auto" Height="15" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                      IsReadOnly="True" FontSize="10"/>
-                                <ctrls:FOUPFrontView UnitData="{Binding LP2ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+                                <ctrls:FOUPFrontView UnitData="{Binding LP2ModuleInfo}" 
+                                                     IsCassettePlaced="{Binding RtDataValues[LP2.CassettePlaced]}"
+                                                     ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
                                 <TextBlock  HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="12">
                                     <TextBlock.Text>
                                         <MultiBinding StringFormat="{}Wafer Count:{0}">
@@ -138,7 +142,9 @@
                             <StackPanel>
                                 <TextBox Background="{DynamicResource Table_BG_Title}" Text="LP3" Width="Auto" Height="15" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                      IsReadOnly="True" FontSize="10"/>
-                                <ctrls:FOUPFrontView UnitData="{Binding LP3ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+                                <ctrls:FOUPFrontView UnitData="{Binding LP3ModuleInfo}" 
+                                                     IsCassettePlaced="{Binding RtDataValues[LP3.CassettePlaced]}"
+                                                     ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
                                 <TextBlock  HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="12">
                                     <TextBlock.Text>
                                         <MultiBinding StringFormat="{}Wafer Count:{0}">
@@ -157,7 +163,9 @@
                             <StackPanel>
                                 <TextBox Background="{DynamicResource Table_BG_Title}" Text="Dummy1" Width="Auto" Height="15" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                      IsReadOnly="True" FontSize="10"/>
-                                <ctrls:FOUPFrontView UnitData="{Binding Dummy1ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+                                <ctrls:FOUPFrontView UnitData="{Binding Dummy1ModuleInfo}" 
+                                                     IsCassettePlaced="{Binding RtDataValues[Dummy1.CassettePlaced]}"
+                                                     ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
                                 <TextBlock  HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="12">
                                     <TextBlock.Text>
                                         <MultiBinding StringFormat="{}Wafer Count:{0}">
@@ -169,7 +177,9 @@
                             <StackPanel>
                                 <TextBox Background="{DynamicResource Table_BG_Title}" Text="Dummy2" Width="Auto" Height="15" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                      IsReadOnly="True" FontSize="10"/>
-                                <ctrls:FOUPFrontView UnitData="{Binding Dummy2ModuleInfo}" ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+                                <ctrls:FOUPFrontView UnitData="{Binding Dummy2ModuleInfo}"
+                                                     IsCassettePlaced="{Binding RtDataValues[Dummy2.CassettePlaced]}"
+                                                     ShowTitle="False" IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
                                 <TextBlock  HorizontalAlignment="Center" Margin="0,5,0,0" FontSize="12">
                                     <TextBlock.Text>
                                         <MultiBinding StringFormat="{}Wafer Count:{0}">

+ 12 - 9
CyberX8_MainPages/Views/RobotCycleView.xaml

@@ -54,9 +54,12 @@
                     </RadioButton>
                 </Grid>
             </GroupBox>
+            <TextBlock  Grid.Row="1" Grid.Column="0" Text="Degree:" FontSize="19" VerticalAlignment="Center" Margin="30,10,0,0"/>
+            <TextBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Height="35" Width="70" FontSize="15" HorizontalAlignment="Center"  Margin="0,10,30,0" Background="White" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  Text="{Binding InPutAlignDegree,Mode=TwoWay}" />
+
             <GroupBox Header="Aligner Select" FontSize="14" FontWeight="Bold"  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
                 <Grid>
-                    <RadioButton Content="Aligner1"  x:Name="aligner" IsChecked="True" Margin="52,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Left">
+                    <RadioButton Content="Aligner1"  x:Name="aligner" IsChecked="True" Margin="215,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Left">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding AlignerChangeCommand}" CommandParameter="{Binding ElementName=aligner,Path=Content}"/>
@@ -66,16 +69,16 @@
                 </Grid>
             </GroupBox>
 
-            <GroupBox Header="Dummy Select" FontSize="14" FontWeight="Bold"  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" IsEnabled="{Binding IsDummySelected}">
+            <GroupBox Header="Dummy Select" FontSize="14" FontWeight="Bold"  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" IsEnabled="{Binding IsDummySelected}">
                 <Grid>
-                    <RadioButton  Content="Dummy1"  x:Name="dummy1" IsChecked="True" Margin="52,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Left">
+                    <RadioButton  Content="Dummy1"  x:Name="dummy1" IsChecked="True" Margin="215,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Left">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding DummyChangeCommand}" CommandParameter="{Binding ElementName=dummy1,Path=Content}"/>
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton  Content="Dummy2"  x:Name="dummy2" IsChecked="False" Margin="132,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Center">
+                    <RadioButton  Content="Dummy2"  x:Name="dummy2" IsChecked="False" Margin="300,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Center">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding DummyChangeCommand}" CommandParameter="{Binding ElementName=dummy2,Path=Content}"/>
@@ -84,18 +87,18 @@
                     </RadioButton>
                 </Grid>
             </GroupBox>
-            <CheckBox Grid.Row="2" Grid.Column="2" Margin="0,12,0,0"  VerticalAlignment="Center" HorizontalAlignment="Left" Content="DummySelect"  FontSize="16" FontWeight="Bold" 
+            <CheckBox Grid.Row="2" Grid.Column="0" Margin="30,12,0,0"  VerticalAlignment="Center" HorizontalAlignment="Left" Content="DummySelect"  FontSize="16" FontWeight="Bold" 
                IsChecked="{Binding IsDummySelected,Mode=TwoWay}"/>
-            <GroupBox Header="SRD Select" FontSize="14" FontWeight="Bold"  Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" IsEnabled="{Binding IsSrdSelected}">
+            <GroupBox Header="SRD Select" FontSize="14" FontWeight="Bold"  Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" IsEnabled="{Binding IsSrdSelected}">
                 <Grid>
-                    <RadioButton  Content="SRD1"  x:Name="srd1" IsChecked="True" Margin="52,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Left">
+                    <RadioButton  Content="SRD1"  x:Name="srd1" IsChecked="True" Margin="215,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Left">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SrdChangeCommand}" CommandParameter="{Binding ElementName=srd1,Path=Content}"/>
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton  Content="SRD2"  x:Name="srd2" IsChecked="False" Margin="92,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Center">
+                    <RadioButton  Content="SRD2"  x:Name="srd2" IsChecked="False" Margin="265,0,0,0" FontSize="19" VerticalContentAlignment="Center" HorizontalAlignment="Center">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SrdChangeCommand}" CommandParameter="{Binding ElementName=srd2,Path=Content}"/>
@@ -104,7 +107,7 @@
                     </RadioButton>
                 </Grid>
             </GroupBox>
-            <CheckBox Grid.Row="3" Grid.Column="2" Margin="0,12,0,0"  VerticalAlignment="Center" HorizontalAlignment="Left" Content="SrdSelect"  FontSize="16" FontWeight="Bold" 
+            <CheckBox Grid.Row="3" Grid.Column="0" Margin="30,12,0,0"  VerticalAlignment="Center" HorizontalAlignment="Left" Content="SrdSelect"  FontSize="16" FontWeight="Bold" 
                 IsChecked="{Binding IsSrdSelected,Mode=TwoWay}"/>
             <TextBlock  Grid.Row="4" Grid.Column="0" Text="Cycle :" FontSize="19" VerticalAlignment="Center" Margin="58,0,0,0"/>
             <TextBox Grid.Row="4" Grid.Column="1" Height="35" Width="80" FontSize="15" HorizontalAlignment="Left"  Margin="0,0,0,0" Background="White" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  Text="{Binding InPutCycleTimes,Mode=TwoWay}" />

+ 3 - 0
CyberX8_RT/Devices/EFEM/DummyDevice.cs

@@ -1,4 +1,6 @@
 using Aitex.Core.Common;
+using Aitex.Core.RT.DataCenter;
+using Aitex.Core.Util;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.IOCore;
 using System;
@@ -58,6 +60,7 @@ namespace CyberX8_RT.Devices.EFEM
         {
             _module = moduleName;
             SubscribeValueAction();
+            DATA.Subscribe($"{_module}.CassettePlaced", () => _hasCassete, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
 
         /// <summary>

+ 2 - 2
CyberX8_RT/Devices/EFEM/SunWayRobot.cs

@@ -791,14 +791,14 @@ namespace CyberX8_RT.Devices.EFEM
             {
                 return;
             }
-            if(msg.StartsWith("_ERR"))
+            if(msg.StartsWith("_ERR\r"))
             {
                 string error = msg.Replace("_ERR", "").Trim();
                 OnErrorOccurred(error);
                 _currentMessage = null;
                 return;
             }
-            else if(msg.StartsWith("_RDY"))
+            else if(msg.StartsWith("_RDY\r"))
             {
                 _status = RState.End;
                 switch (_currentMessage.Operation)

+ 2 - 2
CyberX8_RT/Modules/EFEM/CycleRobotCycleRoutine.cs

@@ -45,7 +45,7 @@ namespace CyberX8_RT.Modules.EFEM
         {
             param = objs;
             _currentCycle = 1;//初始化当前Cycle次数
-            if (objs.Length >= 5)
+            if (objs.Length >= 6)
             {
                 _cycleTimes = (int)objs[4];
                 if (_cycleTimes < 1)
@@ -60,7 +60,7 @@ namespace CyberX8_RT.Modules.EFEM
         public RState Monitor()
         {
             Runner.LoopStart(CycleRobotCycleStep.LoopStart, "Loop StartCycleRobotCycleRoutine", _cycleTimes, NullFun, _delay_1ms)
-                .LoopRun(CycleRobotCycleStep.LoopRunRobotCycle, () => _robotCycleRoutine.Start(param) == RState.Running, _delay_1ms)
+                .LoopRun(CycleRobotCycleStep.LoopRunRobotCycle, () => _robotCycleRoutine.Start(param) == RState.Running,_delay_1ms)
                 .LoopRunWithStopStatus(CycleRobotCycleStep.LoopRunRobotCycleWait, () => { return CommonFunction.CheckRoutineEndState(_robotCycleRoutine); },
                  () => CheckRoutineStopStatus(_robotCycleRoutine, "CycleRobotCycleRoutine failed"))
                 .LoopEnd(CycleRobotCycleStep.LoopEnd, UpdateCycleCount, _delay_1ms)

+ 23 - 6
CyberX8_RT/Modules/EFEM/RobotCycleRoutine.cs

@@ -33,6 +33,9 @@ namespace CyberX8_RT.Modules.EFEM
             PlaceToAligner,
             PlaceToAlignerCheck,
 
+            AlignAction,
+            AlignCompleteCheck,
+
             PickFromAligner,
             PickFromAlignerCheck,
 
@@ -64,6 +67,7 @@ namespace CyberX8_RT.Modules.EFEM
 
         private EfemPickRoutine _efemPickRoutine;
         private EfemPlaceRoutine _efemPlaceRoutine;
+        private EFEMAlignRoutine _efemAlignRoutine;
 
         private ModuleName _targetLP;
         private ModuleName _targetAligner;
@@ -81,12 +85,14 @@ namespace CyberX8_RT.Modules.EFEM
      
         private int _moveTimeout = 20 * 1000;
         private int _dummySlotNumber = 0;
+        private object[] alignerParamater;
 
         public RobotCycleRoutine(EfemBase efem) : base(ModuleName.EfemRobot)
         {
             _efem = efem;
             _efemPickRoutine = new EfemPickRoutine(efem);
             _efemPlaceRoutine = new EfemPlaceRoutine(efem);
+            _efemAlignRoutine = new EFEMAlignRoutine(efem);
 
         }
 
@@ -94,12 +100,18 @@ namespace CyberX8_RT.Modules.EFEM
         {
             _lpWaferIndex.Clear();//初始化LP 有wafer的slot号
             _waferCount = 0; //初始化wafercount的数量
-            if (objs.Length >= 5)
+            
+            alignerParamater = new object[3];//初始化Align参数
+            alignerParamater[0] = ModuleName.Aligner1;
+            alignerParamater[1] = 0;
+            
+            if (objs.Length >= 6)
             {
                 _targetLP = (ModuleName)objs[0];
                 _targetAligner = (ModuleName)objs[1];
                 _targetDummy = (ModuleName)objs[2];
                 _targetSrd = (ModuleName)objs[3];
+                alignerParamater[2] = (int)objs[5];
             }
             else
             {
@@ -185,6 +197,10 @@ namespace CyberX8_RT.Modules.EFEM
                 .LoopRunWithStopStatus(RobotCycleStep.PlaceToAlignerCheck, () => { return CommonFunction.CheckRoutineEndState(_efemPlaceRoutine); },
                  () => CheckRoutineStopStatus(_efemPlaceRoutine, "Efem place to aligner failed"))
 
+                .LoopRun(RobotCycleStep.AlignAction, () => { return _efemAlignRoutine.Start(alignerParamater) == RState.Running; }, _delay_1ms)
+                .LoopRunWithStopStatus(RobotCycleStep.AlignCompleteCheck, () => { return CommonFunction.CheckRoutineEndState(_efemAlignRoutine); },
+                 () => CheckRoutineStopStatus(_efemAlignRoutine, "Efem aligner Action failed"))
+
                 .LoopRun(RobotCycleStep.PickFromAligner, () => { return _efemPickRoutine.Start(_alignerToDummyMoveItem) == RState.Running; }, _delay_1ms)
                 .LoopRunWithStopStatus(RobotCycleStep.PickFromAlignerCheck, () => { return CommonFunction.CheckRoutineEndState(_efemPickRoutine); },
                  () => CheckRoutineStopStatus(_efemPickRoutine, "Efem pick from aligner failed"))
@@ -253,11 +269,6 @@ namespace CyberX8_RT.Modules.EFEM
                     Stop($"{_targetLP} is null");
                     return false;
                 }
-                if (!loadPort.IsLoaded)
-                {
-                    Stop($"{_targetLP} is not load");
-                    return false;
-                }
                 WaferInfo[] waferInfos = WaferManager.Instance.GetWafers(_targetLP);
                 for (int i = 0; i < waferInfos.Length; i++)
                 {
@@ -274,6 +285,11 @@ namespace CyberX8_RT.Modules.EFEM
                 }
 
             }
+            else if(ModuleHelper.IsLoadPort(_targetLP) && !ModuleHelper.IsInstalled(_targetLP))
+            {
+                Stop($"{_targetLP} is not installed");
+                return false;
+            }
             //Aligner状态判断
             //if (!ModuleHelper.IsInstalled(_targetAligner))
             //{
@@ -293,6 +309,7 @@ namespace CyberX8_RT.Modules.EFEM
                 if (!dummyDevice.HasCassette)
                 {
                     Stop($"{_targetDummy} dose not have cassette");
+                    return false;
                 }
                 WaferInfo[] waferInfos = WaferManager.Instance.GetWafers(_targetDummy);
                 if(waferInfos.Length > 0)

+ 7 - 3
CyberX8_Simulator/Devices/SunWayEfemSimulator.cs

@@ -208,13 +208,17 @@ namespace CyberX8_Simulator.Devices
             }
             else //默认回复
             {
-                if (str.StartsWith("PICK") || str.StartsWith("PLACE") || str.StartsWith("MAP"))
+                if (str.StartsWith("PICK") || str.StartsWith("PLACE") || str.StartsWith("MAP") || str.StartsWith("ALIGNER ALGN") || str.StartsWith("ALIGNER HOME"))
                 {
-                    Thread.Sleep((ushort)3000);
+                    Thread.Sleep((ushort)2200);
                 }
-                ack = str + "\n_RDY"; ;
+                ack = "_RDY";
             }
             OnWriteMessage(ack);
+            //if (str.StartsWith("PICK") || str.StartsWith("PLACE") || str.StartsWith("MAP") || str.StartsWith("ALIGNER ALGN") || str.StartsWith("ALIGNER HOME"))
+            //{
+            //    Thread.Sleep((ushort)2200);
+            //}
             //if (strACK.StartsWith("PICK") || strACK.StartsWith("PLACE") || strACK.StartsWith("MAP"))
             //{
             //    Thread.Sleep((ushort)3000);

+ 1 - 1
CyberX8_Themes/UserControls/FOUPFrontView.xaml

@@ -78,7 +78,7 @@
             <StackPanel.Style>
                 <Style>
                     <Style.Triggers>
-                        <DataTrigger Binding="{Binding UnitData.IsInstalled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="False">
+                        <DataTrigger Binding="{Binding IsCassettePlaced, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="False">
                             <Setter  Property ="StackPanel.Visibility" Value="Collapsed"></Setter>
                         </DataTrigger>
                     </Style.Triggers>

+ 8 - 0
CyberX8_Themes/UserControls/FOUPFrontView.xaml.cs

@@ -43,6 +43,14 @@ namespace CyberX8_Themes.UserControls
         }
         public static readonly DependencyProperty SlotWidthProperty =
             DependencyProperty.Register("SlotWidth", typeof(int), typeof(FOUPFrontView), new PropertyMetadata(90));
+        
+        public bool IsCassettePlaced
+        {
+            get { return (bool)GetValue(IsCassettePlacedProperty); }
+            set { SetValue(IsCassettePlacedProperty, value); }
+        }
+        public static readonly DependencyProperty IsCassettePlacedProperty =
+            DependencyProperty.Register("IsCassettePlaced", typeof(bool), typeof(FOUPFrontView), new UIPropertyMetadata(false));
         #endregion
 
         private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)