123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740 |
- using Aitex.Core.RT.Log;
- using Aitex.Core.RT.SCCore;
- using Aitex.Core.Utilities;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.Text;
- using System.Threading.Tasks;
- namespace MECF.Framework.Common.Equipment
- {
- /// <summary>
- /// 在框架中,Module指具备放置Wafer的单元
- /// </summary>
- [DataContract]
- [Serializable]
- public enum ModuleName
- {
- [EnumMember]
- System = 0,
- [EnumMember]
- LP1,
- [EnumMember]
- LP2,
- [EnumMember]
- LP3,
- [EnumMember]
- LP4,
- [EnumMember]
- LP5,
- [EnumMember]
- LP6,
- [EnumMember]
- LP7,
- [EnumMember]
- LP8,
- [EnumMember]
- LP9,
- [EnumMember]
- LP10,
- //robot modules
- //[EnumMember]
- //Robot,
- [EnumMember]
- VaccumRobot,
- [EnumMember]
- LoadRobot,
- [EnumMember]
- EfemRobot,
- [EnumMember]
- TMRobot,
- //upenders
- [EnumMember]
- Upender,
- //efem
- [EnumMember]
- EFEM,
- //aligners
- [EnumMember]
- Aligner,
- [EnumMember]
- Aligner1,
- [EnumMember]
- Aligner2,
- [EnumMember]
- AlignerA,
- [EnumMember]
- AlignerB,
- //load locks
- [EnumMember]
- LL1,
- [EnumMember]
- LL2,
- [EnumMember]
- LL3,
- [EnumMember]
- LL4,
- [EnumMember]
- LL5,
- [EnumMember]
- LL6,
- [EnumMember]
- LL7,
- [EnumMember]
- LL8,
- //load locks
- [EnumMember]
- LLA,
- [EnumMember]
- LLB,
- [EnumMember]
- LLC,
- [EnumMember]
- LLD,
- [EnumMember]
- LLE,
- [EnumMember]
- LLF,
- [EnumMember]
- LLG,
- [EnumMember]
- LLH,
- [EnumMember]
- VCE1,
- [EnumMember]
- VCE2,
- [EnumMember]
- VCEA,
- [EnumMember]
- VCEB,
- //transfer modules
- [EnumMember]
- TM,
- [EnumMember]
- Cooling1,
- [EnumMember]
- Cooling2,
- //buffers
- [EnumMember]
- Buffer,
- [EnumMember]
- Buffer1,
- [EnumMember]
- Buffer2,
- [EnumMember]
- Buffer3,
- [EnumMember]
- Buffer4,
- [EnumMember]
- Buffer5,
- [EnumMember]
- Buffer6,
-
- //PMs
- [EnumMember]
- PM,
- [EnumMember]
- PM1,
- [EnumMember]
- PM2,
- [EnumMember]
- PM3,
- [EnumMember]
- PM4,
- [EnumMember]
- PM5,
- [EnumMember]
- PM6,
- [EnumMember]
- PM7,
- [EnumMember]
- PM8,
- [EnumMember]
- PMA,
- [EnumMember]
- PMB,
- [EnumMember]
- PMC,
- [EnumMember]
- PMD,
- //PMs
- [EnumMember]
- Spin1L,
- [EnumMember]
- Spin1H,
- [EnumMember]
- Spin2L,
- [EnumMember]
- Spin2H,
- [EnumMember]
- Spin3L,
- [EnumMember]
- Spin3H,
- [EnumMember]
- Spin4L,
- [EnumMember]
- Spin4H,
- [EnumMember]
- Spin5L,
- [EnumMember]
- Spin5H,
- [EnumMember]
- Spin6L,
- [EnumMember]
- Spin6H,
- [EnumMember]
- LDULD,
- [EnumMember]
- BufferOut,
- [EnumMember]
- BufferIn,
- [EnumMember]
- Dryer,
- [EnumMember]
- QDR,
- [EnumMember]
- Robot,
- [EnumMember]
- Handler,
- [EnumMember]
- WIDReader1,
- [EnumMember]
- WIDReader2,
- [EnumMember]
- LL1IN,
- [EnumMember]
- LL1OUT,
- [EnumMember]
- LL2IN,
- [EnumMember]
- LL2OUT,
- [EnumMember]
- TurnOverStation,
- [EnumMember]
- Host,
- [EnumMember]
- PTR,
- [EnumMember]
- Cooling,
- [EnumMember]
- Cassette,
- [EnumMember]
- CassInnerL,
- [EnumMember]
- CassInnerR,
- [EnumMember]
- CassOuterL,
- [EnumMember]
- CassOuterR,
- [EnumMember]
- CassAL,
- [EnumMember]
- CassAR,
- [EnumMember]
- CassBL,
- [EnumMember]
- CassBR,
- [EnumMember]
- Shuttle,
- [EnumMember]
- CoolingBuffer1,
- [EnumMember]
- CoolingBuffer2,
- [EnumMember]
- LoadLock,
- [EnumMember]
- SMIFLeft,
- [EnumMember]
- SMIFRight,
- [EnumMember]
- SMIFA,
- [EnumMember]
- SMIFB,
- [EnumMember]
- SPM1,
- [EnumMember]
- SPM2,
- [EnumMember]
- BRM1,
- [EnumMember]
- BRM2,
- [EnumMember]
- CCU,
- [EnumMember]
- Buffer7,
- [EnumMember]
- Buffer8,
- [EnumMember]
- Robot1,
- [EnumMember]
- Robot2,
- [EnumMember]
- CassetteRobot,
- [EnumMember]
- SignalTower,
- [EnumMember]
- TurnStation,
- [EnumMember]
- InternalCassette1,
- [EnumMember]
- InternalCassette2,
- [EnumMember]
- InternalCassette3,
- [EnumMember]
- InternalCassette4,
- [EnumMember]
- InternalCassette5,
- [EnumMember]
- InternalCassette6,
- [EnumMember]
- InternalCassette7,
- [EnumMember]
- InternalCassette8,
- [EnumMember]
- InternalCassette9,
- [EnumMember]
- InternalCassette10,
- [EnumMember]
- Prs1,
- [EnumMember]
- Prs2,
- [EnumMember]
- Prs3,
- [EnumMember]
- Prs4,
-
- [EnumMember]
- PerHeat,
- [EnumMember]
- StageA,
- [EnumMember]
- StageB,
- }
- public static class ModuleHelper
- {
- public static bool IsTurnOverStation(ModuleName unit)
- {
- return unit == ModuleName.TurnOverStation;
- }
- public static bool IsLoadPort(ModuleName unit)
- {
- return unit == ModuleName.LP1
- || unit == ModuleName.LP2
- || unit == ModuleName.LP3
- || unit == ModuleName.LP4
- || unit == ModuleName.LP5
- || unit == ModuleName.LP6
- || unit == ModuleName.LP7
- || unit == ModuleName.LP8
- || unit == ModuleName.LP9
- || unit == ModuleName.LP10;
- }
- public static bool IsCoolingBuffer(ModuleName unit)
- {
- return unit == ModuleName.CoolingBuffer1
- || unit == ModuleName.CoolingBuffer2;
- }
- public static bool IsCassette(ModuleName unit)
- {
- return unit == ModuleName.CassAL
- || unit == ModuleName.CassAR
- || unit == ModuleName.CassBL
- || unit == ModuleName.CassBR
- || unit == ModuleName.Cassette;
- }
- public static bool IsBuffer(ModuleName unit)
- {
- return unit == ModuleName.Buffer
- || unit == ModuleName.Buffer1
- || unit == ModuleName.Buffer2
- || unit == ModuleName.Buffer3
- || unit == ModuleName.Buffer4
- || unit == ModuleName.Buffer5
- || unit == ModuleName.Buffer6
- || unit == ModuleName.Buffer7
- || unit == ModuleName.Buffer8
- || unit == ModuleName.BufferIn
- || unit == ModuleName.BufferOut;
- }
- public static bool IsPm(string unit)
- {
- return IsPm(ModuleHelper.Converter(unit));
- }
- public static bool IsPm(ModuleName unit)
- {
- return unit == ModuleName.PM1
- || unit == ModuleName.PM2
- || unit == ModuleName.PM3
- || unit == ModuleName.PM4
- || unit == ModuleName.PM5
- || unit == ModuleName.PM6
- || unit == ModuleName.PM7
- || unit == ModuleName.PM8
- || unit == ModuleName.Spin1L
- || unit == ModuleName.Spin1H
- || unit == ModuleName.Spin2L
- || unit == ModuleName.Spin2H
- || unit == ModuleName.Spin3L
- || unit == ModuleName.Spin3H
- || unit == ModuleName.Spin4L
- || unit == ModuleName.Spin4H
- || unit == ModuleName.PM
- || unit == ModuleName.PMA
- || unit == ModuleName.PMB
- || unit == ModuleName.PMC
- || unit == ModuleName.PMD
- || unit == ModuleName.SPM1
- || unit == ModuleName.SPM2
- || unit == ModuleName.BRM1
- || unit == ModuleName.BRM2
- ;
- }
-
- public static bool IsLoadLock(string unit)
- {
- return IsLoadLock(ModuleHelper.Converter(unit));
- }
- public static bool IsLoadLock(ModuleName unit)
- {
- return unit == ModuleName.LLA
- || unit == ModuleName.LLB
- || unit == ModuleName.LL1
- || unit == ModuleName.LL1IN
- || unit == ModuleName.LL1OUT
- || unit == ModuleName.LL2
- || unit == ModuleName.LL2IN
- || unit == ModuleName.LL2OUT
- || unit == ModuleName.LL3
- || unit == ModuleName.LL4
- || unit == ModuleName.LL5
- || unit == ModuleName.LL6
- || unit == ModuleName.LL7
- || unit == ModuleName.LL8
- || unit == ModuleName.LLC
- || unit == ModuleName.LLD
- || unit == ModuleName.LoadLock
- || unit == ModuleName.VCEA
- || unit == ModuleName.VCEB;
- }
- public static bool IsCooling(string unit)
- {
- return IsCooling(ModuleHelper.Converter(unit));
- }
- public static bool IsCooling(ModuleName unit)
- {
- return unit == ModuleName.Cooling
- || unit == ModuleName.Cooling1
- || unit == ModuleName.Cooling2;
- }
- public static bool IsAligner(string unit)
- {
- return IsAligner(ModuleHelper.Converter(unit));
- }
-
- public static bool IsAligner(ModuleName unit)
- {
- return unit == ModuleName.Aligner
- || unit == ModuleName.Aligner1
- || unit == ModuleName.Aligner2;
- }
- public static bool IsRobot(string unit)
- {
- return IsRobot(ModuleHelper.Converter(unit));
- }
- public static bool IsRobot(ModuleName unit)
- {
- return unit.ToString().Contains("Robot");
- }
- public static bool IsEfemRobot(string unit)
- {
- return IsEfemRobot(ModuleHelper.Converter(unit));
- }
- public static bool IsEfem(ModuleName unit)
- {
- return unit == ModuleName.EFEM;
- }
- public static bool IsEfemRobot(ModuleName unit)
- {
- return unit == ModuleName.EfemRobot;
- }
- public static bool IsTMRobot(string unit)
- {
- return IsTMRobot(ModuleHelper.Converter(unit));
- }
- public static bool IsTM(ModuleName unit)
- {
- return unit == ModuleName.TM;
- }
- public static bool IsTMRobot(ModuleName unit)
- {
- return unit == ModuleName.TMRobot;
- }
- public static bool IsTurnStation(ModuleName unit)
- {
- return unit == ModuleName.TurnStation;
- }
- public static bool IsVCE(string unit)
- {
- return IsVCE(ModuleHelper.Converter(unit));
- }
- public static bool IsVCE(ModuleName unit)
- {
- return unit == ModuleName.VCE1|| unit == ModuleName.VCE2|| unit == ModuleName.VCEA|| unit == ModuleName.VCEB;
- }
- public static string GetAbbr(ModuleName module)
- {
- switch (module)
- {
- case ModuleName.Aligner: return "PA";
- case ModuleName.Robot: return "RB";
- default: return module.ToString();
- }
- }
- public static string GetE84LpName(string device)
- {
- string e84 = string.Empty;
- switch(device)
- {
- case "P1":
- case "LP1":
- e84 = "Loadport1E84";
- break;
- case "P2":
- case "LP2":
- e84 = "Loadport2E84";
- break;
- case "P3":
- case "LP3":
- e84 = "Loadport3E84";
- break;
- case "P4":
- case "LP4":
- e84 = "Loadport4E84";
- break;
- case "P5":
- case "LP5":
- e84 = "Loadport5E84";
- break;
- case "P6":
- case "LP6":
- e84 = "Loadport6E84";
- break;
- case "P7":
- case "LP7":
- e84 = "Loadport7E84";
- break;
- case "P8":
- case "LP8":
- e84 = "Loadport8E84";
- break;
- case "P9":
- case "LP9":
- e84 = "Loadport9E84";
- break;
- case "P10":
- case "LP10":
- e84 = "Loadport10E84";
- break;
- }
- return e84;
- }
-
- public static ModuleName Converter(string module)
- {
- return (ModuleName) Enum.Parse(typeof(ModuleName), module);
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="index">0 based</param>
- /// <returns></returns>
- public static ModuleName GetLoadPort(int index)
- {
- ModuleName[] lps = new ModuleName[]
- {
- ModuleName.LP1, ModuleName.LP2, ModuleName.LP3, ModuleName.LP4, ModuleName.LP5,
- ModuleName.LP6, ModuleName.LP7, ModuleName.LP8, ModuleName.LP9, ModuleName.LP10,
- };
- return lps[index];
- }
- private static List<ModuleName> _lstModules = new List<ModuleName>();
- private static readonly object _lock = new object();
- public static bool IsInstalled(ModuleName module)
- {
- if (_lstModules.Count == 0)
- {
- LoadModules();
- }
- return _lstModules.Contains(module);
- }
- public static void LoadModules()
- {
- lock (_lock)
- {
- try
- {
- EnumLoop<ModuleName>.ForEach((item) =>
- {
- if(SC.GetValueOrDefault<bool>($"System.SetUp.{item}.IsInstalled") && !_lstModules.Contains(item))
- _lstModules.Add(item);
- });
- }
- catch (Exception e)
- {
- LOG.Info($"Loading intalled module error, please check the config item: System.InstalledModules,{e}");
- }
- }
- }
- }
- public class ModuleNameString
- {
- public const string System = "System";
- public const string LDULD = "LDULD";
- public const string BufferOut = "BufferOut";
- public const string BufferIn = "BufferIn";
- public const string Dryer = "Dryer";
- public const string QDR = "QDR";
- public const string Robot = "Robot";
- public const string Handler = "Handler";
- public static ModuleName ToEnum(string value)
- {
- return (ModuleName)Enum.Parse(typeof(ModuleName), value, true);
- }
- }
- }
|