Browse Source

1.修改efem界面,把Aligner1 改成 Aligner,buffer改成cooling
2.return wafer,增加是否经过cooling以及cooling时间

JET-YDB\JET-YANGDB 1 day ago
parent
commit
f92e4e963f

BIN
VirgoRT/Config/DeviceModelVirgo.xml


+ 2 - 0
VirgoRT/Config/System.sccfg

@@ -21,6 +21,8 @@
     <config default="0" name="ChamberType"  nameView="Chamber Mode" description="0=>VirgoMask,1=>VirgoR" max="10" min="0" paramter="" tag=""  unit="" type="Integer" visible="false"/>
     <config default="false" name="Recipetolerance" nameView="Recipetolerance" description="Recipe tolerance" max="" min="" paramter="" tag="" unit="" type="Bool" visible="true"/>
 
+    <config default="false" name="EnableSignalTowerLog" nameView="EnableSignalTowerLog" description="Enable Signal Tower Log" max="" min="" paramter="" tag="" unit="" type="Bool" visible="false"/>
+
 		<configs name="SetUp" nameView="Set Up" visible="false">
 			<config default="true" name="EPDInstalled" nameView="Is EPD installed" description="Is EPD installed" max="" min="" paramter="" tag="" unit="" type="Bool" />
 		</configs>

+ 57 - 1
VirgoRT/Modules/ManualTransfer.cs

@@ -103,7 +103,7 @@ namespace VirgoRT.Modules
                 _moveTaskQueue.Enqueue(new AlignRoutine(aligner.ToString()));
                 _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(aligner, 0, target, ds, 0, blade)));
             }
-            else if(autoCooling && !ModuleHelper.IsCooling(source) && !ModuleHelper.IsCooling(target))
+            else if(autoCooling && (ModuleHelper.IsInstalled(ModuleName.Cooling1) || ModuleHelper.IsInstalled(ModuleName.Cooling2)) && !ModuleHelper.IsCooling(source) && !ModuleHelper.IsCooling(target))
             {
                 if (WaferManager.Instance.CheckHasWafer(ModuleName.Cooling1, 0) && WaferManager.Instance.CheckHasWafer(ModuleName.Cooling2, 0))
                 {
@@ -121,6 +121,28 @@ namespace VirgoRT.Modules
 
                 _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(cooling, 0, target, ds, 0, blade)));
             }
+            else if (autoCooling && (ModuleHelper.IsInstalled(ModuleName.Buffer)) && !ModuleHelper.IsBuffer(source) && !ModuleHelper.IsBuffer(target))
+            {
+                ModuleName cooling = ModuleName.Buffer;
+                int slot = -1;
+                if (WaferManager.Instance.CheckNoWafer(ModuleName.Buffer, 0))
+                {
+                    slot = 0;
+                }
+                else if (WaferManager.Instance.CheckNoWafer(ModuleName.Cooling2, 0))
+                {
+                    slot = 1;
+                }
+                else
+                {
+                    EV.PostWarningLog("System", "No valid cooling station for auto cooling");
+                    return Result.FAIL;
+                }
+
+                _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(source, ss, cooling, slot, coolingTime, blade)));
+                _moveTaskQueue.Enqueue(new BufferRoutine(cooling.ToString(), coolingTime));
+                _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(cooling, slot, target, ds, 0, blade)));
+            }
             else
             {
                 _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(source, ss, target, ds, coolingTime, blade)));
@@ -240,6 +262,7 @@ namespace VirgoRT.Modules
             if ((Singleton<RouteManager>.Instance.EFEM.EFEMType != EfemEntity.EfemType.BeamSUNWAY && ModuleHelper.IsAligner(_destination.Module)) || ModuleHelper.IsCooling(_destination.Module))
                 _destination.Cooling(_moveTask.CoolingTime);
 
+
             if (_moveTask.SourceModule == ModuleName.EfemRobot)
             {
                 _moveTask.RobotHand = (Hand)_moveTask.SourceSlot;
@@ -481,4 +504,37 @@ namespace VirgoRT.Modules
 
         }
     }
+
+    public class BufferRoutine : TransferModule, IRoutine
+    {
+        private SchedulerBuffer _cooling;
+        private int _coolingTimeS;
+
+        public BufferRoutine(string module, int coolingTimeS)
+        {
+            _cooling = GetModule(module) as SchedulerBuffer;
+            _coolingTimeS = coolingTimeS;
+
+        }
+
+        public Result Start(params object[] objs)
+        {
+            _cooling.Cooling(_coolingTimeS);
+
+            return Result.RUN;
+        }
+
+        public Result Monitor()
+        {
+            if (_cooling.IsAvailable)
+                return Result.DONE;
+
+            return Result.RUN;
+        }
+
+        public void Abort()
+        {
+
+        }
+    }
 }

+ 22 - 1
VirgoRT/Modules/ReturnAllWafer.cs

@@ -195,7 +195,7 @@ namespace VirgoRT.Modules
                 _moveTaskQueue.Enqueue(new FlipRoutine(source.ToString(), _flipOption == 2 ? "FaceDown" : "FaceUp"));
             }
 
-            if (_cooling && !ModuleHelper.IsCooling(transferModule) && !ModuleHelper.IsAligner(transferModule))
+            if (_cooling && (ModuleHelper.IsInstalled(ModuleName.Cooling1) || ModuleHelper.IsInstalled(ModuleName.Cooling2)) && !ModuleHelper.IsCooling(transferModule) && !ModuleHelper.IsAligner(transferModule))
             {
                 ModuleName cooling = ModuleName.System;
                 if (ModuleHelper.IsInstalled(ModuleName.Cooling1) && WaferManager.Instance.CheckNoWafer(ModuleName.Cooling1, 0))
@@ -211,6 +211,27 @@ namespace VirgoRT.Modules
                 _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(transferModule, transferSlot, cooling, 0, _coolingTime, hand)));
                 _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(cooling, 0, (ModuleName)wafer.OriginStation, wafer.OriginSlot, 0, hand)));
             }
+            else if(_cooling && ModuleHelper.IsInstalled(ModuleName.Buffer) && !ModuleHelper.IsBuffer(transferModule) && !ModuleHelper.IsAligner(transferModule) && !ModuleHelper.IsCooling(transferModule))
+            {
+                ModuleName cooling = ModuleName.Buffer;
+                int slot = -1;
+                if (WaferManager.Instance.CheckNoWafer(ModuleName.Buffer, 0))
+                {
+                    slot = 0;
+                }
+                else if (WaferManager.Instance.CheckNoWafer(ModuleName.Cooling2, 0))
+                {
+                    slot = 1;
+                }
+                else
+                {
+                    EV.PostWarningLog("System", "No valid cooling station for auto cooling");
+                    return Result.FAIL;
+                }
+                _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(transferModule, transferSlot, cooling, slot, _coolingTime, hand)));
+                _moveTaskQueue.Enqueue(new BufferRoutine(cooling.ToString(), _coolingTime));
+                _moveTaskQueue.Enqueue(new EfemRobotMover(new MoveItemEx(cooling, slot, (ModuleName)wafer.OriginStation, wafer.OriginSlot, 0, hand)));
+            }
             else if (_aligning)
             {
                 ModuleName aligner = transferModule;

+ 39 - 1
VirgoRT/Modules/Schedulers/SchedulerBuffer.cs

@@ -9,6 +9,7 @@ using VirgoRT.Scheduler;
 using MECF.Framework.Common.Schedulers;
 using MECF.Framework.Common.SubstrateTrackings;
 using Aitex.Core.RT.SCCore;
+using Aitex.Core.Util;
 
 namespace VirgoRT.Modules.Schedulers
 {
@@ -20,7 +21,7 @@ namespace VirgoRT.Modules.Schedulers
         {
             get
             {
-                return true;
+                return CheckTaskDone();
             }
         }
         public SchedulerBuffer(ModuleName buffer) : base(buffer.ToString())
@@ -34,6 +35,43 @@ namespace VirgoRT.Modules.Schedulers
             WaferArriveTicks[eArgs.DstSlot] = DateTime.Now.Ticks;
         }
 
+        private DeviceTimer _timerCooling = new DeviceTimer();
+        private float _paramCoolingTime = 0;
+
+        public override bool Cooling(int coolingTime)
+        {
+            _task = TaskType.Cooling;
+
+            LogTaskStart(_task, $"Cooling {coolingTime} seconds");
+            _paramCoolingTime = coolingTime;
+
+            _timerCooling.Start(_paramCoolingTime * 1000);
+
+            return true;
+        }
+
+        public bool CheckTaskDone()
+        {
+            bool ret = false;
+            switch (_task)
+            {
+                case TaskType.None:
+                    ret = true;
+                    break;
+                case TaskType.Cooling:
+                    ret = _timerCooling.IsTimeout();
+                    break;
+            }
+
+            if (ret && _task != TaskType.None)
+            {
+                LogTaskDone(_task, "");
+                _task = TaskType.None;
+            }
+
+            return ret;
+        }
+
 
         public override SlotItem GetReadyOutSlot()
         {

+ 6 - 0
VirgoSimulator/Instances/SimulatorSystem.cs

@@ -58,6 +58,9 @@ namespace VirgoSimulator.Instances
             IO.DI[$"{mod}.DI_CDA_Pressure"].Value = true;
             IO.DI[$"{mod}.DI_CDA_Pressure_Switch_Out_2"].Value = true;
             IO.DI[$"{mod}.DI_SourceFan1"].Value = true;
+
+            IO.DI[$"{mod}.DI_CTRL_Box_Fans_Running"].Value = true;
+
             IO.DI[$"{mod}.DI_Cooling_Water_Flow_SW"].Value = true;
             IO.DI[$"{mod}.DI_Coolant_Inlet_TC_Broken_Alarm"].Value = false;
             IO.DI[$"{mod}.DI_Coolant_Outlet_TC_Broken_Alarm"].Value = false;
@@ -83,6 +86,9 @@ namespace VirgoSimulator.Instances
             //
             IO.DI[$"{mod}.DI_LE_OT_SW_Alarm"].Value = false;
             IO.DI[$"{mod}.DI_GB_Interlock_Alarm"].Value = false;
+
+            IO.DI[$"{mod}.DI_SRF_Water_Flow_Switch"].Value = false;
+
             //Guide pin
             IO.DI[$"{mod}.DI_Guide_Pin_Small_Lifter_Up_Pos"].Value = false;
             IO.DI[$"{mod}.DI_Guide_Pin_Small_Lifter_Down_Pos"].Value = true;

+ 1 - 1
VirgoUI/Models/Operate/Overview/OverViewModel.cs

@@ -1046,7 +1046,7 @@ namespace VirgoUI.Client.Models.Operate
             int coolingTime = 0;
             bool needAligning = false;
             int alignAngle = 0;
-            if (ModuleManager.ModuleInfos.ContainsKey("Cooling1") || ModuleManager.ModuleInfos.ContainsKey("Cooling2"))
+            if (ModuleManager.ModuleInfos.ContainsKey("Cooling1") || ModuleManager.ModuleInfos.ContainsKey("Cooling2") || ModuleManager.ModuleInfos.ContainsKey("Buffer"))
             {
                 WaferTransferDialogViewModel _transferVM = new WaferTransferDialogViewModel("Would the wafer need cooling?", false, true, "");
                 bool? bret = wm.ShowDialogWithNoStyle(_transferVM);

+ 2 - 2
VirgoUI/Models/Operate/WaferAssociation/WaferAssociationUnit.xaml

@@ -55,7 +55,7 @@
             </StackPanel>
 
             <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,0" HorizontalAlignment="Left" VerticalAlignment="Center">
-                <Button Content="Set All" Width="80" Height="25" Margin="5,0,0,0">
+                <Button Content="Set All" Width="80" Height="25" Margin="5,0,0,0" Visibility="Collapsed">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Click">
                             <cal:ActionMessage MethodName="SetAll">
@@ -64,7 +64,7 @@
                         </i:EventTrigger>
                     </i:Interaction.Triggers>
                 </Button>
-                <Button Content="Deselect All" Width="80" Height="25" Margin="5,0,0,0">
+                <Button Content="Deselect All" Width="80" Height="25" Margin="5,0,0,0" Visibility="Collapsed">
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Click">
                             <cal:ActionMessage MethodName="DeselectAll">

+ 2 - 2
VirgoUI/Models/Platform/EFEM/EFEMView.xaml

@@ -140,7 +140,7 @@
                             <ColumnDefinition />
                         </Grid.ColumnDefinitions>
                         <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Grid.ColumnSpan="2" Padding="5,1">
-                            <TextBlock Text="Aligner 1" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
+                            <TextBlock Text="Aligner" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
                         </Border>
 
                         <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="2"  Grid.ColumnSpan="2" Padding="5">
@@ -154,7 +154,7 @@
                                         </i:EventTrigger>
                                     </i:Interaction.Triggers>
                                 </Button>
-                                <Button Content="Align" Width="60" Height="24" Margin="10,0,0,0">
+                                <Button Content="Align" Width="60" Height="24" Margin="10,0,0,0" Visibility="Collapsed">
                                     <i:Interaction.Triggers>
                                         <i:EventTrigger EventName="Click">
                                             <cal:ActionMessage MethodName="AlignAligner">

+ 47 - 20
VirgoUI/Models/Platform/EFEM/EFEMViewModel.cs

@@ -81,6 +81,14 @@ namespace VirgoUI.Client.Models.Platform.EFEM
             }
         }
 
+        public Visibility GripVisibility
+        {
+            get
+            {
+                return Visibility.Collapsed;
+            }
+        }
+
         public Visibility Foup2Visibility
         {
             get
@@ -172,7 +180,8 @@ namespace VirgoUI.Client.Models.Platform.EFEM
             set
             {
                 _PickSelectedModule = value;
-                PickSlots = GetSlotsByModule(_PickSelectedModule);
+
+                PickSlots = GetSlotsByModule(_nameFromMap[_PickSelectedModule]);
                 PickSelectedSlot = 1;
                 NotifyOfPropertyChange("PickSelectedModule");
             }
@@ -188,7 +197,7 @@ namespace VirgoUI.Client.Models.Platform.EFEM
             set
             {
                 _PlaceSelectedModule = value;
-                PlaceSlots = GetSlotsByModule(_PlaceSelectedModule);
+                PlaceSlots = GetSlotsByModule(_nameFromMap[_PlaceSelectedModule]);
                 PlaceSelectedSlot = 1;
                 NotifyOfPropertyChange("PlaceSelectedModule");
             }
@@ -550,6 +559,9 @@ namespace VirgoUI.Client.Models.Platform.EFEM
             get { return GetWaferSize(PMBWaferSize); }
         }
 
+        [Subscription("Buffer.WaferSize")]
+        public string BufferWaferSize { get; set; }
+
         [Subscription("EFEM.SmallWafer")]
         public int SmallWafer { get; set; }
 
@@ -825,17 +837,29 @@ namespace VirgoUI.Client.Models.Platform.EFEM
             }
         }
 
+        private Dictionary<string, string> _nameFromMap = new Dictionary<string, string>() {
+            {"LP1","LP1" },
+            {"LP2", "LP2" },
+            {"Aligner","Aligner1" },
+            {"Aligner2","Aligner2" },
+            {"Cooling1","Cooling1" },
+            {"Cooling2","Cooling2" },
+            {"Cooling","Buffer" },
+            {"PMA","PMA" },
+            {"PMB","PMB" }
+        };
+
         public EFEMViewModel()
         {
             this.DisplayName = "EFEM";
 
-            _pickModules = new List<string>() { "LP1", "LP2", "Aligner1", "Aligner2", "Cooling1", "Cooling2", "Buffer" };
-            _mapModules = new List<string>() { "LP1", "LP2", "Buffer" };
+            _pickModules = new List<string>() { "LP1", "LP2", "Aligner", "Aligner2", "Cooling1", "Cooling2", "Cooling" };
+            _mapModules = new List<string>() { "LP1", "LP2" };//new List<string>() { "LP1", "LP2", "Cooling" };
             _extendModules = new List<string>() { "PMA", "PMB" };
             var installModules = (string)QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules");
             if(!string.IsNullOrWhiteSpace(installModules))
             {
-                var delMods = _pickModules.Where(p=> !installModules.Contains(p)).ToList();
+                var delMods = _pickModules.Where(p=> !installModules.Contains(_nameFromMap[p])).ToList();
                 if(delMods != null && delMods.Count() > 0)
                 {
                     delMods.ForEach(p => {
@@ -855,6 +879,7 @@ namespace VirgoUI.Client.Models.Platform.EFEM
             _RobotSpeeds = new List<string>() { "Full", "High", "Medium", "Low", "Home", "Jog" };
             _HomeModules = new List<string>() { "EFEM", "AllAxes", "EE1", "EE2", "Theta", "X", "Z" };
 
+            
             PickSelectedModule = _pickModules[0];
             PlaceSelectedModule = _pickModules[0];
             ExtendSelectedModule = _extendModules[0];
@@ -1000,29 +1025,31 @@ namespace VirgoUI.Client.Models.Platform.EFEM
         public void RobotPick()
         {
             if (MenuPermission != 3) return;
-            string ws = PickSelectedModule == ModuleName.LP1.ToString() ? LP1WaferSize :
-                PickSelectedModule == ModuleName.LP2.ToString() ? LP2WaferSize :
-                PickSelectedModule == ModuleName.Aligner1.ToString() ? Aligner1WaferSize :
-                PickSelectedModule == ModuleName.Aligner2.ToString() ? Aligner2WaferSize :
-                PickSelectedModule == ModuleName.Cooling2.ToString() ? Cooling2WaferSize :
-                PickSelectedModule == ModuleName.Cooling1.ToString() ? Cooling1WaferSize : throw new ArgumentOutOfRangeException();
+            string ws = _nameFromMap[PickSelectedModule] == ModuleName.LP1.ToString() ? LP1WaferSize :
+                _nameFromMap[PickSelectedModule] == ModuleName.LP2.ToString() ? LP2WaferSize :
+                _nameFromMap[PickSelectedModule] == ModuleName.Aligner1.ToString() ? Aligner1WaferSize :
+                _nameFromMap[PickSelectedModule] == ModuleName.Aligner2.ToString() ? Aligner2WaferSize :
+                _nameFromMap[PickSelectedModule] == ModuleName.Cooling2.ToString() ? Cooling2WaferSize :
+                _nameFromMap[PickSelectedModule] == ModuleName.Cooling1.ToString() ? Cooling1WaferSize :
+                _nameFromMap[PickSelectedModule] == ModuleName.Buffer.ToString() ? BufferWaferSize : throw new ArgumentOutOfRangeException();
 
             InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Pick}",
-                PickSelectedModule, PickSelectedSlot - 1, ws, PickSelectedBlade);
+                _nameFromMap[PickSelectedModule], PickSelectedSlot - 1, ws, PickSelectedBlade);
         }
 
         public void RobotPlace()
         {
             if (MenuPermission != 3) return;
-            string ws = PlaceSelectedModule == ModuleName.LP1.ToString() ? LP1WaferSize :
-                        PlaceSelectedModule == ModuleName.LP2.ToString() ? LP2WaferSize :
-                        PlaceSelectedModule == ModuleName.Aligner1.ToString() ? Aligner1WaferSize :
-                        PlaceSelectedModule == ModuleName.Aligner2.ToString() ? Aligner2WaferSize :
-                        PlaceSelectedModule == ModuleName.Cooling1.ToString() ? Cooling1WaferSize :
-                        PlaceSelectedModule == ModuleName.Cooling2.ToString() ? Cooling2WaferSize : throw new ArgumentOutOfRangeException();
+            string ws = _nameFromMap[PlaceSelectedModule] == ModuleName.LP1.ToString() ? LP1WaferSize :
+                        _nameFromMap[PlaceSelectedModule] == ModuleName.LP2.ToString() ? LP2WaferSize :
+                        _nameFromMap[PlaceSelectedModule] == ModuleName.Aligner1.ToString() ? Aligner1WaferSize :
+                        _nameFromMap[PlaceSelectedModule] == ModuleName.Aligner2.ToString() ? Aligner2WaferSize :
+                        _nameFromMap[PlaceSelectedModule] == ModuleName.Cooling1.ToString() ? Cooling1WaferSize :
+                        _nameFromMap[PlaceSelectedModule] == ModuleName.Cooling2.ToString() ? Cooling2WaferSize :
+                         _nameFromMap[PlaceSelectedModule] == ModuleName.Buffer.ToString() ? BufferWaferSize : throw new ArgumentOutOfRangeException();
 
             InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Place}",
-                PlaceSelectedModule, PlaceSelectedSlot - 1, ws, PlaceSelectedBlade);
+                _nameFromMap[PlaceSelectedModule], PlaceSelectedSlot - 1, ws, PlaceSelectedBlade);
         }
 
         public void RobotExtend()
@@ -1040,7 +1067,7 @@ namespace VirgoUI.Client.Models.Platform.EFEM
         public void RobotMap()
         {
             if (MenuPermission != 3) return;
-            InvokeClient.Instance.Service.DoOperation($"{MapSelectedModule}.{EfemOperation.Map}");
+            InvokeClient.Instance.Service.DoOperation($"{_nameFromMap[MapSelectedModule]}.{EfemOperation.Map}");
         }
 
         public void RobotGrip()

+ 1 - 1
VirgoUI/WaferMoveManager.cs

@@ -49,7 +49,7 @@ namespace VirgoUI.Client
                                                                               && p_from.ModuleID != "Cooling1" && p_to.ModuleID != "Cooling1"
                  && p_from.ModuleID != "Cooling2" && p_to.ModuleID != "Cooling2") && !p_from.ModuleID.Contains("PM");
 
-                bool displayCoolingCondition = p_from.ModuleID.Contains("PM") && (ModuleManager.ModulesID.Contains("Cooling1") || ModuleManager.ModulesID.Contains("Cooling2"));
+                bool displayCoolingCondition = p_from.ModuleID.Contains("PM") && (ModuleManager.ModulesID.Contains("Cooling1") || ModuleManager.ModulesID.Contains("Cooling2") || ModuleManager.ModulesID.Contains("Buffer"));
 
                 displayCoolingCondition = displayCoolingCondition && !p_to.ModuleID.Contains("PM");