Explorar o código

Enhance LOG Module && fix bug in SE UI.

zhouhr hai 1 ano
pai
achega
7fec2e1d8e

+ 22 - 1
Venus/Framework/Common/Log/LOG.cs

@@ -5,6 +5,7 @@ using System.Diagnostics;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.Equipment;
 using System.Text;
 using System.Text;
 using Aitex.Core.RT.Event;
 using Aitex.Core.RT.Event;
+using System.Collections.Generic;
 
 
 namespace Aitex.Core.RT.Log
 namespace Aitex.Core.RT.Log
 {
 {
@@ -21,6 +22,9 @@ namespace Aitex.Core.RT.Log
 
 
         public static ICommonLog InnerLogger { set;  private get; }
         public static ICommonLog InnerLogger { set;  private get; }
         public static Action<ModuleName> PMErrorInterrupt;
         public static Action<ModuleName> PMErrorInterrupt;
+
+        private static DateTime _lstErrTime;
+        private static Queue<string> _errMessages = new Queue<string>();
         public static void onErrorInterrupt(ModuleName module)
         public static void onErrorInterrupt(ModuleName module)
         {
         {
             if (PMErrorInterrupt != null && ModuleHelper.IsPm(module))
             if (PMErrorInterrupt != null && ModuleHelper.IsPm(module))
@@ -65,7 +69,24 @@ namespace Aitex.Core.RT.Log
 
 
         public static void WriteExeption(Exception ex)
         public static void WriteExeption(Exception ex)
         {
         {
-           Write(eEvent.ERR_EXCEPTION, ModuleName.System, GetFormatStackFrameInfo(ex));
+            if (!_errMessages.Contains(ex.Message))
+            {
+                if (_errMessages.Count > 30)
+                {
+                    _errMessages.Dequeue();
+                    _errMessages.Enqueue(ex.Message);
+                }
+                else
+                    _errMessages.Enqueue(ex.Message);
+                _lstErrTime = DateTime.Now;
+                Write(eEvent.ERR_EXCEPTION, ModuleName.System, GetFormatStackFrameInfo(ex));
+            }
+            else if (_lstErrTime == null || (DateTime.Now - _lstErrTime).TotalMilliseconds > 10000)
+            {
+                _lstErrTime = DateTime.Now;
+                Write(eEvent.ERR_EXCEPTION, ModuleName.System, GetFormatStackFrameInfo(ex));
+            }
+
         }
         }
 
 
         public static void WriteExeption(string prefix, Exception ex)
         public static void WriteExeption(string prefix, Exception ex)

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

@@ -531,7 +531,7 @@
                                         <ColumnDefinition Width="22"></ColumnDefinition>
                                         <ColumnDefinition Width="22"></ColumnDefinition>
                                     </Grid.ColumnDefinitions>
                                     </Grid.ColumnDefinitions>
                                     <Button Grid.Column="0" Command="{Binding GoToSlotCommand}">Go to slot</Button>
                                     <Button Grid.Column="0" Command="{Binding GoToSlotCommand}">Go to slot</Button>
-                                    <TextBox Grid.Column="1" Width="22" Text="{Binding GoToSlotNumber,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
+                                    <TextBox Grid.Column="1" Width="22" Text="{Binding GoToSlotNumber,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" VerticalAlignment="Center" Padding="0,10"></TextBox>
                                 </Grid>
                                 </Grid>
                                 <Button Grid.Column="2" Grid.Row="2" Command="{Binding HOMECommand}">Home  plant</Button>
                                 <Button Grid.Column="2" Grid.Row="2" Command="{Binding HOMECommand}">Home  plant</Button>
                             </Grid>
                             </Grid>

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

@@ -111,7 +111,7 @@
         <!--Vce PM Aligner-->
         <!--Vce PM Aligner-->
         <Canvas Canvas.Top="100" Canvas.Left="20">
         <Canvas Canvas.Top="100" Canvas.Left="20">
             <Viewbox Width="420" Height="720" Stretch="Fill" >
             <Viewbox Width="420" Height="720" Stretch="Fill" >
-                <Canvas Canvas.Top="100" Width="450" Height="800">
+                <Canvas Canvas.Top="100" Width="450" Height="800" Cursor="">
 
 
                     <userControls:VenusSETM
                     <userControls:VenusSETM
                         VCEIsInstalled="{Binding VCE1IsInstalled }" 
                         VCEIsInstalled="{Binding VCE1IsInstalled }" 
@@ -127,9 +127,9 @@
 
 
                     <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMA" x:Name="PMA" Canvas.Top="275"  Canvas.Left="277" Width="100" Height="100" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                     <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMA" x:Name="PMA" Canvas.Top="275"  Canvas.Left="277" Width="100" Height="100" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                     <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMB" x:Name="PMB" Canvas.Top="45"   Canvas.Left="409" Width="100" Height="100"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMB" x:Name="PMB" Canvas.Top="45"   Canvas.Left="409" Width="100" Height="100"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-                    <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMC" x:Name="PMC" Canvas.Top="174"   Canvas.Left="642" Width="102" Height="102" RotateTransformValue="90" DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+                    <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMC" x:Name="PMC" Canvas.Top="174"   Canvas.Left="630" Width="102" Height="102" RotateTransformValue="90" DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                     <!--<userControls:TMChamber ModuleName="PMC" x:Name="PMC" Canvas.Top="155"  Canvas.Left="680" Width="140" Height="140" RotateTransformValue="90"  DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
                     <!--<userControls:TMChamber ModuleName="PMC" x:Name="PMC" Canvas.Top="155"  Canvas.Left="680" Width="140" Height="140" RotateTransformValue="90"  DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
-                    <userControls:Vce VCEName="Vce" Canvas.Top="360" Canvas.Left="355" Width="200" Height="180" HorizontalAlignment="Center" VerticalAlignment="Top"></userControls:Vce>
+                    <userControls:Vce VCEName="VCE1" Canvas.Top="360" Canvas.Left="355" Width="200" Height="180" HorizontalAlignment="Center" VerticalAlignment="Top"></userControls:Vce>
                     <userControls:EFEMFrontView UnitData="{Binding TMModuleInfo}" Title="SeTM Robot"      Canvas.Top="180" Canvas.Left="20"/>
                     <userControls:EFEMFrontView UnitData="{Binding TMModuleInfo}" Title="SeTM Robot"      Canvas.Top="180" Canvas.Left="20"/>
 
 
                 </Canvas>
                 </Canvas>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
Venus/Venus_MainPages/Views/VenusSeOperationOverView.xaml