浏览代码

1.Add new module station number
2.Add robot cycle destination

chenzk 3 周之前
父节点
当前提交
8c6fa5e5e3

+ 43 - 4
PunkHPX8_MainPages/ViewModels/RobotCycleViewModel.cs

@@ -15,6 +15,7 @@ using PunkHPX8_MainPages.Views;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.ComponentModel;
 using System.Linq;
 using System.Reflection;
 using System.Text;
@@ -87,14 +88,27 @@ namespace PunkHPX8_MainPages.ViewModels
 
         #endregion
 
-        public class PositionItem
+        public class PositionItem : INotifyPropertyChanged
         {
+            private string _destination;
             public string ModuleType { get; set; }
             public ModuleName ModuleName { get; set; }
             public string Parameter { get; set; }
             public Hand RobotHand { get; set; }
             public Flip PickRobotFlip { get; set; }
             public Flip PlaceRobotFlip { get; set; }
+            public string Destination {
+                get => _destination;
+                set
+                {
+                    _destination = value;
+                    OnPropertyChanged(nameof(Destination)); // 触发通知
+                }
+            }
+
+            public event PropertyChangedEventHandler PropertyChanged;
+            protected void OnPropertyChanged(string propertyName)
+                => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
 
         private ObservableCollection<PositionItem> _positions = new ObservableCollection<PositionItem>();
@@ -169,6 +183,8 @@ namespace PunkHPX8_MainPages.ViewModels
 
         #region 命令
 
+        public ICommand RobotCycleConfirmCommand { get; set; }
+        
         public ICommand RobotCycleStartCommand { get; set; }
 
         public ICommand RobotCycleAbortCommand { get; set; }
@@ -186,6 +202,7 @@ namespace PunkHPX8_MainPages.ViewModels
         /// </summary>
         public RobotCycleViewModel()
         {
+            RobotCycleConfirmCommand = new DelegateCommand<object>(RobotCycleConfirmAction);
             RobotCycleStartCommand = new DelegateCommand<object>(RobotCycleStartAction);
             RobotCycleAbortCommand = new DelegateCommand<object>(RobotCycleAbortAction);
 
@@ -296,9 +313,31 @@ namespace PunkHPX8_MainPages.ViewModels
                 Positions.Remove(item);
             }
         }
-
-
-
+        private void RobotCycleConfirmAction(object param)
+        {
+            if(Positions.Count == 0)
+            {
+                return;
+            }
+            else if (Positions.Count == 1) 
+            {
+                Positions[0].Destination = Positions[0].ModuleName.ToString();
+            }
+            else
+            {
+                for (int i = 0; i < Positions.Count; i++)
+                {
+                    if(i < Positions.Count - 1)
+                    {
+                        Positions[i].Destination = Positions[i + 1].ModuleName.ToString();
+                    }
+                    else
+                    {
+                        Positions[i].Destination = Positions[0].ModuleName.ToString();
+                    }  
+                }
+            }      
+        }
         private void RobotCycleStartAction(object param)
         {
             List<RobotCycleParameter> parameters = new List<RobotCycleParameter>();

+ 3 - 0
PunkHPX8_MainPages/Views/RobotCycleView.xaml

@@ -31,6 +31,7 @@
                             <GridViewColumn Header="RobotHand" Width="120" DisplayMemberBinding="{Binding RobotHand}"/>
                             <GridViewColumn Header="PickDirection" Width="120" DisplayMemberBinding="{Binding PickRobotFlip}"/>
                             <GridViewColumn Header="PlaceDirection" Width="120" DisplayMemberBinding="{Binding PlaceRobotFlip}"/>
+                            <GridViewColumn Header="Destination" Width="120" DisplayMemberBinding="{Binding Destination}"/>
                             <!-- 新增的操作按钮列 -->
                             <GridViewColumn Header="Operation" Width="220">
                                 <GridViewColumn.CellTemplate>
@@ -112,6 +113,8 @@
 
             <!-- 控制按钮 -->
             <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
+                <Button Content="Confirm" Width="80" Height="30" Margin="5" 
+                        Command="{Binding RobotCycleConfirmCommand}"/>
                 <Button Content="Start" Width="80" Height="30" Margin="5" 
                     Command="{Binding RobotCycleStartCommand}"/>
                 <Button Content="Abort" Width="80" Height="30" Margin="5" 

+ 0 - 1
PunkHPX8_RT/Config/Devices/Beckhoffcfg - plctask.xml

@@ -140,7 +140,6 @@
 		<Input Name="r_Cassette_B_100MM" Address="MAIN.Facility_DI_16CHANNEL_EL1819_N000_15" Invert="false" Type="Digital" DataType="bool"/>
 		<Input Name="r_Cassette_B_200MM" Address="MAIN.Facility_DI_16CHANNEL_EL1819_N000_16" Invert="false" Type="Digital" DataType="bool"/>
 		
-		<Input Name="r_Dummy_1_200" Address="MAIN.Facility_DI_16CHANNEL_EL1819_N000_160" Invert="false" Type="Digital" DataType="bool"/>
 		<!--EFEM End-->
 		<!--////////////////////////////////////////////////// ALL INPUTS END //////////////////////////////////////////////////-->
 

+ 57 - 43
PunkHPX8_RT/Config/System.sccfg

@@ -68,7 +68,8 @@
 		<config default="127.0.0.1:1102" name="IPAddress" nameView="IP Address" description="EFEM IP、端口设置;default 10.0.0.100:1102" max="" min="" paramter="" tag="" unit="" type="String" />
 		<config default="true" name="CheckSideDoorOnEAPMap" nameView="CheckSideDoorOnEAPMap" description="在自动跑货的时候检查侧门是否关闭" max="" min="" paramter="" tag="" unit="" type="Bool" visible="true"/>
 		<config default="true" name="CheckCassetteDoorOnEAPMap" nameView="CheckCassetteDoorOnEAPMap" description="在自动跑货的时候检查EFEM正门是否关闭" max="" min="" paramter="" tag="" unit="" type="Bool" visible="true"/>
-		
+		<config default="200" name="Dummy1WaferSize" nameView="Dummy1WaferSize" description="Dummy1WaferSize" max="300" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
+		<config default="200" name="Dummy2WaferSize" nameView="Dummy2WaferSize" description="Dummy2WaferSize" max="300" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
 		<config default="15" name="DefaultMoveSpeedInPercent" nameView="DefaultMoveSpeed InPercent" description="机械臂初始速度" max="100" min="1" paramter="" tag="" unit="" type="Integer" />
 		<config default="5" name="DefaultHomeSpeedInPercent" nameView="DefaultHomeSpeed InPercent" description="机械臂Home速度" max="100" min="1" paramter="" tag="" unit="" type="Integer" />
 
@@ -92,74 +93,87 @@
 
 		</configs>
 		<configs name="LP1" nameView="LP1" visible="false">
-			<config default="50" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="51" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="52" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="50" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="51" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="52" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="LP2" nameView="LP2" visible="false">
-			<config default="53" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="54" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="55" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="53" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="54" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="55" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="LP3" nameView="LP3" visible="false">
-			<config default="56" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="57" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="58" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="56" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="57" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="58" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="Dummy1" nameView="Dummy1" visible="false">
-			<config default="64" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="65" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="66" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="1" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="65" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="66" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="Dummy2" nameView="Dummy2" visible="false">
-			<config default="62" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="63" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="64" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="62" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="63" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="64" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+		    <config default="200" name="WaferSize" nameView="WaferSize" description="DummyWaferSize" max="300" min="0" paramter="" tag="" unit="" type="Integer" visible="true"/>
 		</configs>
 		<configs name="SRD1" nameView="SRD1" visible="false">
-			<config default="6" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="6" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="6" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="6" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="6" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="6" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="SRD2" nameView="SRD2" visible="false">
-			<config default="7" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="7" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="7" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="7" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="7" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="7" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="VPW1" nameView="VPW1">
-			<config default="67" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="68" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="69" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="12" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="112" name="Cassete200Station_Blade2_Upper" nameView="Cassete200Station_Blade2_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="113" name="Cassete200Station_Blade2_Down" nameView="Cassete200Station_Blade2_Down" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="168" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="169" name="Cassete150Station_Blade2_Upper" nameView="Cassete150Station_Blade2_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="170" name="Cassete150Station_Blade2_Down" nameView="Cassete150Station_Blade2_Down" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="69" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="69" name="Cassete100Station_Blade2_Upper" nameView="Cassete100Station_Blade2_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="69" name="Cassete100Station_Blade2_Down" nameView="Cassete100Station_Blade2_Down" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="VPW2" nameView="VPW2">
-			<config default="70" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="71" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="72" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="12" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="112" name="Cassete200Station_Blade2_Upper" nameView="Cassete200Station_Blade2_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="113" name="Cassete200Station_Blade2_Down" nameView="Cassete200Station_Blade2_Down" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="168" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="169" name="Cassete150Station_Blade2_Upper" nameView="Cassete150Station_Blade2_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="170" name="Cassete150Station_Blade2_Down" nameView="Cassete150Station_Blade2_Down" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="69" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="69" name="Cassete100Station_Blade2_Upper" nameView="Cassete100Station_Blade2_Upper" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="69" name="Cassete100Station_Blade2_Down" nameView="Cassete100Station_Blade2_Down" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="PlatingCell1" nameView="PlatingCell1" >
-			<config default="73" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="74" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="75" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="73" name="Cassete200Station_Blade2_Down" nameView="Cassete200Station_Blade2_Down" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="74" name="Cassete150Station_Blade2_Down" nameView="Cassete150Station_Blade2_Down" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="75" name="Cassete100Station_Blade2_Down" nameView="Cassete100Station_Blade2_Down" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="PlatingCell2" nameView="PlatingCell2">
-			<config default="76" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="77" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="78" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="73" name="Cassete200Station_Blade2_Down" nameView="Cassete200Station_Blade2_Down" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="74" name="Cassete150Station_Blade2_Down" nameView="Cassete150Station_Blade2_Down" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="75" name="Cassete100Station_Blade2_Down" nameView="Cassete100Station_Blade2_Down" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="PlatingCell3" nameView="PlatingCell3">
-			<config default="79" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="80" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="81" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="73" name="Cassete200Station_Blade2_Down" nameView="Cassete200Station_Blade2_Down" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="74" name="Cassete150Station_Blade2_Down" nameView="Cassete150Station_Blade2_Down" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="75" name="Cassete100Station_Blade2_Down" nameView="Cassete100Station_Blade2_Down" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="PlatingCell4" nameView="PlatingCell4">
-			<config default="82" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="83" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="84" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="73" name="Cassete200Station_Blade2_Down" nameView="Cassete200Station_Blade2_Down" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="74" name="Cassete150Station_Blade2_Down" nameView="Cassete150Station_Blade2_Down" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="75" name="Cassete100Station_Blade2_Down" nameView="Cassete100Station_Blade2_Down" description="Wafer 100 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 		</configs>
 		<configs name="Aligner1" nameView="Aligner1">
-			<config default="9" name="Cassete200Station" nameView="Cassete200Station" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="9" name="Cassete150Station" nameView="Cassete150Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
-			<config default="9" name="Cassete100Station" nameView="Cassete100Station" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="9" name="Cassete200Station_Blade1_Upper" nameView="Cassete200Station_Blade1_Upper" description="Wafer 200 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="9" name="Cassete150Station_Blade1_Upper" nameView="Cassete150Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
+			<config default="9" name="Cassete100Station_Blade1_Upper" nameView="Cassete100Station_Blade1_Upper" description="Wafer 150 Cassete station number" max="120" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 			<config default="86000" name="Aligner200Distance" nameView="Aligner200Distance" description="Wafer 200 aligner distance" max="9999999" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 			<config default="61000" name="Aligner150Distance" nameView="Aligner150Distance" description="Wafer 150 aligner distance" max="9999999" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>
 			<config default="31000" name="Aligner100Distance" nameView="Aligner100Distance" description="Wafer 100 aligner distance" max="9999999" min="0" paramter="" tag="" unit="s" type="Integer" visible="false"/>

+ 8 - 61
PunkHPX8_RT/Devices/EFEM/DummyDevice.cs

@@ -1,5 +1,6 @@
 using Aitex.Core.Common;
 using Aitex.Core.RT.DataCenter;
+using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.IOCore;
@@ -39,7 +40,7 @@ namespace PunkHPX8_RT.Devices.EFEM
         /// <summary>
         /// 是否存在Cassete
         /// </summary>
-        private bool _hasCassete;
+        private bool _hasCassete = true;
         #endregion
 
         #region 属性
@@ -59,70 +60,16 @@ namespace PunkHPX8_RT.Devices.EFEM
         public DummyDevice(ModuleName moduleName)
         {
             _module = moduleName;
-            SubscribeValueAction();
-            DATA.Subscribe($"{_module}.CassettePlaced", () => _hasCassete, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            InitializeData();
+            DATA.Subscribe($"{_module}.CassettePlaced", () => true, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{_module}.WaferSize", () => WaferSize.ToString(), SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
 
-        /// <summary>
-        /// 订阅变量数值发生变化
-        /// </summary>
-        private void SubscribeValueAction()
-        {
-            BeckhoffIoSubscribeUpdateVariable(CASSETE_100_PRESENT);
-            BeckhoffIoSubscribeUpdateVariable(CASSETE_150_PRESENT);
-            BeckhoffIoSubscribeUpdateVariable(CASSETE_200_PRESENT);
-        }
-
-        /// <summary>
-        /// 订阅IO变量
-        /// </summary>
-        /// <param name="variable"></param>
-        private void BeckhoffIoSubscribeUpdateVariable(string variable)
-        {
-            _variableInitializeDic[variable] = false;
-            IOModuleManager.Instance.SubscribeModuleVariable(_module.ToString(), variable, UpdateVariableValue);
-        }
-
-        /// 更新变量数值
-        /// </summary>
-        /// <param name="variable"></param>
-        /// <param name="value"></param>
-        private void UpdateVariableValue(string variable, object value)
+        private void InitializeData()
         {
-            bool cassete = (bool)value;
-            if (variable == CASSETE_200_PRESENT)
-            {
-                _cassete200Present = cassete;
-                if (cassete)
-                {
-                    _waferSize = WaferSize.WS8;
-                }
-            }
-            else if (variable == CASSETE_150_PRESENT)
-            {
-                _cassete150Present = cassete;
-                if (cassete&&!_cassete200Present)
-                {
-                    _waferSize = WaferSize.WS6;
-                }
-            }
-            else if (variable == CASSETE_100_PRESENT)
-            {
-                _cassete100Present = cassete;
-                if (cassete&&!_cassete200Present&&!_cassete150Present)
-                {
-                    _waferSize = WaferSize.WS4;
-                }
-            }
-            if (!_cassete100Present && !_cassete150Present && !_cassete200Present)
-            {
-                _hasCassete = false;
-            }
-            else
-            {
-                _hasCassete = true;
-            }
+            int dummyWaferSize = SC.GetValue<int>($"EFEM.{_module.ToString()}WaferSize");
+            _waferSize = (WaferSize)dummyWaferSize;
+           
         }
     }
 }

+ 61 - 21
PunkHPX8_RT/Devices/EFEM/SunWayRobot.cs

@@ -50,8 +50,8 @@ namespace PunkHPX8_RT.Devices.EFEM
 
         private Dictionary<Hand, string> _armString = new Dictionary<Hand, string>
         {
-            [Hand.Blade1] = "A",
-            [Hand.Blade2] = "B"
+            [Hand.Blade1] = "B",
+            [Hand.Blade2] = "A"
         };
 
         
@@ -121,7 +121,7 @@ namespace PunkHPX8_RT.Devices.EFEM
                 LOG.WriteLog(eEvent.ERR_EFEM_COMMON_FAILED, "EFEM", ex.Message);
             }
 
-            _status = RState.Init;
+            _status = RState.End;
             _IsHomed = false;
             _busyTrig.RST = true;
 
@@ -134,12 +134,12 @@ namespace PunkHPX8_RT.Devices.EFEM
             InitializeModuleStation(ModuleName.Aligner1);
             InitializeModuleStation(ModuleName.SRD1);
             InitializeModuleStation(ModuleName.SRD2);
-            InitializeModuleStation(ModuleName.VPW1);
-            InitializeModuleStation(ModuleName.VPW2);
-            InitializeModuleStation(ModuleName.PlatingCell1);
-            InitializeModuleStation(ModuleName.PlatingCell2);
-            InitializeModuleStation(ModuleName.PlatingCell3);
-            InitializeModuleStation(ModuleName.PlatingCell4);
+            InitializeVPWModuleStation(ModuleName.VPW1);
+            InitializeVPWModuleStation(ModuleName.VPW2);
+            InitializePlatingCellModuleStation(ModuleName.PlatingCell1);
+            InitializePlatingCellModuleStation(ModuleName.PlatingCell2);
+            InitializePlatingCellModuleStation(ModuleName.PlatingCell3);
+            InitializePlatingCellModuleStation(ModuleName.PlatingCell4);
  
 
             CarrierManager.Instance.SubscribeLocation(ModuleName.LP1.ToString(), 1);
@@ -168,12 +168,52 @@ namespace PunkHPX8_RT.Devices.EFEM
         /// <param name="module"></param>
         private void InitializeModuleStation(ModuleName module)
         {
-            int cassete200Station = SC.GetValue<int>($"EFEM.{module}.Cassete200Station");
-            _moduleStationNumberDictionary[$"{module}_200"] = cassete200Station;
-            int cassete150Station = SC.GetValue<int>($"EFEM.{module}.Cassete150Station");
-            _moduleStationNumberDictionary[$"{module}_150"] = cassete150Station;
-            int cassete100Station = SC.GetValue<int>($"EFEM.{module}.Cassete100Station");
-            _moduleStationNumberDictionary[$"{module}_100"]=cassete100Station;
+            int cassete200Station = SC.GetValue<int>($"EFEM.{module}.Cassete200Station_Blade1_Upper");
+            _moduleStationNumberDictionary[$"{module}_200_Blade1_Upper"] = cassete200Station;
+            int cassete150Station = SC.GetValue<int>($"EFEM.{module}.Cassete150Station_Blade1_Upper");
+            _moduleStationNumberDictionary[$"{module}_150_Blade1_Upper"] = cassete150Station;
+            int cassete100Station = SC.GetValue<int>($"EFEM.{module}.Cassete100Station_Blade1_Upper");
+            _moduleStationNumberDictionary[$"{module}_100_Blade1_Upper"]=cassete100Station;
+        }
+        /// <summary>
+        /// 初始化vpw module Station
+        /// </summary>
+        /// <param name="module"></param>
+        private void InitializeVPWModuleStation(ModuleName module)
+        {
+            int cassete200Station_Blade1_Upper = SC.GetValue<int>($"EFEM.{module}.Cassete200Station_Blade1_Upper");
+            _moduleStationNumberDictionary[$"{module}_200_Blade1_Upper"] = cassete200Station_Blade1_Upper;
+            int cassete200Station_Blade2_Upper = SC.GetValue<int>($"EFEM.{module}.Cassete200Station_Blade2_Upper");
+            _moduleStationNumberDictionary[$"{module}_200_Blade2_Upper"] = cassete200Station_Blade2_Upper;
+            int cassete200Station_Blade2_Down = SC.GetValue<int>($"EFEM.{module}.Cassete200Station_Blade2_Down");
+            _moduleStationNumberDictionary[$"{module}_200_Blade2_Down"] = cassete200Station_Blade2_Down;
+
+            int cassete150Station_Blade1_Upper = SC.GetValue<int>($"EFEM.{module}.Cassete150Station_Blade1_Upper");
+            _moduleStationNumberDictionary[$"{module}_150_Blade1_Upper"] = cassete150Station_Blade1_Upper;
+            int cassete150Station_Blade2_Upper = SC.GetValue<int>($"EFEM.{module}.Cassete150Station_Blade2_Upper");
+            _moduleStationNumberDictionary[$"{module}_150_Blade2_Upper"] = cassete150Station_Blade2_Upper;
+            int cassete150Station_Blade2_Down = SC.GetValue<int>($"EFEM.{module}.Cassete150Station_Blade2_Down");
+            _moduleStationNumberDictionary[$"{module}_150_Blade2_Down"] = cassete150Station_Blade2_Down;
+
+            int cassete100Station_Blade1_Upper = SC.GetValue<int>($"EFEM.{module}.Cassete100Station_Blade1_Upper");
+            _moduleStationNumberDictionary[$"{module}_100_Blade1_Upper"] = cassete100Station_Blade1_Upper;
+            int cassete100Station_Blade2_Upper = SC.GetValue<int>($"EFEM.{module}.Cassete100Station_Blade2_Upper");
+            _moduleStationNumberDictionary[$"{module}_100_Blade2_Upper"] = cassete100Station_Blade2_Upper;
+            int cassete100Station_Blade2_Down = SC.GetValue<int>($"EFEM.{module}.Cassete100Station_Blade2_Down");
+            _moduleStationNumberDictionary[$"{module}_100_Blade2_Down"] = cassete100Station_Blade2_Down;
+        }
+        /// <summary>
+        /// 初始化Platingcell Module Station
+        /// </summary>
+        /// <param name="module"></param>
+        private void InitializePlatingCellModuleStation(ModuleName module)
+        {
+            int cassete200Station = SC.GetValue<int>($"EFEM.{module}.Cassete200Station_Blade2_Down");
+            _moduleStationNumberDictionary[$"{module}_200_Blade2_Down"] = cassete200Station;
+            int cassete150Station = SC.GetValue<int>($"EFEM.{module}.Cassete150Station_Blade2_Down");
+            _moduleStationNumberDictionary[$"{module}_150_Blade2_Down"] = cassete150Station;
+            int cassete100Station = SC.GetValue<int>($"EFEM.{module}.Cassete100Station_Blade2_Down");
+            _moduleStationNumberDictionary[$"{module}_100_Blade2_Down"] = cassete100Station;
         }
         private void Socket_OnConnect()
         {
@@ -422,7 +462,7 @@ namespace PunkHPX8_RT.Devices.EFEM
                 LOG.WriteLog(eEvent.ERR_EFEM_COMMON_FAILED, Module.ToString(), $"{station} slot {slot} wafer size is 0, Cannot Execute Pick Action");
                 return false;
             }
-            string strModuleWaferSize = $"{station}_{waferSize}";
+            string strModuleWaferSize = $"{station}_{waferSize}_{hand}_{flip}";
             if (!_moduleStationNumberDictionary.ContainsKey(strModuleWaferSize))
             {
                 LOG.WriteLog(eEvent.ERR_EFEM_COMMON_FAILED, Module.ToString(), $"{station}'s number is not exist, Cannot Execute Pick Action");
@@ -478,7 +518,7 @@ namespace PunkHPX8_RT.Devices.EFEM
                 LOG.WriteLog(eEvent.ERR_EFEM_COMMON_FAILED, Module.ToString(), $"{station} slot {slot} wafer size is 0, Cannot Execute Place Action");
                 return false;
             }
-            string strModuleWaferSize = $"{station}_{waferSize}";
+            string strModuleWaferSize = $"{station}_{waferSize}_{hand}_{flip}";
             _currentMessage = new EfemMessage()
             {
                 Operation = EfemOperation.Place
@@ -500,7 +540,7 @@ namespace PunkHPX8_RT.Devices.EFEM
         }
 
 
-        public override bool Goto(ModuleName station, Hand hand, string updown = "UP")
+        public override bool Goto(ModuleName station, Hand hand, string updown = "Upper")
         {
             if (_status == RState.Running && _currentMessage != null)
             {
@@ -559,7 +599,7 @@ namespace PunkHPX8_RT.Devices.EFEM
                 LOG.WriteLog(eEvent.ERROR_EFEM_COMMUNICATION, Module.ToString(), $"wafersize is 0");
                 return false;
             }
-            string strModuleWaferSize = $"{mod}_{waferSize}";
+            string strModuleWaferSize = $"{mod}_{waferSize}_{hand}_Upper";
             int stationNumber = _moduleStationNumberDictionary[strModuleWaferSize];
             string cmd = $"GOTO N {stationNumber} MAP {extend} ARM {_armString[hand]}\r";
             _currentMessage = new EfemMessage()
@@ -592,7 +632,7 @@ namespace PunkHPX8_RT.Devices.EFEM
                 LOG.WriteLog(eEvent.ERROR_EFEM_COMMUNICATION, Module.ToString(), $"wafersize is 0");
                 return false;
             }
-            string strModuleWaferSize = $"{mod}_{waferSize}";
+            string strModuleWaferSize = $"{mod}_{waferSize}_Blade1_Upper";
             int stationNumber = _moduleStationNumberDictionary[strModuleWaferSize];
             _currentMessage = new EfemMessage()
             {
@@ -625,7 +665,7 @@ namespace PunkHPX8_RT.Devices.EFEM
                 LOG.WriteLog(eEvent.ERROR_EFEM_COMMUNICATION, Module.ToString(), $"wafersize is 0");
                 return false;
             }
-            string strModuleWaferSize = $"{mod}_{waferSize}";
+            string strModuleWaferSize = $"{mod}_{waferSize}_Blade1_Upper";
             int stationNumber = _moduleStationNumberDictionary[strModuleWaferSize];
             _currentMessage = new EfemMessage()
             {

+ 0 - 30
PunkHPX8_RT/Modules/EFEM/CycleRobotCycleNewRoutine.cs

@@ -216,36 +216,6 @@ namespace PunkHPX8_RT.Modules.EFEM
                 };
             }
             
-            //Dummy
-            if (lists.FindIndex(O => O.ModuleName.ToString() == ModuleName.Dummy1.ToString()) != -1)
-            {
-                if (!CheckDummyStatus(ModuleName.Dummy1))
-                {
-                    return false;
-                };
-            }
-            else if(lists.FindIndex(O => O.ModuleName.ToString() == ModuleName.Dummy2.ToString()) != -1)
-            {
-                if (!CheckDummyStatus(ModuleName.Dummy2))
-                {
-                    return false;
-                };
-            }
-            //Srd
-            if (lists.FindIndex(O => O.ModuleName.ToString() == ModuleName.SRD1.ToString()) != -1)
-            {
-                if (!CheckSrdStatus(ModuleName.SRD1))
-                {
-                    return false;
-                };
-            }
-            else if(lists.FindIndex(O => O.ModuleName.ToString() == ModuleName.SRD2.ToString()) != -1)
-            {
-                if (!CheckSrdStatus(ModuleName.SRD2))
-                {
-                    return false;
-                };
-            }
             return result;
         }
         //检查robot状态