Browse Source

add abort for VenusDE && fix bug in UI && add AbortJob,StopJob

zhouhr 10 months ago
parent
commit
3c1ae4babb

+ 1 - 0
Venus/Venus_MainPages/ViewModels/DETMOperationViewModel.cs

@@ -425,6 +425,7 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"VCEB.IsOffline");
 
             m_RtDataKeys.Add($"DETM.PumpIsRunning");
+            m_RtDataKeys.Add($"VCEA.PumpIsRunning");
             m_RtDataKeys.Add($"DETM.TMPipelinePressure.Value");
             m_RtDataKeys.Add($"DETM.TMPressure.Value");
             m_RtDataKeys.Add($"DETM.VCEAPressure.Value");

+ 1 - 1
Venus/Venus_MainPages/ViewModels/VenusDETMViewModel.cs

@@ -444,7 +444,7 @@ namespace Venus_MainPages.ViewModels
             PMCIsInstalled = true;
             //VCEIsInstalled = allModules.Contains("VCE1");
             VCEIsInstalled = true;
-            VPAIsInstalled = allModules.Contains("VPA");
+            VPAIsInstalled = true;
             if (PMAIsInstalled == true)
             {
                 TMModules.Add(SeTMModule.PMA);

+ 85 - 3
Venus/Venus_MainPages/ViewModels/VenusDeOperationOverViewModel.cs

@@ -80,9 +80,28 @@ namespace Venus_MainPages.ViewModels
         private WaferAssociationInfo m_VCEAwaferAssociation;
         private WaferAssociationInfo m_VCEBwaferAssociation;
         private bool loadflag;
+
+        private bool m_TMIsVAC;
+        private bool m_VCEAIsVAC;
+        private bool m_VCEBIsVAC;
         #endregion
 
         #region 属性
+        public bool TMIsVAC
+        {
+            get { return m_TMIsVAC; }
+            set { SetProperty(ref m_TMIsVAC, value); }
+        }
+        public bool VCEAIsVAC
+        {
+            get { return m_VCEAIsVAC; }
+            set { SetProperty(ref m_VCEAIsVAC, value); }
+        }
+        public bool VCEBIsVAC
+        {
+            get { return m_VCEBIsVAC; }
+            set { SetProperty(ref m_VCEBIsVAC, value); }
+        }
         public SERobotTAction Robot1TAction
         {
             get { return m_Robot1TAction; }
@@ -387,6 +406,13 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _StartCommand;
         public DelegateCommand<object> StartCommand =>
             _StartCommand ?? (_StartCommand = new DelegateCommand<object>(OnStart));
+        private DelegateCommand<object> _StopCommand;
+        public DelegateCommand<object> StopCommand =>
+            _StopCommand ?? (_StopCommand = new DelegateCommand<object>(OnStop));
+
+        private DelegateCommand<object> _AbortCommand;
+        public DelegateCommand<object> AbortCommand =>
+            _AbortCommand ?? (_AbortCommand = new DelegateCommand<object>(OnAbort));
 
         private DelegateCommand _StopCycle;
         public DelegateCommand StopCycle => _StopCycle ?? (_StopCycle = new DelegateCommand(onStopCycle));
@@ -525,9 +551,34 @@ namespace Venus_MainPages.ViewModels
                 loadflag = true;
             }
         }
+
+        private void OnResumeAllJob()
+        {
+            var t = CommonFunction.GetValue<List<string>>(RtDataValues, "Scheduler.PjNameList");
+            if (t == null && t.Count == 0)
+            {
+                return;
+            }
+            if (CommonFunction.GetValue<int>(RtDataValues, "EquipmentStatus") == 4)
+            {
+                t.ForEach(x =>
+                {
+                    InvokeClient.Instance.Service.DoOperation("System.ResumeJob", x);
+                });
+
+            }
+            else
+            {
+                t.ForEach(x =>
+                {
+                    InvokeClient.Instance.Service.DoOperation("System.PauseJob", x);
+                });
+            }
+        }
+
         private void OnAbortJob(object obj)
         {
-            InvokeClient.Instance.Service.DoOperation("SE.AbortJob", obj.ToString());
+            InvokeClient.Instance.Service.DoOperation("System.AbortJob", obj.ToString());
         }
         private void OnSelectAll(object obj)
         {
@@ -617,11 +668,11 @@ namespace Venus_MainPages.ViewModels
         }
         private void OnPauseAllJob()
         {
-            //InvokeClient.Instance.Service.DoOperation("System.PauseJob", VCEwaferAssociation.JobID);
+
         }
         private void OnAbortAll()
         {
-            InvokeClient.Instance.Service.DoOperation("System.SEAbort");
+            InvokeClient.Instance.Service.DoOperation("System.Abort");
         }
 
         private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)
@@ -689,6 +740,20 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add($"PMD.ChamberPressure");
             m_RtDataKeys.Add($"PMD.VentingFlag");
             m_RtDataKeys.Add($"PMD.CurrentRecipeResult");
+
+
+            m_RtDataKeys.Add($"DETM.TMIsATM");
+            m_RtDataKeys.Add($"DETM.VCEAIsATM");
+            m_RtDataKeys.Add($"DETM.VCEBIsATM");
+
+            m_RtDataKeys.Add("System.IsAutoMode");
+            m_RtDataKeys.Add("System.IsBusy");
+            m_RtDataKeys.Add("Scheduler.CycledCount");
+            m_RtDataKeys.Add("Scheduler.CycledWafer");
+            m_RtDataKeys.Add("Scheduler.CycleSetPoint");
+            m_RtDataKeys.Add("Scheduler.Throughput");
+            //m_RtDataKeys.Add("EquipmentStatus");
+            m_RtDataKeys.Add("Scheduler.PjNameList");
             //if (PMAIsInstalled)
             //{
             //    m_RtDataKeys.Add($"PMA.ChamberPressure");
@@ -757,6 +822,18 @@ namespace Venus_MainPages.ViewModels
             var info = obj as WaferAssociationInfo;
             InvokeClient.Instance.Service.DoOperation("System.StartSEJob", info.LotId);
         }
+        private void OnStop(object obj)
+        {
+            var info = obj as WaferAssociationInfo;
+            InvokeClient.Instance.Service.DoOperation("System.AbortJob", info.JobID);
+        }
+        private void OnAbort(object obj)
+        {
+            var info = obj as WaferAssociationInfo;
+
+            InvokeClient.Instance.Service.DoOperation("System.StopJob", info.JobID);
+
+        }
 
         private void vceHome(object obj)
         {
@@ -831,6 +908,11 @@ namespace Venus_MainPages.ViewModels
                 VCEBOutDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "VCEB.VCEOutDoorClosed");
                 VCEAPercent = CommonFunction.GetValue<double>(RtDataValues, "DETM.VCEAPressure.Value") * 260 / 750000;
                 VCEBPercent = CommonFunction.GetValue<double>(RtDataValues, "DETM.VCEBPressure.Value") * 260 / 750000;
+
+                TMIsVAC = (CommonFunction.GetValue<int>(RtDataValues, "DETM.TMPressure.Value") < Convert.ToInt32(QueryDataClient.Instance.Service.GetConfig($"DETM.VACTargetPressure")));
+                VCEAIsVAC = (CommonFunction.GetValue<int>(RtDataValues, "DETM.VCEAPressure.Value") < Convert.ToInt32(QueryDataClient.Instance.Service.GetConfig($"VCEA.VACTargetPressure")));
+                VCEBIsVAC = (CommonFunction.GetValue<int>(RtDataValues, "DETM.VCEBPressure.Value") < Convert.ToInt32(QueryDataClient.Instance.Service.GetConfig($"VCEB.VACTargetPressure")));
+
                 if (PMAIsInstalled == true)
                 {
                     PMAModuleInfo = ModuleManager.ModuleInfos["PMA"];

+ 6 - 6
Venus/Venus_MainPages/Views/DETMOperationView.xaml

@@ -363,7 +363,7 @@
                     </userControls:Pump>
 
                     <!-- tm atm-->
-                    <userControls:TextboxWithLabel  Canvas.Left="843" Canvas.Top="145" LabelValue="CM(Torr)" TextBoxValue="{Binding RtDataValues[DETM.TMPressure.Value],StringFormat='F1'}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Center" VerticalAlignment="Top"/>
+                    <userControls:TextboxWithLabel  Canvas.Left="843" Canvas.Top="145" LabelValue="CM(mTorr)" TextBoxValue="{Binding RtDataValues[DETM.TMPressure.Value],StringFormat='F1'}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Center" VerticalAlignment="Top"/>
 
                     <Ellipse Width="20" Height="20"  Canvas.Left="782" Canvas.Top="185" Stroke="Silver" StrokeThickness="2" Panel.ZIndex="3" HorizontalAlignment="Center" VerticalAlignment="Top"  Fill="{Binding TMIsVAC,Converter={StaticResource boolToColor}}"></Ellipse>
                     <Ellipse Width="20" Height="20"  Canvas.Left="809" Canvas.Top="141" Stroke="Silver" StrokeThickness="2"  Panel.ZIndex="3" HorizontalAlignment="Center" VerticalAlignment="Top" Fill="{Binding TMIsATM,Converter={StaticResource boolToColor}}"></Ellipse>
@@ -372,7 +372,7 @@
                     <userControls:FlowPipe   Height="8"  Width="20" Canvas.Left="823" Canvas.Top="155" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top"></userControls:FlowPipe>
 
                     <!-- VCEA atm-->
-                    <userControls:TextboxWithLabel  Canvas.Left="870" Canvas.Top="421" LabelValue="CM(Torr)" TextBoxValue="{Binding RtDataValues[DETM.VCEBPressure.Value],StringFormat='F1',TargetNullValue=0}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+                    <userControls:TextboxWithLabel  Canvas.Left="870" Canvas.Top="421" LabelValue="CM(mTorr)" TextBoxValue="{Binding RtDataValues[DETM.VCEBPressure.Value],StringFormat='F1',TargetNullValue=0}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                     <Ellipse Width="20" Height="20"  Canvas.Left="827" Canvas.Top="468" Stroke="Silver" StrokeThickness="2" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center"  Fill="{Binding VCEBIsVAC,Converter={StaticResource boolToColor}}"></Ellipse>
                     <Ellipse Width="20" Height="20"  Canvas.Left="792" Canvas.Top="415" Stroke="Silver" StrokeThickness="2"  Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="{Binding VCEBIsATM,Converter={StaticResource boolToColor}}"></Ellipse>
 
@@ -380,8 +380,8 @@
                     <userControls:FlowPipe   Height="8"  Width="20" Canvas.Left="841" Canvas.Top="450" RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center"></userControls:FlowPipe>
                     <userControls:FlowPipe   Height="8"  Width="20" Canvas.Left="806" Canvas.Top="431" RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Center"></userControls:FlowPipe>
                     <!-- VCEB atm-->
-                    <userControls:TextboxWithLabel  Canvas.Left="268" Canvas.Top="421" LabelValue="CM(Torr)" TextBoxValue="{Binding RtDataValues[DETM.VCEAPressure.Value],StringFormat='F1',TargetNullValue=0}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-                    <Ellipse Width="20" Height="20"  Canvas.Left="364" Canvas.Top="469" Stroke="Silver" StrokeThickness="2" Panel.ZIndex="3" HorizontalAlignment="Center" VerticalAlignment="Top"  Fill="{Binding VCEAIsVAC,Converter={StaticResource boolToColor}}"></Ellipse>
+                    <userControls:TextboxWithLabel  Canvas.Left="268" Canvas.Top="421" LabelValue="CM(mTorr)" TextBoxValue="{Binding RtDataValues[DETM.VCEAPressure.Value],StringFormat='F1',TargetNullValue=0}" TextBoxColor="#D7E4BD" Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                    <Ellipse Width="20" Height="20"  Canvas.Left="364" Canvas.Top="469" Stroke="Silver" StrokeThickness="2" Panel.ZIndex="3" HorizontalAlignment="Center" VerticalAlignment="Top"   Fill="{Binding VCEAIsVAC,Converter={StaticResource boolToColor}}"></Ellipse>
                     <Ellipse Width="20" Height="20"  Canvas.Left="395" Canvas.Top="417" Stroke="Silver" StrokeThickness="2"  Panel.ZIndex="3" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="{Binding VCEAIsATM,Converter={StaticResource boolToColor}}"></Ellipse>
 
                     <userControls:FlowPipe   Height="8"  Width="100" Canvas.Left="338" Canvas.Top="447" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="2"/>
@@ -541,8 +541,8 @@
                                 <Button Grid.Column="2" Grid.Row="0" Content="PMA Door Close" Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMA,False" IsEnabled="{Binding PMADoorIsOpen}"></Button>
                                 <Button Grid.Column="0" Grid.Row="2" Content="PMB Door Open"  Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMB,True"  IsEnabled="{Binding PMBDoorIsOpen,Converter={StaticResource BoolToBool}}"></Button>
                                 <Button Grid.Column="2" Grid.Row="2" Content="PMB Door Close" Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMB,False" IsEnabled="{Binding PMBDoorIsOpen}"></Button>
-                                <Button Grid.Column="0" Grid.Row="4" Content="PMC Door Open"  Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMC,True"  IsEnabled="{Binding PMCDoorIsOpen}"></Button>
-                                <Button Grid.Column="2" Grid.Row="4" Content="PMC Door Close" Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMC,False" IsEnabled="{Binding PMCDoorIsOpen,Converter={StaticResource BoolToBool}}"></Button>
+                                <Button Grid.Column="0" Grid.Row="4" Content="PMC Door Open"  Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMC,True"  IsEnabled="{Binding PMCDoorIsOpen,Converter={StaticResource BoolToBool}}"></Button>
+                                <Button Grid.Column="2" Grid.Row="4" Content="PMC Door Close" Command="{Binding ControlSlitDoorCommand}"  CommandParameter="PMC,False" IsEnabled="{Binding PMCDoorIsOpen}"></Button>
                             </Grid>
                         </Border>
                     </Grid>

+ 21 - 17
Venus/Venus_MainPages/Views/VenusDeOperationOverView.xaml

@@ -20,9 +20,12 @@
         </i:EventTrigger>
     </i:Interaction.Triggers>
     <UserControl.Resources>
+        <converters:BoolToBool   x:Key="BoolToBool"/>
+        <converters:BoolToColor  x:Key="boolToColor"/>
+        <converters:BoolToColor2  x:Key="boolToColor2"/>
+        <converters:BoolToColor4  x:Key="boolToColor4"/>
         <converters:BoolToVisibility x:Key="boolToVisibility"/>
         <converters:BoolToVisibility2 x:Key="boolToVisibility2"/>
-        <converters:BoolToBool x:Key="BoolToBool"/>
 
         <Style TargetType="{x:Type TabPanel}">
             <Setter Property="Background" Value="Transparent"></Setter>
@@ -114,10 +117,11 @@
                 <StackPanel Width="700">
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                         <Button Margin="5" Padding="5" Content="HOME ALL" HorizontalAlignment="Center"  Command="{Binding HomeAll}"/>
-                        <Button Margin="5" Padding="5" Content="AUTO"   HorizontalAlignment="Center"  Command="{Binding SetAutoMode}" />
-                        <Button Margin="5" Padding="5" Content="MANUAL" HorizontalAlignment="Center" Command="{Binding SetManualMode}"/>
+                        <Button Margin="5" Padding="5" Content="AUTO"   HorizontalAlignment="Center"  Command="{Binding SetAutoMode}"   IsEnabled="{Binding RtDataValues[System.IsAutoMode],Converter={StaticResource BoolToBool}}"/>
+                        <Button Margin="5" Padding="5" Content="MANUAL" HorizontalAlignment="Center" Command="{Binding SetManualMode}" IsEnabled="{Binding RtDataValues[System.IsAutoMode]}"/>
                         <Button Margin="5" Padding="5" Content="ReturnWafer" HorizontalAlignment="Center" Command="{Binding ReturnAllWafer}"/>
-                        <Button Margin="5" Padding="5" Content="ABORT" HorizontalAlignment="Center" Command="{Binding AbortAllCommand}"/>
+                        <Button Margin="5" Padding="5" Content="ABORT" HorizontalAlignment="Center" Command="{Binding AbortAllCommand}" IsEnabled="{Binding RtDataValues[System.IsBusy]}"/>
+
                     </StackPanel>
                 </StackPanel>
 
@@ -125,19 +129,19 @@
 
                 <StackPanel Canvas.Top="40" Width="700">
                     <StackPanel Orientation="Horizontal">
-                        <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0" Height="20" VerticalAlignment="Top">
+                        <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0" Height="20" VerticalAlignment="Top" Visibility="Hidden">
                             <StackPanel Orientation="Horizontal">
                                 <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
                                 <TextBlock Text="TM Water Leak"/>
                             </StackPanel>
                         </Border>
-                        <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0" Height="20" VerticalAlignment="Top">
+                        <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0" Height="20" VerticalAlignment="Top" Visibility="Hidden">
                             <StackPanel Orientation="Horizontal">
                                 <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
                                 <TextBlock Text="TM CDA Pressure"/>
                             </StackPanel>
                         </Border>
-                        <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0" Height="20" VerticalAlignment="Top">
+                        <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0" Height="20" VerticalAlignment="Top" Visibility="Hidden">
                             <StackPanel Orientation="Horizontal">
                                 <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
                                 <TextBlock Text="TM Lid"/>
@@ -148,22 +152,22 @@
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock Text="TM:"/>
-                                        <TextBlock Text="760000mtorr"/>
+                                        <TextBlock Text="{Binding RtDataValues[DETM.TMPressure.Value],StringFormat=0.00}"/>
                                     </StackPanel>
                                 </StackPanel>
                             </Border>
                             <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0">
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
-                                        <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
-                                        <TextBlock Text="TM ATM"/>
+                                        <Ellipse Width="10" Height="10" Margin="0,0,3,0" Fill="{Binding RtDataValues[DETM.TMIsATM],Converter={StaticResource boolToColor}}"/>
+                                        <TextBlock Text="TM ATM"/>                                     
                                     </StackPanel>
                                 </StackPanel>
                             </Border>
                             <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0">
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
-                                        <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
+                                        <Ellipse Width="10" Height="10" Margin="0,0,3,0" Fill="{Binding TMIsVAC,Converter={StaticResource boolToColor}}"/>
                                         <TextBlock Text="TM VAC"/>
                                     </StackPanel>
                                 </StackPanel>
@@ -175,14 +179,14 @@
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock Text="VCEA:"/>
-                                        <TextBlock Text="760000mtorr"/>
+                                        <TextBlock Text="{Binding RtDataValues[DETM.VCEAPressure.Value],StringFormat=0.00}"/>
                                     </StackPanel>
                                 </StackPanel>
                             </Border>
                             <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0">
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
-                                        <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
+                                        <Ellipse Width="10" Height="10" Margin="0,0,3,0" Fill="{Binding RtDataValues[DETM.VCEAIsATM],Converter={StaticResource boolToColor}}"/>
                                         <TextBlock Text="VCEA ATM"/>
                                     </StackPanel>
                                 </StackPanel>
@@ -190,7 +194,7 @@
                             <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0">
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
-                                        <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
+                                        <Ellipse Width="10" Height="10" Margin="0,0,3,0" Fill="{Binding VCEAIsVAC,Converter={StaticResource boolToColor}}"/>
                                         <TextBlock Text="VCEA VAC"/>
                                     </StackPanel>
                                 </StackPanel>
@@ -202,14 +206,14 @@
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock Text="TM:"/>
-                                        <TextBlock Text="760000mtorr"/>
+                                        <TextBlock Text="{Binding RtDataValues[DETM.VCEBPressure.Value],StringFormat=0.00}"/>
                                     </StackPanel>
                                 </StackPanel>
                             </Border>
                             <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0">
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
-                                        <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
+                                        <Ellipse Width="10" Height="10" Margin="0,0,3,0" Fill="{Binding RtDataValues[DETM.VCEBIsATM],Converter={StaticResource boolToColor}}"/>
                                         <TextBlock Text="VCEB ATM"/>
                                     </StackPanel>
                                 </StackPanel>
@@ -217,7 +221,7 @@
                             <Border BorderBrush="#076db6" BorderThickness="1" CornerRadius="3" Padding="3,1" Margin="3,0">
                                 <StackPanel>
                                     <StackPanel Orientation="Horizontal">
-                                        <Ellipse Fill="Green" Width="10" Height="10" Margin="0,0,3,0"/>
+                                        <Ellipse Width="10" Height="10" Margin="0,0,3,0" Fill="{Binding VCEBIsVAC,Converter={StaticResource boolToColor}}"/>
                                         <TextBlock Text="VCEB VAC"/>
                                     </StackPanel>
                                 </StackPanel>

+ 21 - 8
Venus/Venus_RT/Devices/TM/HongHuDETM.cs

@@ -92,8 +92,10 @@ namespace Venus_RT.Devices.TM
         private string _allInstalledModules { get { return SC.GetStringValue("System.InstalledModules").ToString(); } }
         private double TMATMTargetPressure;
         private double TMVACTargetPressure;
-        private double VCEATMTargetPressure;
-        private double VCEVACTargetPressure;
+        private double VCEAATMTargetPressure;
+        private double VCEBATMTargetPressure;
+        private double VCEAVACTargetPressure;
+        private double VCEBVACTargetPressure;
 
         #endregion
 
@@ -118,12 +120,13 @@ namespace Venus_RT.Devices.TM
 
         //ATM VAC信号
         public override bool IsTMATM => _TMATMSensor.Value && _TMPressure.Value >= TMATMTargetPressure;
-        public override bool IsVCEAATM => _VCEAATMSensor.Value && _VCEAPressure.Value >= VCEATMTargetPressure;
-        public override bool IsVCEBATM => _VCEBATMSensor.Value && _VCEBPressure.Value >= VCEATMTargetPressure;
+        public override bool IsVCEAATM => _VCEAATMSensor.Value && _VCEAPressure.Value >= VCEAATMTargetPressure;
+        public override bool IsVCEBATM => _VCEBATMSensor.Value && _VCEBPressure.Value >= VCEBATMTargetPressure;
         public override bool IsTMVAC => _TMPressure.Value <= TMVACTargetPressure;
-        public override bool IsVCEAVAC => _VCEAPressure.Value <= VCEVACTargetPressure;
-        public override bool IsVCEBVAC => _VCEBPressure.Value <= VCEVACTargetPressure;
+        public override bool IsVCEAVAC => _VCEAPressure.Value <= VCEAVACTargetPressure;
+        public override bool IsVCEBVAC => _VCEBPressure.Value <= VCEAVACTargetPressure;
         public bool? IsTMPumpRunning => _TMPump?.IsRunning;
+        public bool? IsVCEPumpRunning => _VCEPump?.IsRunning;
         //valve开关状态
         public override bool IsTMFastPumpOpen => _TMFastPumpValve.Status;
         public override bool IsTMSoftPumpOpen => _TMSoftPumpValve.Status;
@@ -305,8 +308,10 @@ namespace Venus_RT.Devices.TM
             Module = ModuleName.DETM.ToString();
             TMATMTargetPressure = SC.GetValue<double>($"{Module}.ATMTargetPressure");
             TMVACTargetPressure = SC.GetValue<double>($"{Module}.VACTargetPressure");
-            VCEATMTargetPressure = SC.GetValue<double>($"VCEA.ATMTargetPressure");
-            VCEVACTargetPressure = SC.GetValue<double>($"VCEA.VACTargetPressure");
+            VCEAATMTargetPressure = SC.GetValue<double>($"VCEA.ATMTargetPressure");
+            VCEAVACTargetPressure = SC.GetValue<double>($"VCEA.VACTargetPressure");
+            VCEBATMTargetPressure = SC.GetValue<double>($"VCEB.ATMTargetPressure");
+            VCEBVACTargetPressure = SC.GetValue<double>($"VCEB.VACTargetPressure");
             _TMFastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.TMFastPumpValve}");
             _TMSoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.TMSoftPumpValve}");
             _VCEASoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.VCEASoftPumpValve}");
@@ -400,6 +405,7 @@ namespace Venus_RT.Devices.TM
             DATA.Subscribe($"{Module}.PMCSlitDoorClosed", () => PMCSlitDoorClosed);
             DATA.Subscribe($"{Module}.PMDSlitDoorClosed", () => PMDSlitDoorClosed);
             DATA.Subscribe($"{Module}.PumpIsRunning", () => IsTMPumpRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"VCEA.PumpIsRunning", () => IsVCEPumpRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.TMIsATM", () => IsTMATM);
             DATA.Subscribe($"{Module}.VCEAIsATM", () => IsVCEAATM);
             DATA.Subscribe($"{Module}.VCEBIsATM", () => IsVCEBATM);
@@ -410,6 +416,13 @@ namespace Venus_RT.Devices.TM
                 return true;
             });
 
+
+            OP.Subscribe($"VCEA.ControlPump", (cmd, args) =>
+            {
+                _VCEPump.SetPumpOnOff((bool)args[0]);
+                return true;
+            });
+
             OP.Subscribe($"{Module}.SetSlitDoor", (cmd, args) =>
             {
                 var module = (ModuleName)Enum.Parse(typeof(ModuleName), args[0].ToString());

+ 59 - 55
Venus/Venus_RT/Devices/VCE/HongHuVce.cs

@@ -424,74 +424,78 @@ namespace Venus_RT.Devices.VCE
         /// 1、判断结束 2、判断错误
         /// </summary>
         /// <param name="msg">需要处理的单条回复</param>
-        private void HandleSingleMsg(string msg)
+        private void HandleSingleMsg(string rawmsgs)
         {
-            //
-            msg = msg.Trim();
-            if (!string.IsNullOrEmpty(msg))
+            string[] msgs = rawmsgs.Split('\r');
+            foreach (var Msg in msgs)
             {
-                //action set petrify _BKGRDY结束
-                switch (_currentVceMessage.Head)
+                string msg = Msg.Trim();
+                LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"{_moduleName} Receive msg=>{msg}");
+                if (!string.IsNullOrEmpty(msg))
                 {
-                    case VceMessageHead.Action:
-                    case VceMessageHead.Set:
-                    case VceMessageHead.Petrify:
-                        switch (msg)
-                        {
-                            //设备收到 开始运行 目前状态在下发
-                            case "_RDY":
-                                LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"vce start {_currentVceMessage.Head}");
-                                break;
-                            //设备执行完毕
-                            case "_BKGRDY":
-                                LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"vce {_currentVceMessage.Head} over");
-                                _status = RState.End;
-                                break;
-                            //异常处理
-                            default:
-                                _status = RState.Failed;
-                                string reason;
-                                Errorhandle(msg, out reason);
-                                LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, reason);
-                                break;
-                        }
-                        break;
-                    case VceMessageHead.Read:
-                        //如果收到的信息符合
-                        if (_match_ReadMsg.IsMatch(msg))
-                        {
-                            //收到消息 用于结束
-                            _HasReceiveMsg = true;
-                            switch (_currentVceMessage.Command)
+                    //action set petrify _BKGRDY结束
+                    switch (_currentVceMessage.Head)
+                    {
+                        case VceMessageHead.Action:
+                        case VceMessageHead.Set:
+                        case VceMessageHead.Petrify:
+                            switch (msg)
                             {
-                                //处理wafer 信息为map数据
-                                case VceCommand.ReadMap:
-                                    ReadMapData(msg);
+                                //设备收到 开始运行 目前状态在下发
+                                case "_RDY":
+                                    LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"vce start {_currentVceMessage.Head}");
+                                    break;
+                                //设备执行完毕
+                                case "_BKGRDY":
+                                    LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"vce {_currentVceMessage.Head} over");
+                                    _status = RState.End;
+                                    break;
+                                //异常处理
+                                default:
+                                    _status = RState.Failed;
+                                    string reason;
+                                    Errorhandle(msg, out reason);
+                                    LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, reason);
                                     break;
                             }
-                        }
-                        //_RDY查询结束
-                        else
-                        {
-                            if (msg == "_RDY")
+                            break;
+                        case VceMessageHead.Read:
+                            //如果收到的信息符合
+                            if (_match_ReadMsg.IsMatch(msg))
                             {
-                                if (_HasReceiveMsg)
+                                //收到消息 用于结束
+                                _HasReceiveMsg = true;
+                                switch (_currentVceMessage.Command)
                                 {
-                                    _status = RState.End;
+                                    //处理wafer 信息为map数据
+                                    case VceCommand.ReadMap:
+                                        ReadMapData(msg);
+                                        break;
+                                }
+                            }
+                            //_RDY查询结束
+                            else
+                            {
+                                if (msg == "_RDY")
+                                {
+                                    if (_HasReceiveMsg)
+                                    {
+                                        _status = RState.End;
+                                    }
+                                    else
+                                    {
+                                        LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Read Message is over but not receive msg! raw message:{_currentMsg}");
+                                        _status = RState.Failed;
+                                    }
                                 }
                                 else
                                 {
-                                    LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Read Message is over but not receive msg! raw message:{_currentMsg}");
                                     _status = RState.Failed;
+                                    LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Read Message is invalid: receive message {msg} and send message {_currentMsg}");
                                 }
                             }
-                            else
-                            {
-                                _status = RState.Failed;
-                                LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Read Message is invalid: receive message {msg} and send message {_currentMsg}");
-                            }
-                        }
-                        break;
+                            break;
+                    }
                 }
             }
         }
@@ -525,7 +529,7 @@ namespace Venus_RT.Devices.VCE
                     switch (waferinfo[i])
                     {
                         case '0':
-                            WaferManager.Instance.CreateWafer(_LPMs[0].Module, slotnum, WaferStatus.Empty);
+                            WaferManager.Instance.DeleteWafer(_LPMs[0].Module, slotnum);
                             break;
                         case 'X':
                             WaferManager.Instance.CreateWafer(_LPMs[0].Module, slotnum, WaferStatus.Normal);

+ 4 - 3
Venus/Venus_RT/Modules/RouteManager.cs

@@ -480,7 +480,7 @@ namespace Venus_RT.Modules
             OP.Subscribe("System.CreateSEJob", (cmd, args) => CheckToPostMessage((int)MSG.CreateJob, args));
             OP.Subscribe("System.StartSEJob", (cmd, args) => CheckToPostMessage((int)MSG.StartJob, args));
             OP.Subscribe("System.ReturnAllSEWafer", (cmd, args) => CheckToPostMessage((int)MSG.ReturnAllWafer, args));
-            OP.Subscribe("System.SEAbort", (cmd, args) => CheckToPostMessage((int)MSG.AbortJob, args));
+            OP.Subscribe("System.SEAbort", (cmd, args) => CheckToPostMessage((int)MSG.ABORT, args));
         }
 
         public bool CheckToPostMessage(int msg, params object[] args)
@@ -783,7 +783,7 @@ namespace Venus_RT.Modules
             // SE Transfer
             Transition(RtState.Idle, MSG.SEMoveWafer, FsmStartSEMoveWafer, RtState.SETransfer);
             Transition(RtState.SETransfer, FSM_MSG.TIMER, FsmMonitorSEMoveWafer, RtState.Idle);
-            Transition(RtState.SETransfer, MSG.SEAbort, SEAbort, RtState.Idle);
+            Transition(RtState.SETransfer, MSG.ABORT, SEAbort, RtState.Idle);
             // SE ReturnWafer
             Transition(RtState.Idle, MSG.SEReturnWafer, FsmStartSEReturnWafer, RtState.SEReturnWafer);
             Transition(RtState.SEReturnWafer, FSM_MSG.TIMER, FsmMonitorSEReturnWafer, RtState.Idle);
@@ -887,7 +887,8 @@ namespace Venus_RT.Modules
 
         private bool FsmAbort(object[] objs)
         {
-            _manualTransfer.Clear();
+            _manualTransfer?.Clear();
+            _setransfer?.Abort();
             _AutoCycle.Clear();
             return true;
         }

+ 4 - 5
Venus/Venus_RT/Modules/SEManualTransfer.cs

@@ -139,7 +139,7 @@ namespace Venus_RT.Modules
                 switch(_moving_status)
                 {
                     case MovingStatus.WaitAlign:
-                        _moveQueue.Add(new MoveItem(source_station, source_slot, ModuleName.VPA, 0, 0));
+                        _moveQueue.Add(new MoveItem(source_station, source_slot, ModuleName.Aligner1, 0, 0));
                         _moving_status = MovingStatus.StartAlign;
                         break;
                     case MovingStatus.StartAlign:
@@ -147,9 +147,9 @@ namespace Venus_RT.Modules
                         _moving_status = MovingStatus.Aligning;
                         break;
                     case MovingStatus.Aligning:
-                        if (destination_station != ModuleName.VPA)
+                        if (destination_station != ModuleName.Aligner1)
                         {
-                            _moveQueue.Add(new MoveItem(ModuleName.VPA, 0, destination_station, destination_slot, 0));
+                            _moveQueue.Add(new MoveItem(ModuleName.Aligner1, 0, destination_station, destination_slot, 0));
                             _moving_status = MovingStatus.Waiting;
                         }
                         else
@@ -157,8 +157,7 @@ namespace Venus_RT.Modules
                     break;
                     //goto slot need to go
                     case MovingStatus.Waiting:
-                        if (destination_station != ModuleName.VPA)
-                            _moveQueue.Add(new MoveItem(source_station, source_slot, destination_station, destination_slot, 0));
+                        _moveQueue.Add(new MoveItem(source_station, source_slot, destination_station, destination_slot, 0));
                         break;
                 }
             

+ 5 - 0
Venus/Venus_RT/Modules/Schedulers/SchedulerSETMRobot.cs

@@ -44,6 +44,11 @@ namespace Venus_RT.Modules.Schedulers
 
         }
 
+        public override bool IsIdle
+        {
+            get { return _entity.IsIdle; }
+        }
+
         public RState RobotStatus
         {
             get { return _entity.RobotStatus; }

+ 3 - 3
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFPMPlaceRoutine.cs

@@ -271,7 +271,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
 
         private bool PMDoorClose()
         {
-            LOG.Write(eEvent.WARN_TM, Module, $"PMPlace Close Door Again");
+            //LOG.Write(eEvent.WARN_TM, Module, $"PMPlace Close Door Again");
             return _TM.TurnSlitDoor(_targetModule, false);
         }
 
@@ -279,12 +279,12 @@ namespace Venus_RT.Modules.TM.VenusEntity
         {
             if (_TM.CheckSlitValveClose(_targetModule))
             {
-                LOG.Write(eEvent.WARN_TM, Module, $"PMPlace Check Door Close");
+                //LOG.Write(eEvent.WARN_TM, Module, $"PMPlace Check Door Close");
                 return true;
             }
             else
             {
-                LOG.Write(eEvent.WARN_TM, Module, $"PMPlace Check not Close Door");
+                //LOG.Write(eEvent.WARN_TM, Module, $"PMPlace Check not Close Door");
                 return false;
             }
         }

+ 9 - 4
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFPickRoutine.cs

@@ -262,11 +262,16 @@ namespace Venus_RT.Modules.TM.VenusEntity
         private bool Picking()
         {
             //到达目标点位 pick固定槽位点的wafer
-            if (ModuleHelper.IsAligner(_targetModule) && (_vpa.ROffset!=0 || _vpa.TOffset!=0))
+            if (ModuleHelper.IsAligner(_targetModule))
             {
-                int[] RT = calculateRT(_vpa.ROffset, _vpa.TOffset);
-                LOG.Write(eEvent.INFO_TM_ROBOT, ModuleName.TMRobot, $"will pick from PA with R:{RT[1]} D:{RT[0]}");
-                return _robot.PickWithOffset(_targetModule, 0, _hand, RT[1], RT[0]);
+                if ((_vpa.ROffset != 0 || _vpa.TOffset != 0))
+                {
+                    int[] RT = calculateRT(_vpa.ROffset, _vpa.TOffset);
+                    LOG.Write(eEvent.INFO_TM_ROBOT, ModuleName.TMRobot, $"will pick from PA with R:{RT[1]} D:{RT[0]}");
+                    return _robot.PickWithOffset(_targetModule, 0, _hand, RT[1], RT[0]);
+                }
+                else
+                    return _robot.Pick(_targetModule, 0, _hand);
             }
             else
                 return _robot.Pick(VCE2LP.QueryLP2VCE(_targetModule), 0, _hand);

+ 1 - 1
Venus/Venus_RT/Modules/VCE/VceEntity.cs

@@ -86,7 +86,7 @@ namespace Venus_RT.Modules.VCE
                     else
                         return ModuleName.System;
                 case ModuleName.DETM:
-                    if (sVce2LP.ContainsKey(lpname))
+                    if (dVce2LP.ContainsKey(lpname))
                     {
                         return dVce2LP[lpname];
                     }

+ 19 - 1
Venus/Venus_RT/Modules/VenusDispatcher.cs

@@ -902,7 +902,25 @@ namespace Venus_RT.Modules
 
         public void Clear()
         {
-            
+            foreach (var module in _dictModuleTask)
+            {
+                module.Value.Status = ModuleStatus.Idle;
+                module.Value.Scheduler.ResetTask();
+            }
+
+            List<string> keys = _loadportControlJobDic.Keys.ToList();
+            foreach (var key in keys)
+            {
+                _loadportControlJobDic[key] = null;
+            }
+
+            _lstWaferTasks.Clear();
+            _tmSchdActions.Clear();
+            _curTmAction.Clear();
+            _lstControlJobs.Clear();
+            _lstProcessJobs.Clear();
+            InUseRecipes.Clear();
+            _cycleState = RState.End;
         }
 
         #endregion