Bläddra i källkod

git-svn-id: http://10.4.3.168:50001/svn/Furnace@36 dbcde07d-dcf5-c148-8a84-ac3097b7778e

Zhangjian 4 månader sedan
förälder
incheckning
4675bf41e0

+ 1 - 0
Branch/NTP02/Furnace/FurnaceRT/Config/IO/NTP02/DeviceModelPM.xml

@@ -1089,6 +1089,7 @@
 		<IoTrigger id="TrigHeaterAllEnable" display="" schematicId="" unit="" aoTrigger="AO_HeaterAllEnable"/>
 		<IoTrigger id="TrigGasLineHeaterMemoryChange" display="" schematicId="" unit="" aoTrigger="AO_GasLineHeaterMemoryChange"/>
 		<IoTrigger id="TrigFOUPRobotActionCommand" display="" schematicId="" unit="" aoTrigger="AO_FOUPRobotActionCommand" aiFeedback="AI_FOUPRobotActionCommand"/>
+		<IoTrigger id="TrigWaferRobotActionCommand" display="" schematicId="" unit="" aoTrigger="AO_WaferRobotActionCommand" aiFeedback="AI_WaferRobotActionCommand"/>
 	</IoTriggers>
 	<IoSignalTowers  assembly="FurnaceRT" classType="FurnaceRT.Equipments.Systems.FurnaceSignalTower">
 		<IoSignalTower module="System" id ="SignalTower" display="Signal Tower" schematicId=""

+ 2 - 0
Branch/NTP02/Furnace/FurnaceRT/Config/IO/NTP02/_ioDefinePM.xml

@@ -2199,6 +2199,7 @@
       <AI_ITEM Index="2122" Name="AI_APCController0CL" BufferOffset="2122" Addr="D9244" Description="CL(air pressure exhaust threshold value 2) for Process Controller 10" />
       <AI_ITEM Index="2123" Name="AI_APCController10Offset" BufferOffset="2123" Addr="D9246" Description="OFFSET for Pocess Controller 10" />
       <AI_ITEM Index="2150" Name="AI_FOUPRobotActionCommand" BufferOffset="2150" Addr="D9300" Description="FOUP Robot Action Command" />
+      <AI_ITEM Index="2151" Name="AI_WaferRobotActionCommand" BufferOffset="2151" Addr="D9302" Description="Wafer Robot Action Command" />
     </Ana_In>
     <Ana_Out>
       <AO_ITEM Index="0" Name="AO_RFPowerSet" BufferOffset="0" Addr="D10000" Description="RF power set" />
@@ -3243,5 +3244,6 @@
       <AO_ITEM Index="1692" Name="AO_LAO2CheckSV" BufferOffset="1692" Addr="D13384" Description="LA_O2_Check_SV" />
       <AO_ITEM Index="1693" Name="AO_FOUPO2CheckSV" BufferOffset="1693" Addr="D13386" Description="FOUP_O2_Check_SV" />
       <AO_ITEM Index="2000" Name="AO_FOUPRobotActionCommand" BufferOffset="2000" Addr="D14000" Description="FOUP Robot Action Command" />
+      <AO_ITEM Index="2001" Name="AO_WaferRobotActionCommand" BufferOffset="2001" Addr="D14002" Description="Wafer Robot Action Command" />
     </Ana_Out>
   </IO_DEFINE>

+ 1 - 1
Branch/NTP02/Furnace/FurnaceRT/Equipments/PMs/RecipeExecutions/RecipeParser.cs

@@ -988,7 +988,7 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
                         {
                             if (recipeData[j].StepName == recipeData[i].JumpStepName)
                             {
-                                recipeData[i].JumpStepNo = i;
+                                recipeData[i].JumpStepNo = j;
                                 findJumpStep = true;
                                 break;
                             }

+ 37 - 0
Branch/NTP02/Furnace/FurnaceRT/Equipments/WaferRobots/WaferRobotModuleDevice.cs

@@ -29,19 +29,32 @@ namespace FurnaceRT.Equipments.WaferRobots
         public RobotBaseDevice WaferRobotDevice { get; set; }
         private List<AlarmEventItem> _triggeredAlarmList = new List<AlarmEventItem>();
         private int _alarmNumber;
+        public IoTrigger TrigActionCommand => _trigActionCommand;
         public IoAlarmSignal AlarmSignaRobotTPStatusWarning { get; set; }
         private IoTrigger _trigAlarmReset;
+        private IoTrigger _trigActionCommand;
         private IoAlarmSignal _alarmSignaRobotAlarm;
         private R_TRIG _alarmSignaRobotAlarmTrig = new R_TRIG();
+        private Dictionary<string, int> _actionCommand;
         public void InitDevice()
         {
             WaferRobotDevice = DEVICE.GetDevice<RobotBaseDevice>($"{ModuleName.WaferRobot}");
             AlarmSignaRobotTPStatusWarning = DEVICE.GetDevice<IoAlarmSignal>($"PM1.AlarmSignaWaferRobotTPStatusWarning");
             _alarmSignaRobotAlarm = DEVICE.GetDevice<IoAlarmSignal>($"PM1.AlarmSignaWaferRobotAlarm");
+            _trigActionCommand = DEVICE.GetDevice<IoTrigger>($"PM1.TrigWaferRobotActionCommand");
             _trigAlarmReset = DEVICE.GetDevice<IoTrigger>($"PM1.TrigWaferRobotAlarmReset");
             WaferManager.Instance.SubscribeLocation($"{ModuleName.WaferRobot}", 5);
             this.OnDeviceAlarmStateChanged += OnModuleDeviceAlarmStateChanged;
             WaferRobotDevice.OnDeviceAlarmStateChanged += OnModuleDeviceAlarmStateChanged;
+            _actionCommand = new Dictionary<string, int>()
+            {
+                {"C01.Pick",1 },
+                {"C01.Place",2 },
+                {"C02.Pick",3 },
+                {"C02.Place",4 },
+                {"C03.Pick",5 },
+                {"C03.Place",6 },
+            };
         }
         public void OnModuleDeviceAlarmStateChanged(string deviceId, AlarmEventItem alarmItem)
         {
@@ -126,5 +139,29 @@ namespace FurnaceRT.Equipments.WaferRobots
         {
             WaferRobotDevice.Stop();
         }
+        public void SetRobotActionCommand(ModuleName traget, EnumTransferType transferType)
+        {
+            if (!WaferRobotDevice.ModuleAssociateStationDic.ContainsKey(traget.ToString()))
+                return;
+
+            var station = WaferRobotDevice.ModuleAssociateStationDic[traget.ToString()];
+            if (!_actionCommand.ContainsKey($"{station}.{transferType}"))
+                return;
+            _trigActionCommand.SetAOTrigger(_actionCommand[$"{station}.{transferType}"], out _);
+        }
+        public bool CheckRobotActionCommand(ModuleName traget, EnumTransferType transferType)
+        {
+            if (!WaferRobotDevice.ModuleAssociateStationDic.ContainsKey(traget.ToString()))
+                return false;
+
+            var station = WaferRobotDevice.ModuleAssociateStationDic[traget.ToString()];
+            if (!_actionCommand.ContainsKey($"{station}.{transferType}"))
+                return false;
+            return Math.Abs(_trigActionCommand.AIValue - _actionCommand[$"{station}.{transferType}"]) < 0.001;
+        }
+        public void ResetRobotActionCommand()
+        {
+            _trigActionCommand?.SetAOTrigger(0, out _);
+        }
     }
 }

+ 38 - 0
Branch/NTP02/Furnace/FurnaceRT/Equipments/WaferRobots/WaferRobotPick.cs

@@ -23,6 +23,7 @@ namespace FurnaceRT.Equipments.WaferRobots
             RobotRequestWaferPresent,
             CheckCassetteInfoByRobotSensor,
             CheckBeforePick,
+            SetRobotActionCommand,
         }
 
         private ModuleName _source;
@@ -276,6 +277,7 @@ namespace FurnaceRT.Equipments.WaferRobots
 
         public void Abort()
         {
+            _waferRobotModule.ResetRobotActionCommand();
             _waferRobotModule.Stop();
             (Singleton<EquipmentManager>.Instance.Modules[_source] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_waferRobotModule.Module), _blade, _sourceSlot, EnumTransferType.Pick);
         }
@@ -290,6 +292,9 @@ namespace FurnaceRT.Equipments.WaferRobots
 
                 CheckBeforePick((int)RoutineStep.CheckBeforePick, _source, _sourceSlot, _blade);
 
+                if (_waferRobotModule.TrigActionCommand != null)
+                    SetRobotActionCommand((int)RoutineStep.SetRobotActionCommand, _source, _timeout);
+
                 Pick((int)RoutineStep.Pick, _source, _sourceSlot, _blade, _timeout);
 
                 //RobotRequestWaferPresent((int)RoutineStep.RobotRequestWaferPresent, _blade, _timeout);
@@ -302,10 +307,12 @@ namespace FurnaceRT.Equipments.WaferRobots
             }
             catch (RoutineFaildException ex)
             {
+                _waferRobotModule.ResetRobotActionCommand();
                 (Singleton<EquipmentManager>.Instance.Modules[_source] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_waferRobotModule.Module), _blade, _sourceSlot, EnumTransferType.Pick);
                 return Result.FAIL;
             }
 
+            _waferRobotModule.ResetRobotActionCommand();
             (Singleton<EquipmentManager>.Instance.Modules[_source] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_waferRobotModule.Module), _blade, _sourceSlot, EnumTransferType.Pick);
             Notify("Finished");
             return Result.DONE;
@@ -594,5 +601,36 @@ namespace FurnaceRT.Equipments.WaferRobots
                     throw (new RoutineBreakException());
             }
         }
+        private void SetRobotActionCommand(int id, ModuleName source, int timeout)
+        {
+            _routineStep = (RoutineStep)Enum.Parse(typeof(RoutineStep), id.ToString());
+            Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
+            {
+                Notify($"Set robot action command target position {source}");
+
+                _waferRobotModule.SetRobotActionCommand(source, EnumTransferType.Pick);
+
+                return true;
+            }, () =>
+            {
+                return _waferRobotModule.CheckRobotActionCommand(source, EnumTransferType.Pick);
+            }, timeout * 1000);
+
+            if (ret.Item1)
+            {
+                if (ret.Item2 == Result.FAIL)
+                {
+                    _waferRobotModule.PickWaferFailAlarm.Set($"pick from {source} failed for robot action command interlock");
+                    throw (new RoutineFaildException());
+                }
+                else if (ret.Item2 == Result.TIMEOUT) //timeout
+                {
+                    _waferRobotModule.PickWaferTimeoutAlarm.Set($"timeout over {timeout} seconds");
+                    throw (new RoutineFaildException());
+                }
+                else
+                    throw (new RoutineBreakException());
+            }
+        }
     }
 }

+ 38 - 0
Branch/NTP02/Furnace/FurnaceRT/Equipments/WaferRobots/WaferRobotPlace.cs

@@ -24,6 +24,7 @@ namespace FurnaceRT.Equipments.WaferRobots
             RobotRequestWaferPresent,
             CheckWaferInfoByRobotSensor,
             CheckBeforePlace,
+            SetRobotActionCommand,
         }
 
         private ModuleName _destination;
@@ -279,6 +280,7 @@ namespace FurnaceRT.Equipments.WaferRobots
 
         public void Abort()
         {
+            _waferRobotModule.ResetRobotActionCommand();
             _waferRobotModule.Stop();
             (Singleton<EquipmentManager>.Instance.Modules[_destination] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_waferRobotModule.Module), _blade, _destinationSlot, EnumTransferType.Place);
         }
@@ -293,6 +295,9 @@ namespace FurnaceRT.Equipments.WaferRobots
 
                 CheckBeforePlace((int)RoutineStep.CheckBeforePlace, _destination, _destinationSlot, _blade);
 
+                if (_waferRobotModule.TrigActionCommand != null)
+                    SetRobotActionCommand((int)RoutineStep.SetRobotActionCommand, _destination, _timeout);
+
                 Place((int)RoutineStep.Place, _destination, _destinationSlot, _blade, _timeout);
 
                 //RobotRequestWaferPresent((int)RoutineStep.RobotRequestWaferPresent, _blade, _timeout);
@@ -305,10 +310,12 @@ namespace FurnaceRT.Equipments.WaferRobots
             }
             catch (RoutineFaildException ex)
             {
+                _waferRobotModule.ResetRobotActionCommand();
                 (Singleton<EquipmentManager>.Instance.Modules[_destination] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_waferRobotModule.Module), _blade, _destinationSlot, EnumTransferType.Place);
                 return Result.FAIL;
             }
 
+            _waferRobotModule.ResetRobotActionCommand();
             (Singleton<EquipmentManager>.Instance.Modules[_destination] as ITransferTarget)?.NoteTransferStop(ModuleHelper.Converter(_waferRobotModule.Module), _blade, _destinationSlot, EnumTransferType.Place);
 
             Notify("Finished");
@@ -596,5 +603,36 @@ namespace FurnaceRT.Equipments.WaferRobots
                     throw (new RoutineBreakException());
             }
         }
+        private void SetRobotActionCommand(int id, ModuleName source, int timeout)
+        {
+            _routineStep = (RoutineStep)Enum.Parse(typeof(RoutineStep), id.ToString());
+            Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
+            {
+                Notify($"Set robot action command target position {source}");
+
+                _waferRobotModule.SetRobotActionCommand(source, EnumTransferType.Place);
+
+                return true;
+            }, () =>
+            {
+                return _waferRobotModule.CheckRobotActionCommand(source, EnumTransferType.Place);
+            }, timeout * 1000);
+
+            if (ret.Item1)
+            {
+                if (ret.Item2 == Result.FAIL)
+                {
+                    _waferRobotModule.PlaceWaferFailAlarm.Set($"place to {source} failed for robot action command interlock");
+                    throw (new RoutineFaildException());
+                }
+                else if (ret.Item2 == Result.TIMEOUT) //timeout
+                {
+                    _waferRobotModule.PlaceWaferTimeoutAlarm.Set($"timeout over {timeout} seconds");
+                    throw (new RoutineFaildException());
+                }
+                else
+                    throw (new RoutineBreakException());
+            }
+        }
     }
 }

+ 2 - 2
Branch/NTP02/Furnace/FurnaceRT/Properties/AssemblyInfo.cs

@@ -51,5 +51,5 @@ using System.Windows;
 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
 // 方法是按如下所示使用“*”: :
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.0.2.67")]
-[assembly: AssemblyFileVersion("0.0.2.67")]
+[assembly: AssemblyVersion("0.0.2.68")]
+[assembly: AssemblyFileVersion("0.0.2.68")]

+ 3 - 0
Branch/NTP02/Furnace/FurnaceRT/ReleaseNotes.txt

@@ -6,6 +6,9 @@
 					 Furnace 系统更新历史记录
 
 ---------------------------------------------------------------------------------
+2025-2-10 version 0.0.2.68
+1.增加wafer robot动作前的command写入和检查
+
 2025-1-21 version 0.0.2.67
 1.更新Stocker的command ao
 

+ 2 - 0
Branch/NTP02/Furnace/FurnaceSimulator/Config/_ioDefinePM.xml

@@ -2199,6 +2199,7 @@
 		<AI_ITEM Index="2122" Name="AI_APCController0CL" BufferOffset="2122" Addr="D9244" Description="CL(air pressure exhaust threshold value 2) for Process Controller 10" />
 		<AI_ITEM Index="2123" Name="AI_APCController10Offset" BufferOffset="2123" Addr="D9246" Description="OFFSET for Pocess Controller 10" />
 		<AI_ITEM Index="2150" Name="AI_FOUPRobotActionCommand" BufferOffset="2150" Addr="D9300" Description="FOUP Robot Action Command" />
+		<AI_ITEM Index="2151" Name="AI_WaferRobotActionCommand" BufferOffset="2151" Addr="D9302" Description="Wafer Robot Action Command" />
 	</Ana_In>
 	<Ana_Out>
 		<AO_ITEM Index="0" Name="AO_RFPowerSet" BufferOffset="0" Addr="D10000" Description="RF power set" />
@@ -3243,5 +3244,6 @@
 		<AO_ITEM Index="1692" Name="AO_LAO2CheckSV" BufferOffset="1692" Addr="D13384" Description="LA_O2_Check_SV" />
 		<AO_ITEM Index="1693" Name="AO_FOUPO2CheckSV" BufferOffset="1693" Addr="D13386" Description="FOUP_O2_Check_SV" />
 		<AO_ITEM Index="2000" Name="AO_FOUPRobotActionCommand" BufferOffset="2000" Addr="D14000" Description="FOUP Robot Action Command" />
+		<AO_ITEM Index="2001" Name="AO_WaferRobotActionCommand" BufferOffset="2001" Addr="D14002" Description="Wafer Robot Action Command" />
 	</Ana_Out>
 </IO_DEFINE>

+ 2 - 2
Branch/NTP02/Furnace/FurnaceUI/Properties/AssemblyInfo.cs

@@ -54,5 +54,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.0.2.67")]
-[assembly: AssemblyFileVersion("0.0.2.67")]
+[assembly: AssemblyVersion("0.0.2.68")]
+[assembly: AssemblyFileVersion("0.0.2.68")]