Browse Source

1. Add FlipTask and Flipper ModuleName parse;
2. Revise ioDefine mistake(DI_EFEMSideDoorOpened)

niuyx 3 weeks ago
parent
commit
03d8760e29

+ 1 - 1
Jet/Jet_001_2P_Jet/EfemRT/Config/2LPJet006/_ioDefineCard1.xml

@@ -17,7 +17,7 @@
 		<DI_ITEM Index="32" BufferOffset="32" Addr="DI-32" Name="DI_VACPressureSW" Description="VAC Pressure SW"/>
 		<DI_ITEM Index="33" BufferOffset="33" Addr="DI-33" Name="DI_IONCDAPressureSW" Description="ION CDA Pressure SW"/>
 		<DI_ITEM Index="34" BufferOffset="34" Addr="DI-34" Name="DI_IONAlarmSignal" Description="ION ALARM SIGNAL"/>
-		<DI_ITEM Index="35" BufferOffset="35" Addr="DI-35" Name="DI_EFEMSideDoorClosed" Description="EFEM SIDE DOOR CLOSED"/>
+		<DI_ITEM Index="35" BufferOffset="35" Addr="DI-35" Name="DI_EFEMSideDoorOpened" Description="EFEM SIDE DOOR OPENED"/>
 		<DI_ITEM Index="36" BufferOffset="36" Addr="DI-36" Name="DI_PMASystemInterlock" Description="PMA System Interlock (Door Opened)"/>
 		<DI_ITEM Index="37" BufferOffset="37" Addr="DI-37" Name="DI_PMBSystemInterlock" Description="PMB System Interlock (Door Opened)"/>
 		<DI_ITEM Index="38" BufferOffset="38" Addr="DI-38" Name="DI_PA/FLPDoorClosed" Description="PA/FLP Door Closed"/>

+ 1 - 1
Jet/Jet_001_2P_Jet/EfemRT/Devices/DeviceManager.cs

@@ -473,7 +473,7 @@ namespace EFEM.RT.Devices
             //Buffer Device Initialize
             if (!BufferIsDisable)
             {
-                BufferStation buffer = new Buffer("System", "Buffer", BufferSlotCount, llDoorOpen[0]);//Normal Buffer
+                BufferStation buffer = new Buffer("System", "Buffer", BufferSlotCount, null);//Normal Buffer
                 AddCustomDevice(buffer, "BufferStation", buffer.GetType());
             }
             if (!CoolingBuffer1IsDisable)

+ 1 - 0
Jet/Jet_001_2P_Jet/EfemRT/EfemRT.csproj

@@ -186,6 +186,7 @@
     <Compile Include="Systems\XmlConfig.cs" />
     <Compile Include="Tasks\AbortTask.cs" />
     <Compile Include="Tasks\AlignTask.cs" />
+    <Compile Include="Tasks\FlipTask.cs" />
     <Compile Include="Tasks\LiftTask.cs" />
     <Compile Include="Tasks\MpntTask.cs" />
     <Compile Include="Tasks\QueryWaferMappingTask.cs" />

+ 7 - 0
Jet/Jet_001_2P_Jet/EfemRT/Modules/RouteManager.cs

@@ -29,6 +29,7 @@ using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts.LoadPortBase;
 using Aitex.Core.RT.Log;
 using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.BufferStations;
 using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Flipper.FlipperBase;
+using static EFEM.RT.Devices.FlipperEntity;
 
 namespace EFEM.RT.Modules
 {
@@ -265,10 +266,14 @@ namespace EFEM.RT.Modules
         public bool IsFlipperDisable { get; set; }
 
         #endregion
+
+        #region Flipper
         /// <summary>
         /// Flipper Entity
         /// </summary>
         public FlipperEntity FLPEntity => _flp;
+        #endregion
+
 
         public RouteManager()
         {
@@ -2540,5 +2545,7 @@ namespace EFEM.RT.Modules
         }
 
         #endregion
+
+      
     }
 }

+ 13 - 1
Jet/Jet_001_2P_Jet/EfemRT/Servers/Check.cs

@@ -598,6 +598,10 @@ namespace EFEM.RT
             {
                 unit = DeviceName.Buffer;
             }
+            else if (args.Equals("FLIPPER"))
+            {
+                unit = DeviceName.Flipper;
+            }
             return unit;
         }
 
@@ -732,7 +736,13 @@ namespace EFEM.RT
                     return true;
                 }
             }
-
+            else if (args.StartsWith("FLIPPER"))
+            {
+                target = ModuleName.Flipper;
+                slot = 1;
+                return true;
+                
+            }
             return false;
         }
 
@@ -816,6 +826,8 @@ namespace EFEM.RT
                 return null;
             return result;
         }
+
+
     }
 
 

+ 2 - 0
Jet/Jet_001_2P_Jet/EfemRT/Servers/Protocol.cs

@@ -67,6 +67,8 @@ namespace Efem.Protocol
         SLOTSNUM,  //LP slotsnum, GET, SET, ACK, INF
 
         WAFERSIZE, //LP WAFERSIZE, GET, SET, ACK, INF
+
+        FLIP,      //Flipper TurnOver, MOV, ACK, INF (add) 
     }
 
     public enum EfemEventType

+ 65 - 0
Jet/Jet_001_2P_Jet/EfemRT/Servers/ServerModule.cs

@@ -6,6 +6,7 @@ using Aitex.Core.Util;
 using Aitex.Sorter.Common;
 using Efem.Protocol;
 using EFEM.RT.Devices.Aligner;
+using EFEM.RT.Devices.Flipper;
 using EFEM.RT.Modules;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.BufferStations;
@@ -693,6 +694,63 @@ namespace EFEM.RT.Tasks
         }
     }
 
+    public class FlipperStationServerModule : IServerModule
+    {
+        public bool IsLinkOk
+        {
+            get { return _flipper != null; }
+        }
+
+        public bool Busy
+        {
+            get { return false; }
+        }
+
+        public bool Error
+        {
+            get { return false; }
+        }
+
+        public bool Disabled { get; set; }
+        public bool Initialized { get; set; }
+        public bool OriginSearched { get; set; }
+        public bool InUsed { get; set; }
+        public string Name { get; set; }
+
+        public FlipperBase GetDevice()
+        {
+            return _flipper;
+        }
+
+        protected FlipperBase _flipper = null;
+
+        public FlipperStationServerModule(string name)
+        {
+            OriginSearched = true;
+            Initialized = true;
+            Name = name;
+            _flipper = DEVICE.GetDevice<JetFlipper>(name);
+        }
+
+        public bool Init(out string reason)
+        {
+            reason = string.Empty;
+            return true;
+        }
+
+        public bool Home(out string reason)
+        {
+            reason = string.Empty;
+            return true;
+        }
+
+        public bool Reset(out string reason)
+        {
+            reason = string.Empty;
+            return true;
+        }
+    }
+
     public class EntityFactory
     {
         private SystemServerModule _system = null;
@@ -720,6 +778,8 @@ namespace EFEM.RT.Tasks
         private BufferStationServerModule _bufferStation1 = null;
         private BufferStationServerModule _bufferStation2 = null;
 
+        private FlipperStationServerModule _flipper = null;
+
         public EntityFactory()
         {
             _system = new SystemServerModule(DeviceName.System);
@@ -746,6 +806,8 @@ namespace EFEM.RT.Tasks
             _bufferStation = new BufferStationServerModule(DeviceName.Buffer);
             _bufferStation1 = new BufferStationServerModule(DeviceName.Buffer1);
             _bufferStation2 = new BufferStationServerModule(DeviceName.Buffer2);
+
+            _flipper = new FlipperStationServerModule(DeviceName.Flipper);
         }
 
         public IServerModule GetEntity(string name)
@@ -842,6 +904,9 @@ namespace EFEM.RT.Tasks
 
                 case DeviceName.Buffer:
                     return _bufferStation;
+
+                case DeviceName.Flipper:
+                    return _flipper;
             }
 
             return null;

+ 3 - 0
Jet/Jet_001_2P_Jet/EfemRT/Servers/Task.cs

@@ -252,6 +252,9 @@ namespace EFEM.RT
             _tasks["GET.TRANSREQ"] = new TaskT<QueryTransferTask>(EfemCommandType.GET, EfemCommand.TRANSREQ);
 
             _tasks["GET.STATE"] = new TaskT<QueryStateTask>(EfemCommandType.GET, EfemCommand.STATE);
+
+            _tasks["MOV.FLIP"] = new TaskT<FlipTask>(EfemCommandType.MOV, EfemCommand.FLIP);
+
            // _tasks["GET.READID"] = new TaskT<QueryStateTask>(EfemCommandType.GET, EfemCommand.READID);
         }
 

+ 112 - 0
Jet/Jet_001_2P_Jet/EfemRT/Tasks/FlipTask.cs

@@ -0,0 +1,112 @@
+using Aitex.Core.RT.Device;
+using Aitex.Core.RT.SCCore;
+using Aitex.Core.Util;
+using EFEM.RT.Devices;
+using EFEM.RT.Devices.Flipper;
+using EFEM.RT.Modules;
+using MECF.Framework.Common.Equipment;
+using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts.LoadPortBase;
+using SciChart.Core.AttachedProperties;
+
+namespace EFEM.RT.Tasks
+{
+    public class FlipTask : CheckImp, ITask
+    {
+        private string device;
+        public FlipTask()
+        {
+        }
+        public bool Execute(out string result, params string[] args)
+        {
+            device = ModuleName.Flipper.ToString();
+            JetFlipper flipper = DEVICE.GetDevice<JetFlipper>(device);
+            if (flipper == null || SC.ContainsItem("System.FlipperDisable") ? SC.GetValue<bool>("System.FlipperDisable") : true)
+            {
+                result = "FLP NULL";
+                return false;
+            }
+           
+            if (!Check<NoReadyPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<NoInitCompletedPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<NoOriginCompletedPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<EMSPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<ErrorPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<BusyPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<HoldPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<RemovePolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<MaintenancePolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<LinkPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<ArmExtendPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (!Check<PowerDownPolicy>(device, out result))
+            {
+                return false;
+            }
+
+            if (!Check<NoPodPolicy>(device, out result))
+            {
+                return false;
+            }
+            if (flipper.IsBusy)
+            {
+                result = "FLP BUSY";
+                return false;
+            }
+            //需进行反转情况:
+            //1. 目标正面,当前在反面
+            //2. 目标反面,当前在正面
+            //3. 总是反转
+            if ((args[0].Equals("FaceUp") && flipper.IsFlipperHorizontal) || (args[0].Equals("FaceDown") && flipper.IsFlipperOrigin) || args[0].Equals("AlwaysReverse"))
+            {
+                return Singleton<RouteManager>.Instance.FLPEntity.CheckToPostMsg(FlipperEntity.FlipperMSG.TurnOver);
+            }
+            
+            return true;
+        }
+        public bool? Monitor(out string result, params string[] args)
+        {
+            result = string.Empty;
+            JetFlipper flipper = DEVICE.GetDevice<JetFlipper>(device);
+            if (Singleton<RouteManager>.Instance.FLPEntity.IsIdle && !flipper.IsBusy)
+            {
+                return true;
+            }
+
+            return null;
+        }
+    }
+
+
+}

+ 1 - 1
Jet/Jet_001_2P_Jet/EfemSimulator/Config/_ioDefine3.xml

@@ -17,7 +17,7 @@
 		<DI_ITEM Index="32" BufferOffset="32" Addr="DI-32" Name="DI_VACPressureSW" Description="VAC Pressure SW"/>
 		<DI_ITEM Index="33" BufferOffset="33" Addr="DI-33" Name="DI_IONCDAPressureSW" Description="ION CDA Pressure SW"/>
 		<DI_ITEM Index="34" BufferOffset="34" Addr="DI-34" Name="DI_IONAlarmSignal" Description="ION ALARM SIGNAL"/>
-		<DI_ITEM Index="35" BufferOffset="35" Addr="DI-35" Name="DI_EFEMSideDoorClosed" Description="EFEM SIDE DOOR CLOSED"/>
+		<DI_ITEM Index="35" BufferOffset="35" Addr="DI-35" Name="DI_EFEMSideDoorOpened" Description="EFEM SIDE DOOR OPENED"/>
 		<DI_ITEM Index="36" BufferOffset="36" Addr="DI-36" Name="DI_PMASystemInterlock" Description="PMA System Interlock (Door Opened)"/>
 		<DI_ITEM Index="37" BufferOffset="37" Addr="DI-37" Name="DI_PMBSystemInterlock" Description="PMB System Interlock (Door Opened)"/>
 		<DI_ITEM Index="38" BufferOffset="38" Addr="DI-38" Name="DI_PA/FLPDoorClosed" Description="PA/FLP Door Closed"/>

+ 1 - 1
Jet/Jet_001_2P_Jet/EfemSimulator/SimulatorSystem.cs

@@ -54,7 +54,7 @@ namespace EfemSimulator.SimulatorIo
             IO.DI["DI_VACPressureSW"].Value = true;
             IO.DI["DI_IONCDAPressureSW"].Value = true;
             IO.DI["DI_IONAlarmSignal"].Value = true;
-            IO.DI["DI_EFEMSideDoorClosed"].Value = true;
+            IO.DI["DI_EFEMSideDoorOpened"].Value = true;
             IO.DI["DI_RunMode"].Value = false;
             IO.DI["DI_EFEMPowerON"].Value = true;
             IO.DI["DI_PA/FLPDoorClosed"].Value = true;