chenzk пре 2 недеља
родитељ
комит
57d22c6c02

+ 6 - 0
PunkHPX8_Themes/CustomControls/CustomRobot.cs

@@ -46,6 +46,12 @@ namespace PunkHPX8_Themes.CustomControls
         Retract2
     }
 
+    public enum WaferRobotFAction
+    {
+        Upper,
+        Down
+    }
+
     public enum WaferRobotTAction
     {
         T_Origin,

+ 133 - 0
PunkHPX8_Themes/CustomControls/PunkRobotControl.cs

@@ -0,0 +1,133 @@
+using OpenSEMI.ClientBase;
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media.Animation;
+
+namespace PunkHPX8_Themes.CustomControls
+{
+    public class PunkRobotControl : Control
+    {
+        static PunkRobotControl()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(PunkRobotControl), new FrameworkPropertyMetadata(typeof(PunkRobotControl)));
+        }
+
+        public static readonly DependencyProperty WaferProperty = DependencyProperty.Register("Wafer", typeof(int), typeof(PunkRobotControl));
+        public int Wafer 
+        { 
+            get => (int)GetValue(WaferProperty); 
+            set => SetValue(WaferProperty, value); 
+        }
+ 
+        public static readonly DependencyProperty ExtendTimeProperty = DependencyProperty.Register("ExtendTime", typeof(KeyTime), typeof(PunkRobotControl), new PropertyMetadata(KeyTime.FromTimeSpan(TimeSpan.FromSeconds(9))));
+        public KeyTime ExtendTime 
+        { 
+            get => (KeyTime)GetValue(ExtendTimeProperty); 
+            set => SetValue(ExtendTimeProperty, value); 
+        }
+
+        public static readonly DependencyProperty Robot2WaferProperty = DependencyProperty.Register(
+          "Robot2Wafer",
+          typeof(WaferInfo),
+          typeof(PunkRobotControl));
+        public WaferInfo Robot2Wafer
+        {
+            get => (WaferInfo)GetValue(Robot2WaferProperty);
+            set => SetValue(Robot2WaferProperty, value);
+        }
+        
+        public static readonly DependencyProperty RobotWaferProperty = DependencyProperty.Register(
+            "RobotWafer",
+            typeof(WaferInfo),
+            typeof(PunkRobotControl));
+        public WaferInfo RobotWafer
+        {
+            get => (WaferInfo)GetValue(RobotWaferProperty);
+            set => SetValue(RobotWaferProperty, value);
+        }
+    
+        public static readonly DependencyProperty RobotXActionProperty = DependencyProperty.Register(
+           "RobotXAction",
+           typeof(WaferRobotXAction),
+           typeof(PunkRobotControl),
+           new PropertyMetadata(WaferRobotXAction.X_Origin, RobotXActionPropertyChangedCallback));
+        public WaferRobotXAction RobotXAction
+        {
+            get => (WaferRobotXAction)GetValue(RobotXActionProperty);
+            set => SetValue(RobotXActionProperty, value);
+        }
+        private static void RobotXActionPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            //KeyTime value = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(9));
+            var control = d as PunkRobotControl;
+            var oldAct = (WaferRobotXAction)e.OldValue;
+            var newAct = (WaferRobotXAction)e.NewValue;
+            switch (newAct)
+            {
+                case WaferRobotXAction.X_Origin:
+                    VisualStateManager.GoToState(control, newAct.ToString(), true);
+                    break;
+                case WaferRobotXAction.Extend:
+                    if (newAct != oldAct)
+                    {
+                        VisualStateManager.GoToState(control, newAct.ToString(), true);
+                    }
+                    break;
+                case WaferRobotXAction.Extend2:
+                    if (newAct != oldAct)
+                    {
+                        VisualStateManager.GoToState(control, newAct.ToString(), true);
+                    }
+                    break;
+                case WaferRobotXAction.Retract2:
+                    if (newAct != oldAct)
+                    {
+                        VisualStateManager.GoToState(control, newAct.ToString(), true);
+                    }
+                    break;
+                case WaferRobotXAction.Retract:
+                    if (newAct != oldAct)
+                    {
+                        VisualStateManager.GoToState(control, newAct.ToString(), true);
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        public static readonly DependencyProperty RobotTActionProperty = DependencyProperty.Register(
+           "RobotTAction",
+           typeof(WaferRobotTAction),
+           typeof(PunkRobotControl),
+           new PropertyMetadata(WaferRobotTAction.T_Origin, RobotTActionPropertyChangedCallback));
+        public WaferRobotTAction RobotTAction
+        {
+            get => (WaferRobotTAction)GetValue(RobotTActionProperty);
+            set => SetValue(RobotTActionProperty, value);
+        }
+
+        private static void RobotTActionPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            var control = d as PunkRobotControl;
+            var oldAct = (WaferRobotTAction)e.OldValue;
+            var newAct = (WaferRobotTAction)e.NewValue;
+            if (oldAct != newAct)
+            {
+                VisualStateManager.GoToState(control, newAct.ToString(), true);
+            }
+        }
+        
+        public string OriginT { get; set; }
+        public override void OnApplyTemplate()
+        {
+            base.OnApplyTemplate();
+
+            VisualStateManager.GoToState(this, WaferRobotXAction.X_Origin.ToString(), true);
+            VisualStateManager.GoToState(this, OriginT, true);
+        }
+
+
+    }
+}

+ 1 - 0
PunkHPX8_Themes/PunkHPX8_Themes.csproj

@@ -136,6 +136,7 @@
     <Compile Include="CustomControls\CustomRobot.cs" />
     <Compile Include="CustomControls\MultiComboBox.cs" />
     <Compile Include="CustomControls\PathButton.cs" />
+    <Compile Include="CustomControls\PunkRobotControl.cs" />
     <Compile Include="CustomControls\SERobot.cs" />
     <Compile Include="CustomControls\SplitButton.cs" />
     <Compile Include="CustomControls\StepBar.cs" />

+ 457 - 0
PunkHPX8_Themes/Themes/Generic.xaml

@@ -1033,6 +1033,463 @@
             </Setter.Value>
         </Setter>
     </Style>
+    <Style TargetType="{x:Type customControls:PunkRobotControl}">
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="Width" Value="800"/>
+        <Setter Property="Height" Value="600"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type customControls:PunkRobotControl}">
+                    <Viewbox x:Name="viewbox" Stretch="Fill">
+
+                      
+                        
+                        <VisualStateManager.VisualStateGroups>
+                            <VisualStateGroup Name="RobotXActions">
+                                <VisualStateGroup.Transitions>
+                                    <VisualTransition To="Extend">
+                                        <Storyboard FillBehavior="HoldEnd" SpeedRatio="18">
+                                           
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT2ArmRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-120" KeyTime="0:0:0"/>
+                                                <LinearDoubleKeyFrame Value="-80" KeyTime="0:0:3"/>
+                                                <LinearDoubleKeyFrame Value="-30" KeyTime="0:0:6"/>
+                                                <LinearDoubleKeyFrame Value="0"   KeyTime="0:0:9"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip1RotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-180" KeyTime="0:0:0"/>
+                                                <LinearDoubleKeyFrame Value="-160" KeyTime="0:0:3"/>
+                                                <LinearDoubleKeyFrame Value="-120" KeyTime="0:0:6"/>
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:9"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip2RotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:9"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="Retract">
+                                        <Storyboard FillBehavior="HoldEnd" SpeedRatio="18">
+                                          
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT2ArmRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-120" KeyTime="0:0:9"/>
+                                                <LinearDoubleKeyFrame Value="-80" KeyTime="0:0:6"/>
+                                                <LinearDoubleKeyFrame Value="-30" KeyTime="0:0:3"/>
+                                                <LinearDoubleKeyFrame Value="0"   KeyTime="0:0:0"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip1RotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-180" KeyTime="0:0:9"/>
+                                                <LinearDoubleKeyFrame Value="-160" KeyTime="0:0:6"/>
+                                                <LinearDoubleKeyFrame Value="-120" KeyTime="0:0:3"/>
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip2RotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:9"/>
+                                            </DoubleAnimationUsingKeyFrames>
+
+                                        </Storyboard>
+                                    </VisualTransition>
+                                </VisualStateGroup.Transitions>
+
+                                <VisualState Name="X_Origin">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT2ArmRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-120"   KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip1RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="180" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip2RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="Extend">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT2ArmRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip1RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip2RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="Retract">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT2ArmRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-120" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip1RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-180" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grip2RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                               
+                            </VisualStateGroup>
+                                
+                            <VisualStateGroup Name="RobotTActions">
+                                <VisualStateGroup.Transitions>
+                                    <VisualTransition To="T_Origin">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="LP1">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="LP2">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="Aligner1">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="Dummy1">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="Dummy2">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="SRD1">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="SRD2">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="VPW1">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                                <LinearDoubleKeyFrame Value="100" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="VPW2">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="120" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                                <LinearDoubleKeyFrame Value="50" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="PlatingCell1">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="PlatingCell2">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="PlatingCell3">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="PlatingCell4">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0.5"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                </VisualStateGroup.Transitions>
+
+                                <VisualState Name="T_Origin">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                            <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="armXT1RotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="0"  KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="LP1">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="LP2">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="Aligner1">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="Dummy1">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="Dummy2">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="SRD1">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="SRD2">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="VPW1">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                            <LinearDoubleKeyFrame Value="100" KeyTime="0:0:0.0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="VPW2">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="120" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                            <LinearDoubleKeyFrame Value="50" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="PlatingCell1">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="PlatingCell2">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="PlatingCell3">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="PlatingCell4">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="90" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                            </VisualStateGroup>
+                        </VisualStateManager.VisualStateGroups>
+
+                        <Canvas Width="200" Height="300" >
+                            <Canvas.RenderTransform>
+                                <TransformGroup>
+                                    <TranslateTransform  x:Name="robotRightLeftAct"></TranslateTransform>
+                                </TransformGroup>
+                            </Canvas.RenderTransform>
+                            <Canvas x:Name="armXT1Center"  Width="80" Height="80" Canvas.Left="40" Canvas.Top="230" ToolTip="底座">
+                                <Canvas.RenderTransform>
+                                    <RotateTransform Angle="-90" />
+                                </Canvas.RenderTransform>
+                                <Path  Stroke="{StaticResource robotBorderBrush}"  Fill="{StaticResource RobotBrush}" StrokeThickness="1" StrokeEndLineCap="Round"  >
+                                    <Path.Data>
+                                        <PathGeometry>
+                                            <PathFigure StartPoint="0 12" IsClosed="True">
+                                                <LineSegment Point="12 0"/>
+                                                <LineSegment Point="68 0"/>
+                                                <LineSegment Point="80 12"/>
+                                                <LineSegment Point="80 68"/>
+                                                <LineSegment Point="68 80"/>
+                                                <LineSegment Point="12 80"/>
+                                                <LineSegment Point="0 68"/>
+                                            </PathFigure>
+                                        </PathGeometry>
+                                    </Path.Data>
+                                </Path>
+                            </Canvas>
+                            <Canvas x:Name="robot" Width="100" Height="150" RenderTransformOrigin="1 1" >
+                                <Canvas.RenderTransform>
+                                    <TransformGroup>
+                                        <RotateTransform  x:Name="robotRotateAct"/>
+                                    </TransformGroup>
+                                </Canvas.RenderTransform>
+                                <Canvas x:Name="armXT1" Width="200" Height="100"  Canvas.Top="100" RenderTransformOrigin="0.5 0.7">
+                                    <Canvas.RenderTransform>
+                                        <RotateTransform  x:Name="armXT1RotateAct"/>
+                                    </Canvas.RenderTransform>
+                                    <Canvas x:Name="armXT1Arm" Width="140" Height="60"  Canvas.Left="10" Canvas.Top="40" RenderTransformOrigin="1 0.5" ToolTip="后臂">
+                                        <Path  Stroke="{StaticResource robotBorderBrush}" Fill="{StaticResource RobotBrush}" StrokeThickness="1" StrokeEndLineCap="Round" >
+                                            <Path.Data>
+                                                <PathGeometry>
+                                                    <PathFigure StartPoint="0 5" IsClosed="True">
+                                                        <LineSegment Point="102 0"/>
+                                                        <LineSegment Point="102 60" IsStroked="False"/>
+                                                        <LineSegment Point="0 50"/>
+                                                        <LineSegment Point="0 10" IsStroked="False"/>
+                                                    </PathFigure>
+                                                </PathGeometry>
+                                            </Path.Data>
+                                        </Path>
+                                        <Path Stroke="{StaticResource robotBorderBrush}" StrokeThickness="1" Canvas.Left="0" Canvas.Top="-5"
+                                        StrokeEndLineCap="Round" StrokeStartLineCap="Round" Fill="{StaticResource RobotBrush}"
+                                        Data="M 0,10 A 20,20 0 0 0 0,55">
+                                        </Path>
+                                    </Canvas>
+                                </Canvas>
+
+                                <Canvas x:Name="armXT2" Width="120" Height="40" Canvas.Left="-170" Canvas.Top="127">
+                                    <Canvas.RenderTransform>
+                                        <TransformGroup>
+                                            <TranslateTransform x:Name="armXT2Act"></TranslateTransform>
+                                        </TransformGroup>
+                                    </Canvas.RenderTransform>
+                                    <Canvas x:Name="armXT2Arm" Width="93" Height="40"  Canvas.Left="80" Canvas.Top="20" RenderTransformOrigin="1 0.5" Background="#6495ED" ToolTip="前臂">
+                                        <Canvas.RenderTransform>
+                                            <RotateTransform x:Name="armXT2ArmRotateAct"/>
+                                        </Canvas.RenderTransform>
+                                        <Path Stroke="{StaticResource robotBorderBrush}" StrokeThickness="2" Canvas.Left="93" 
+                                        StrokeEndLineCap="Round" StrokeStartLineCap="Round" Fill="WhiteSmoke"
+                                        Data="M 0,0 A 20,20 0 0 1 0,40">
+                                        </Path>
+                                        <Path Stroke="{StaticResource robotBorderBrush}" StrokeThickness="2" Canvas.Left="0" 
+                                        StrokeEndLineCap="Round" StrokeStartLineCap="Round" Fill="{StaticResource RobotBrush}"
+                                        Data="M 0,0 A 20,20 0 0 0 0,40">
+                                        </Path>
+
+                                        <Path  Stroke="{StaticResource robotBorderBrush}" Fill="{StaticResource RobotBrush}" StrokeThickness="2" StrokeEndLineCap="Round" >
+                                            <Path.Data>
+                                                <PathGeometry>
+                                                    <PathFigure StartPoint="93 0" >
+                                                        <LineSegment Point="0 0" />
+                                                        <LineSegment Point="0 40" IsStroked="False"/>
+                                                        <LineSegment Point="93 40"/>
+                                                        <LineSegment Point="93 0" IsStroked="False"/>
+                                                    </PathFigure>
+                                                </PathGeometry>
+                                            </Path.Data>
+                                        </Path>
+                                        <Ellipse Width="24" Height="24" Stroke="#030303" StrokeThickness="4"  Fill="Transparent" 
+                                        Canvas.Top="8" Canvas.Left="83"/>
+
+                                        <Canvas x:Name="armGripper" Height="40" Width="50"  Canvas.Left="0" Canvas.Top="0" Panel.ZIndex="1" RenderTransformOrigin="0,0.5">
+                                            <Canvas.RenderTransform>
+                                                <RotateTransform x:Name="grip1RotateAct"/>
+                                            </Canvas.RenderTransform>
+                                            <Image Width="70" Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/atmrobot/hand3.png"></Image>
+                                            <Viewbox Canvas.Left="30" Canvas.Top="-22" Width="85" Height="85">
+                                                <userControls:WaferCtrl WaferData="{Binding RobotWafer,RelativeSource={RelativeSource TemplatedParent}}"/>
+                                            </Viewbox>
+                                        
+                                        </Canvas>
+
+                                        <Canvas x:Name="armGripper2" Height="120" Width="50"  Canvas.Left="-30" Canvas.Top="-100" RenderTransformOrigin="0.5,1">
+                                            <Canvas.RenderTransform>
+                                                <RotateTransform x:Name="grip2RotateAct"/>
+                                            </Canvas.RenderTransform>
+                                            <Image Width="48" Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/atmrobot/hand1.png"></Image>
+                                            <Viewbox Canvas.Left="-125" Canvas.Top="60" Width="85" Height="85">
+                                                <userControls:WaferCtrl WaferData="{Binding Robot2Wafer,RelativeSource={RelativeSource TemplatedParent}}"/>
+                                            </Viewbox>
+                                        </Canvas>
+                                    </Canvas>
+                                    
+                                    
+                                </Canvas>
+                            </Canvas>
+                        </Canvas>
+
+
+                    </Viewbox>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
 
     <Style TargetType="{x:Type customControls:CommonValveControl}">
         <Setter Property="Focusable" Value="False"/>

+ 1 - 6
PunkHPX8_Themes/UserControls/EFEM.xaml

@@ -413,12 +413,7 @@
                     <customControls:GuangChuanRobotControl  OriginT="T_Origin"  Canvas.Left="-30" Canvas.Top="-180"   Width="540" Height="810"     RobotTAction="{Binding ElementName=efem,Path=RobotATAction}"  RobotXAction="{Binding ElementName=efem,Path=RobotAXAction}" RobotWafer="{Binding ElementName=efem,Path=RobotAWaferInfo}"/>
                 </Canvas>
                 <Canvas Width="500" Height="500" Canvas.Left="180" Canvas.Top="50"  RenderTransformOrigin="1 1">
-                    <Canvas.RenderTransform>
-                        <TransformGroup>
-                            <TranslateTransform  x:Name="robotBRotateAct"/>
-                        </TransformGroup>
-                    </Canvas.RenderTransform>
-                    <customControls:GuangChuanRobotControl  OriginT="T_Origin"  Canvas.Left="-30" Canvas.Top="260"   Width="540" Height="810"       RobotWafer="{Binding ElementName=efem,Path=RobotBWaferInfo}"/>
+                    <customControls:PunkRobotControl  OriginT="T_Origin"  Canvas.Left="-30" Canvas.Top="260"   Width="640" Height="810"    RobotTAction="{Binding ElementName=efem,Path=RobotATAction}" RobotXAction="{Binding ElementName=efem,Path=RobotAXAction}" RobotWafer="{Binding ElementName=efem,Path=RobotAWaferInfo}" Robot2Wafer="{Binding ElementName=efem,Path=RobotBWaferInfo}"/>
                 </Canvas>
                 <!--Aligner-->
                 <Viewbox Stretch="Uniform" Width="370" Height="370" Canvas.Left="810"  Canvas.Top="680" HorizontalAlignment="Center" VerticalAlignment="Top">

+ 0 - 3
PunkHPX8_Twincate/PunkHPX8/PlcTest/POUs/MAIN.TcPOU

@@ -167,9 +167,6 @@ VAR
 	//PlatingCell34LeakDetected
 	RES3_4_DI_8CHANNEL_4_20MA_EL1008_N230_7 AT%I* :BOOL;
 	
-	
-    //Dummy1Cassete200Present
-	Facility_DI_16CHANNEL_EL1819_N000_160 AT%I* :BOOL;
 	//CassetteAPlaced
 	Facility_DI_16CHANNEL_EL1819_N000_11 AT%I* :BOOL;
 	//CassetteA100M