Procházet zdrojové kódy

1.添加旋转动画
2.efem添加online/offline功能
3.OverView与TopView添加online/offline ui切换显示

lixiang před 1 rokem
rodič
revize
b253c8fadd

+ 27 - 0
Venus/Venus_MainPages/Converters/IsOnlineToColorConverter.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace Venus_MainPages.Converters
+{
+    public class IsOnlineToColorConverter:IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            var item = (bool)value;
+            if (item == true)
+            {
+                return new SolidColorBrush((Color)ColorConverter.ConvertFromString("#7FFF00"));
+            }
+            else
+            {
+                return new SolidColorBrush(Colors.Gray);
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 27 - 0
Venus/Venus_MainPages/Converters/IsOnlineToOpacityConverter.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace Venus_MainPages.Converters
+{
+    public class IsOnlineToOpacityConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            var item = (bool)value;
+            if (item == true)
+            {
+                return 1;
+            }
+            else
+            {
+                return 0.4;
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 2 - 0
Venus/Venus_MainPages/Venus_MainPages.csproj

@@ -127,6 +127,8 @@
     <Compile Include="Converters\EFEMStateConverter.cs" />
     <Compile Include="Converters\EventItemToStringConverter.cs" />
     <Compile Include="Converters\HeaterToStringConverter.cs" />
+    <Compile Include="Converters\IsOnlineToOpacityConverter.cs" />
+    <Compile Include="Converters\IsOnlineToColorConverter.cs" />
     <Compile Include="Converters\LLStateConverter.cs" />
     <Compile Include="Converters\MFCErrorConverters.cs" />
     <Compile Include="Converters\MultiBindingConverter.cs" />

+ 17 - 9
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -408,6 +408,13 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _LPCloseDoorCommand;
         public DelegateCommand<object> LPCloseDoorCommand =>
             _LPCloseDoorCommand ?? (_LPCloseDoorCommand = new DelegateCommand<object>(OnLPCloseDoor));
+        private DelegateCommand _OnlineCommand;
+        public DelegateCommand OnlineCommand =>
+            _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));
+
+        private DelegateCommand _OfflineCommand;
+        public DelegateCommand OfflineCommand =>
+            _OfflineCommand ?? (_OfflineCommand = new DelegateCommand(OnOffline));
         #endregion
 
         #region 构造函数
@@ -431,15 +438,6 @@ namespace Venus_MainPages.ViewModels
             OnModuleChange("Place");
 
             Init();
-            //OnModuleChange("Extend");
-
-            //OnModuleChange("Retract");
-
-            //UIEvents.PMDoorRaiseChangedEvent += UIEvents_PMDoorRaiseChangedEvent;
-
-            //UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
-
-            //UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
 
         }
         #endregion
@@ -715,6 +713,14 @@ namespace Venus_MainPages.ViewModels
             InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.CloseDoor");
 
         }
+        private void OnOnline()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.Online",true);
+        }
+        private void OnOffline()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.Online", false);
+        }
         #endregion
 
         #region 私有方法
@@ -773,6 +779,8 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("LP1.CassettePlaced");
             m_RtDataKeys.Add("LP2.CassettePlaced");
             m_RtDataKeys.Add("LP3.CassettePlaced");
+            m_RtDataKeys.Add("EFEM.IsOnline");
+
         }
 
         //private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)

+ 89 - 23
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -454,7 +454,6 @@ namespace Venus_MainPages.ViewModels
             timer.Tick += Timer_Tick;
             timer.Start();
 
-            addDataKeys();
             string allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString();
             PMAIsInstalled = allModules.Contains("PMA");
             PMBIsInstalled = allModules.Contains("PMB");
@@ -464,8 +463,9 @@ namespace Venus_MainPages.ViewModels
             LLBIsInstalled = allModules.Contains("LLB");
             EFEMIsInstalled = allModules.Contains("EFEM");
             TMIsInstalled = allModules.Contains("TM");
+            addDataKeys();
+
 
-          
 
             SwitchFlag = false;
 
@@ -793,6 +793,32 @@ namespace Venus_MainPages.ViewModels
             }
             #endregion
 
+            #region Rotating
+            if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Rotating))
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);                   
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                }
+            }
+            #endregion
+
         }
         private async void EFEMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
         {
@@ -920,15 +946,68 @@ namespace Venus_MainPages.ViewModels
         }
         private void addDataKeys()
         {
-            m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
-            m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
-            m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
-            m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
+            if (PMAIsInstalled == true)
+            {
+                m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
+                m_RtDataKeys.Add("PMA.CurrentRecipeResult");
+
+                m_RtDataKeys.Add("PMA.IsOnline");
+            }
+
+            if (PMBIsInstalled == true)
+            {
+                m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
+                m_RtDataKeys.Add("PMB.CurrentRecipeResult");
+
+                m_RtDataKeys.Add("PMB.IsOnline");
+            }
+
+            if (PMCIsInstalled == true)
+            {
+                m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
+                m_RtDataKeys.Add("PMC.CurrentRecipeResult");
+
+                m_RtDataKeys.Add("PMC.IsOnline");
+            }
+
+            if (PMDIsInstalled == true)
+            {
+                m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
+                m_RtDataKeys.Add("PMD.CurrentRecipeResult");
+
+                m_RtDataKeys.Add("PMD.IsOnline");
+            }
+
+            if (TMIsInstalled == true)
+            {
+                m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
+                m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
+                m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
+                m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
+                m_RtDataKeys.Add("TM.IsOnline");
+
+            }
+            if (LLAIsInstalled == true)
+            {
+                m_RtDataKeys.Add("LLA.IsOnline");
+            }
+            if (LLBIsInstalled == true)
+            {
+                m_RtDataKeys.Add("LLB.IsOnline");
+            }
+            if (EFEMIsInstalled == true)
+            {
+                m_RtDataKeys.Add("LP1.IsLoaded");
+                m_RtDataKeys.Add("LP2.IsLoaded");
+                m_RtDataKeys.Add("LP3.IsLoaded");
+
+                m_RtDataKeys.Add("LP1.CassettePlaced");
+                m_RtDataKeys.Add("LP2.CassettePlaced");
+                m_RtDataKeys.Add("LP3.CassettePlaced");
+                m_RtDataKeys.Add("EFEM.IsOnline");
+
+            }
 
-            m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
-            m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
-            m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
-            m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
             m_RtDataKeys.Add("System.IsAutoMode");
 
             m_RtDataKeys.Add("Scheduler.CycledCount");
@@ -936,19 +1015,6 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("Scheduler.CycleSetPoint");
             m_RtDataKeys.Add("Scheduler.Throughput");
 
-            m_RtDataKeys.Add("LP1.IsLoaded");
-            m_RtDataKeys.Add("LP2.IsLoaded");
-            m_RtDataKeys.Add("LP3.IsLoaded");
-
-            m_RtDataKeys.Add("LP1.CassettePlaced");
-            m_RtDataKeys.Add("LP2.CassettePlaced");
-            m_RtDataKeys.Add("LP3.CassettePlaced");
-
-            m_RtDataKeys.Add("PMA.CurrentRecipeResult");
-            m_RtDataKeys.Add("PMB.CurrentRecipeResult");
-            m_RtDataKeys.Add("PMC.CurrentRecipeResult");
-            m_RtDataKeys.Add("PMD.CurrentRecipeResult");
-
         }
 
         private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)

+ 15 - 1
Venus/Venus_MainPages/ViewModels/OverKepler2200AViewModel.cs

@@ -1419,7 +1419,14 @@ namespace Venus_MainPages.ViewModels
             heaterView.Owner = _mainWindow;
             heaterView.Show();
         }
-
+        private void OnOnline()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.PmOnline}");
+        }
+        private void OnOffline()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.PmOffline}");
+        }
         private void OnEndStep()
         {
             if (CurrentRecipeResult?.RecipeStepNumber != null && CurrentRecipeResult?.RecipeStepNumber != CurrentRecipeResult?.RecipeStepCount)
@@ -1444,6 +1451,13 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HighTemperatureHeater.SetHighTemperatureHeaterTemperature", HighTemperatureHeaterTemperatureSetpoint);
         }
+        private DelegateCommand _OnlineCommand;
+        public DelegateCommand OnlineCommand =>
+            _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));
+
+        private DelegateCommand _OfflineCommand;
+        public DelegateCommand OfflineCommand =>
+            _OfflineCommand ?? (_OfflineCommand = new DelegateCommand(OnOffline));
         private async void OnAbortRecipe(object obj)
         {
             if (PMCurrentState != PMState.Processing)

+ 16 - 0
Venus/Venus_MainPages/ViewModels/OverVenusViewModel.cs

@@ -1035,6 +1035,14 @@ namespace Venus_MainPages.ViewModels
         public DelegateCommand EndStepCommand =>
             _EndStepCommand ?? (_EndStepCommand = new DelegateCommand(OnEndStep));
 
+        private DelegateCommand _OnlineCommand;
+        public DelegateCommand OnlineCommand =>
+            _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));
+
+        private DelegateCommand _OfflineCommand;
+        public DelegateCommand OfflineCommand =>
+            _OfflineCommand ?? (_OfflineCommand = new DelegateCommand(OnOffline));
+
         private DelegateCommand<object> _AbortRecipeCommnad;
         public DelegateCommand<object> AbortRecipeCommnad =>
             _AbortRecipeCommnad ?? (_AbortRecipeCommnad = new DelegateCommand<object>(OnAbortRecipe));
@@ -1431,6 +1439,14 @@ namespace Venus_MainPages.ViewModels
                 InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
             }
         }
+        private void OnOnline()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.PmOnline}");
+        }
+        private void OnOffline()
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.PmOffline}");
+        }
         private async void OnAbortRecipe(object obj)
         {
             if (PMCurrentState != PMState.Processing)

+ 26 - 0
Venus/Venus_MainPages/ViewModels/TMViewModel.cs

@@ -272,6 +272,32 @@ namespace Venus_MainPages.ViewModels
 
             }
             #endregion
+
+            #region Rotating
+            if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Rotating))
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                }
+            }
+            #endregion
             arm1oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus;
             arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
         }

+ 14 - 1
Venus/Venus_MainPages/ViewModels/TopViewModel.cs

@@ -285,7 +285,7 @@ namespace Venus_MainPages.ViewModels
             addDataKeys();
 
             DispatcherTimer timer = new DispatcherTimer();
-            timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Interval = TimeSpan.FromSeconds(0.5);
             timer.Tick += timer_Tick;
             timer.Start();
             
@@ -347,38 +347,51 @@ namespace Venus_MainPages.ViewModels
             if (PMAIsInstalled == true)
             {
                 m_RtDataKeys.Add("PMA.FsmState");
+                m_RtDataKeys.Add("PMA.IsOnline");
+
             }
             if (PMBIsInstalled == true)
             {
                 m_RtDataKeys.Add("PMB.FsmState");
+                m_RtDataKeys.Add("PMB.IsOnline");
+
             }
             if (PMCIsInstalled == true)
             {
                 m_RtDataKeys.Add("PMC.FsmState");
+                m_RtDataKeys.Add("PMC.IsOnline");
+
             }
             if (PMDIsInstalled == true)
             {
                 m_RtDataKeys.Add("PMD.FsmState");
+                m_RtDataKeys.Add("PMD.IsOnline");
             }
             if (TMIsInstalled == true)
             {
                 m_RtDataKeys.Add("TM.FsmState");
+                m_RtDataKeys.Add("TM.IsOnline");
             }
             if (LLAIsInstalled == true)
             {
                 m_RtDataKeys.Add("LLA.FsmState");
+                m_RtDataKeys.Add("LLA.IsOnline");
             }
             if (LLBIsInstalled == true)
             {
                 m_RtDataKeys.Add("LLB.FsmState");
+                m_RtDataKeys.Add("LLB.IsOnline");
             }
             if (EFEMIsInstalled == true)
             {
                 m_RtDataKeys.Add("EFEM.FsmState");
+                m_RtDataKeys.Add("EFEM.IsOnline");
             }
 
             m_RtDataKeys.Add("SYSTEM.FsmState");
+            m_RtDataKeys.Add("System.IsAutoMode");
 
+            
             m_RtDataKeys.Add($"System.SignalTower.DeviceData");
             m_RtDataKeys.Add("System.CommunicationStatus");
         }

+ 3 - 2
Venus/Venus_MainPages/Views/EfemView.xaml

@@ -28,8 +28,9 @@
                 <customControls:PathButton Content="Clear Error" FontSize="15"   Width="120" Height="28" Margin="5 5 0 0" Command="{Binding ClearErrorCommand}"/>
                 <customControls:PathButton Content="Abort" FontSize="15"   Width="120" Height="28" Margin="5 5 20 0" Command="{Binding AbortCommand}"/>
 
-                <!--<RadioButton Content="Online"    FontSize="15"   Width="120" Height="28" Margin="80 5 5 5" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding TMIsOFFline,Converter={StaticResource BoolToBool},Mode=TwoWay}" GroupName="IsOnline"/>
-                <RadioButton Content="Offline"   FontSize="15"   Width="120" Height="28" Margin="5 5 0 5" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding TMIsOFFline,Mode=TwoWay}" GroupName="IsOnline"/>-->
+                <RadioButton Content="Offline"   FontSize="15"   Width="120" Height="28" Margin="80 5 5 5"  Style="{StaticResource Button_RadioButton}" IsChecked="{Binding RtDataValues[EFEM.IsOnline],Converter={StaticResource BoolToBool}}"  GroupName="IsOnline" Command="{Binding OfflineCommand}"/>
+                <RadioButton Content="Online"    FontSize="15"   Width="120" Height="28" Margin="5 5 0 5"   Style="{StaticResource Button_RadioButton}" IsChecked="{Binding RtDataValues[EFEM.IsOnline]}"                                        GroupName="IsOnline" Command="{Binding OnlineCommand}"/>
+
             </StackPanel>
         </Border>
         <userControls:FOUPFrontView UnitData="{Binding LP1ModuleInfo}"  Canvas.Top="70" Canvas.Left="10"/>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 12 - 10
Venus/Venus_MainPages/Views/OperationOverView.xaml


+ 2 - 2
Venus/Venus_MainPages/Views/OverKepler2200AView.xaml

@@ -1168,8 +1168,8 @@
                     <!--<MenuItem Header="Stop Recipe/Stop Dechuck Step" Cursor="Hand"                        Command="{Binding AbortRecipeCommnad}" CommandParameter="1"/>-->
                     <MenuItem Header="Stop Recipe=>Return Wafer To Foup" Cursor="Hand"   Command="{Binding AbortRecipeCommnad}" CommandParameter="2"/>
                 </customControls:SplitButton>
-                <RadioButton Content="OffLine"     Width="120" Height="28" Margin="0 0 5 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Converter={StaticResource BoolToBool},Mode=TwoWay}" FontSize="15"/>
-                <RadioButton Content="OnLine"      Width="120" Height="28" Margin="0 0 30 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Mode=TwoWay}" FontSize="15"/>
+                <RadioButton Content="OffLine"     Width="120" Height="28" Margin="0 0 5 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Converter={StaticResource BoolToBool},Mode=TwoWay}" FontSize="15" Command="{Binding OfflineCommand}"/>
+                <RadioButton Content="OnLine"      Width="120" Height="28" Margin="0 0 30 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Mode=TwoWay}" FontSize="15"                                      Command="{Binding OnlineCommand}"/>
                 <customControls:PathButton  Width="130" Height="30" Content="Vent"          Command="{Binding VentCommand}"         IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" />
                 <customControls:PathButton  Width="134" Height="30" Content="Pump Purge"    Command="{Binding PurgeCommand}"         Margin="50,0,0,0" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
                 <customControls:PathButton  Width="134" Height="30" Content="Pump Down"     Command="{Binding PumpCommand}"         Margin="50,0,0,0" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>

+ 2 - 2
Venus/Venus_MainPages/Views/OverVenusView.xaml

@@ -1253,8 +1253,8 @@
                     <MenuItem Header="Stop Recipe=>Run Dechuck Recipe=>Return Wafer To Foup" Cursor="Hand"   Command="{Binding AbortRecipeCommnad}" CommandParameter="2"/>
                 </customControls:SplitButton>
 
-                <RadioButton Content="OffLine"   FontSize="15"   Width="120" Height="28" Margin="0 0 5 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Converter={StaticResource BoolToBool},Mode=TwoWay}"/>
-                <RadioButton Content="OnLine"    FontSize="15"   Width="120" Height="28" Margin="0 0 30 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Mode=TwoWay}"/>
+                <RadioButton Content="OffLine"   FontSize="15"   Width="120" Height="28" Margin="0 0 5 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Converter={StaticResource BoolToBool},Mode=TwoWay}" Command="{Binding OfflineCommand}"/>
+                <RadioButton Content="OnLine"    FontSize="15"   Width="120" Height="28" Margin="0 0 30 0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsAutoMode,Mode=TwoWay}"                                      Command="{Binding OnlineCommand}"/>
                 <customControls:PathButton  Width="130" Height="30" Content="Vent"          Command="{Binding VentCommand}"         IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}" />
                 <customControls:PathButton  Width="134" Height="30" Content="Pump Purge"    Command="{Binding PurgeCommand}"         Margin="50,0,0,0" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>
                 <customControls:PathButton  Width="134" Height="30" Content="Pump Down"     Command="{Binding PumpCommand}"         Margin="50,0,0,0" IsEnabled="{Binding IsAutoMode,Converter={StaticResource BoolToBool}}"/>

+ 11 - 12
Venus/Venus_MainPages/Views/TopView.xaml

@@ -22,8 +22,7 @@
         <converters2:LLStateConverter x:Key="LLStateConverter"/>
         <converters2:SystemStateConverter x:Key="SystemStateConverter"/>
         <converters2:EFEMStateConverter x:Key="EFEMStateConverter"/>
-
-        
+        <converters2:IsOnlineToColorConverter x:Key="IsOnlineConverter"/>
     </UserControl.Resources>
 
     <Canvas Background="{StaticResource Login_BG}">
@@ -45,21 +44,21 @@
 
 
             </Grid.ColumnDefinitions>
-            <userControls:StateTitle Title="System"  TextBoxValue="{Binding RtDataValues[SYSTEM.FsmState]}" TextBoxColor="{Binding RtDataValues[SYSTEM.FsmState],Converter={StaticResource SystemStateConverter}}" />
-            <userControls:StateTitle Title="EFEM"  Grid.Column="3"  TextBoxValue="{Binding RtDataValues[EFEM.FsmState]}" TextBoxColor="{Binding RtDataValues[EFEM.FsmState],Converter={StaticResource EFEMStateConverter}}"   Visibility="{Binding EFEMIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-            <userControls:StateTitle Title="LLA"   Grid.Column="1"   TextBoxValue="{Binding RtDataValues[LLA.FsmState]}"    TextBoxColor="{Binding RtDataValues[LLA.FsmState],Converter={StaticResource LLStateConverter}}" Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" />
-            <userControls:StateTitle Title="LLB"   Grid.Column="2"  TextBoxValue="{Binding RtDataValues[LLB.FsmState]}"    TextBoxColor="{Binding RtDataValues[LLB.FsmState],Converter={StaticResource LLStateConverter}}" Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+            <userControls:StateTitle Title="System"                 TextBoxValue="{Binding RtDataValues[SYSTEM.FsmState]}" TextBoxColor="{Binding RtDataValues[SYSTEM.FsmState],Converter={StaticResource SystemStateConverter}}" LabelColor="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource IsOnlineConverter}}"/>
+            <userControls:StateTitle Title="EFEM"  Grid.Column="3"  TextBoxValue="{Binding RtDataValues[EFEM.FsmState]}"   TextBoxColor="{Binding RtDataValues[EFEM.FsmState],Converter={StaticResource EFEMStateConverter}}"     LabelColor="{Binding RtDataValues[EFEM.IsOnline],Converter={StaticResource IsOnlineConverter}}"  Visibility="{Binding EFEMIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" />
+            <userControls:StateTitle Title="LLA"   Grid.Column="1"  TextBoxValue="{Binding RtDataValues[LLA.FsmState]}"    TextBoxColor="{Binding RtDataValues[LLA.FsmState],Converter={StaticResource LLStateConverter}}"        LabelColor="{Binding RtDataValues[LLA.IsOnline],Converter={StaticResource IsOnlineConverter}}"     Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+            <userControls:StateTitle Title="LLB"   Grid.Column="2"  TextBoxValue="{Binding RtDataValues[LLB.FsmState]}"    TextBoxColor="{Binding RtDataValues[LLB.FsmState],Converter={StaticResource LLStateConverter}}"        LabelColor="{Binding RtDataValues[LLB.IsOnline],Converter={StaticResource IsOnlineConverter}}"     Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
 
 
-            <userControls:StateTitle Title="PMA"   Grid.Column="0"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMA.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMA.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" />
-            <userControls:StateTitle Title="PMB"   Grid.Column="1"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMB.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMB.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" />
-            <userControls:StateTitle Title="PMC"   Grid.Column="2"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMC.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMC.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
-            <userControls:StateTitle Title="PMD"   Grid.Column="3"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMD.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMD.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+            <userControls:StateTitle Title="PMA"   Grid.Column="0"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMA.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMA.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" LabelColor="{Binding RtDataValues[PMA.IsOnline],Converter={StaticResource IsOnlineConverter}}"/>
+            <userControls:StateTitle Title="PMB"   Grid.Column="1"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMB.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMB.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" LabelColor="{Binding RtDataValues[PMB.IsOnline],Converter={StaticResource IsOnlineConverter}}"/>
+            <userControls:StateTitle Title="PMC"   Grid.Column="2"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMC.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMC.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" LabelColor="{Binding RtDataValues[PMC.IsOnline],Converter={StaticResource IsOnlineConverter}}"/>
+            <userControls:StateTitle Title="PMD"   Grid.Column="3"  Grid.Row="1"  TextBoxValue="{Binding RtDataValues[PMD.FsmState]}"    TextBoxColor="{Binding RtDataValues[PMD.FsmState],Converter={StaticResource PMStateConverter}}"  Visibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" LabelColor="{Binding RtDataValues[PMD.IsOnline],Converter={StaticResource IsOnlineConverter}}"/>
 
-            <userControls:StateTitle Title="TM"    Grid.Row="2"    TextBoxValue="{Binding RtDataValues[TM.FsmState]}"     TextBoxColor="{Binding RtDataValues[TM.FsmState],Converter={StaticResource TMStateConverter}}" Visibility="{Binding TMIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
+            <userControls:StateTitle Title="TM"    Grid.Row="2"    TextBoxValue="{Binding RtDataValues[TM.FsmState]}"     TextBoxColor="{Binding RtDataValues[TM.FsmState],Converter={StaticResource TMStateConverter}}" Visibility="{Binding TMIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" LabelColor="{Binding RtDataValues[TM.IsOnline],Converter={StaticResource IsOnlineConverter}}"/>
 
             <StackPanel Orientation="Horizontal" Grid.Column="1"  Grid.Row="2" Grid.ColumnSpan="3">
-                <Label Content="Log" Style="{StaticResource TopLable_LeftTop}" Canvas.Left="520" Width="100" Canvas.Top="76" BorderThickness="1" BorderBrush="White"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Height="30"/>
+                <Label Content="Log" Style="{StaticResource TopLable_LeftTop}" Canvas.Left="520" Width="100" Canvas.Top="76" BorderThickness="1"   HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Height="30"/>
                 <ComboBox  Width="720" Canvas.Left="620" Canvas.Top="74.2" Height="32"
                                        ItemsSource="{Binding EventLogList}"   
                                        SelectedIndex="{Binding EventLogListSelectedIndex}"

+ 10 - 1
Venus/Venus_RT/Modules/EFEM/EfemEntity.cs

@@ -84,6 +84,7 @@ namespace Venus_RT.Modules
             Ungrip,
             Flip,
             LiftActionDone,
+            Offline
         }
 
         public enum EfemType
@@ -200,7 +201,10 @@ namespace Venus_RT.Modules
             OP.Subscribe($"{ModuleName.EFEM}.{EfemOperation.ClearError}",       (cmd, args) => { PostMsg(MSG.Recover); return true; });
             OP.Subscribe($"{ModuleName.EFEM}.{EfemOperation.TurnOffBuzzer}",    (cmd, args) => { PostMsg(MSG.TurnOffBuzzer); return true; });
             //OP.Subscribe($"{ModuleName.EFEM}.{EfemOperation.SwitchOnBuzzerAndRed}", (cmd, args) => { PostMsg(MSG.SwitchOnBuzzerAndRed); return true; });
-            OP.Subscribe($"{ModuleName.EFEM}.Online",                           (cmd, args) => { PostMsg(MSG.Online); return true; });
+            OP.Subscribe($"{ModuleName.EFEM}.Online",                           (cmd, args) => 
+            {
+                PostMsg(MSG.Online, args[0]); return true; 
+            });
             OP.Subscribe($"{ModuleName.EfemRobot}.{EfemOperation.Pick}",        (cmd, args) => { PostMsg(MSG.Pick, args[0]); return true; });
             OP.Subscribe($"{ModuleName.EfemRobot}.{EfemOperation.Place}",       (cmd, args) => { PostMsg(MSG.Place, args[0]); return true; });
             OP.Subscribe($"{ModuleName.EfemRobot}.{EfemOperation.Swap}",        (cmd, args) => { PostMsg(MSG.Swap, args[0]); return true; });
@@ -236,6 +240,9 @@ namespace Venus_RT.Modules
             DATA.Subscribe($"{Name}.FsmLastMessage", GetFsmLastMessage, Aitex.Core.Util.SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Name}.RobotMoveAction", () => (_efem.TMRobotMoveInfo), Aitex.Core.Util.SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
+            DATA.Subscribe($"{Name}.IsOnline", () => (IsOnline), Aitex.Core.Util.SubscriptionAttribute.FLAG.IgnoreSaveDB);
+
+
             _robotWatch.Restart();
             return true;
         }
@@ -256,6 +263,7 @@ namespace Venus_RT.Modules
 
             AnyStateTransition(MSG.CommReady,          fnCommReady,               STATE.Init);
 
+
             Transition(STATE.Init, FSM_MSG.TIMER, fnMonitor, STATE.Init);
             Transition(STATE.Idle, FSM_MSG.TIMER, fnMonitor, STATE.Idle);
             Transition(STATE.Error, FSM_MSG.TIMER, fnMonitor, STATE.Error);
@@ -403,6 +411,7 @@ namespace Venus_RT.Modules
             {
                 efem.SetOnline(bOnlineFlag);
             }
+            IsOnline = bOnlineFlag;
             return true;
         }
 

+ 1 - 1
Venus/Venus_Themes/UserControls/StateTitle.xaml

@@ -8,7 +8,7 @@
              d:DesignHeight="40" d:DesignWidth="800" x:Name="stateTitle">
     
     <StackPanel Orientation="Horizontal">
-        <Label   Style="{StaticResource TopLable_LeftTop}" Content="{Binding ElementName=stateTitle,Path=Title}"      HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="100" BorderBrush="Silver" BorderThickness="1" VerticalAlignment="Center" Height="30"/>
+        <Label   Style="{StaticResource TopLable_LeftTop}" Content="{Binding ElementName=stateTitle,Path=Title}"      HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="100" BorderBrush="Silver" BorderThickness="1" VerticalAlignment="Center" Height="30" Background="{Binding ElementName=stateTitle,Path=LabelColor}" Foreground="Black"  FontWeight="Bold"/>
         <TextBox Style="{StaticResource TextBox_Top}"      Text="{Binding ElementName=stateTitle,Path=TextBoxValue}"  Background="{Binding ElementName=stateTitle,Path=TextBoxColor}" Width="210" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderThickness="1" Height="30" BorderBrush="Black" VerticalAlignment="Center"/>
     </StackPanel>
 </UserControl>

+ 9 - 0
Venus/Venus_Themes/UserControls/StateTitle.xaml.cs

@@ -24,6 +24,15 @@ namespace Venus_Themes.UserControls
         {
             InitializeComponent();
         }
+
+        public static readonly DependencyProperty LabelColorProperty = DependencyProperty.Register(
+     "LabelColor", typeof(SolidColorBrush), typeof(StateTitle), new PropertyMetadata(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#838B83"))));
+        public SolidColorBrush LabelColor
+        {
+            get { return (SolidColorBrush)this.GetValue(LabelColorProperty); }
+            set { this.SetValue(LabelColorProperty, value); }
+        }
+
         public static readonly DependencyProperty TextBoxColorProperty = DependencyProperty.Register(
      "TextBoxColor", typeof(SolidColorBrush), typeof(StateTitle));
         public SolidColorBrush TextBoxColor