123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107 |
- using System;
- using System.Collections.Generic;
- using System.Windows;
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using Bolt.Toolkit.Wpf.Data;
- using Bolt.Toolkit.Wpf.Data.Enum;
- using Caliburn.Micro.Core;
- using MECF.Framework.Common.CommonData;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.OperationCenter;
- using VirgoCommon;
- using VirgoUI.Client.Models.Operate;
- using VirgoUI.Client.Models.Platform.LoadPort;
- using VirgoUI.Client.Models.Sys;
- namespace VirgoUI.Client.Models.Platform.EFEM
- {
- public class EFEMViewModel : UiViewModelBase
- {
- private int MenuPermission;
- #region Properties
- [Subscription("LP1.Status")]
- public string LP1Status { get; set; }
- public string LP1StatusBackground
- {
- get { return GetUnitStatusBackground(LP1Status); }
- }
- [Subscription("LP1.IsMapped")]
- public bool IsLP1Mapped { get; set; }
- [Subscription("LP2.Status")]
- public string LP2Status { get; set; }
- public string LP2StatusBackground
- {
- get { return GetUnitStatusBackground(LP2Status); }
- }
- [Subscription("LP2.IsMapped")]
- public bool IsLP2Mapped { get; set; }
- [Subscription("EFEM.FsmState")]
- public string EfemStatus { get; set; }
- public string EfemStatusBackground
- {
- get { return GetUnitStatusBackground(EfemStatus); }
- }
- [Subscription("PMA.IsAutoMode")]
- public bool PMAIsAutoMode { get; set; }
- [Subscription("PMB.IsAutoMode")]
- public bool PMBIsAutoMode { get; set; }
- [Subscription("PMA.IsOnline")]
- public bool PMAIsOnline { get; set; }
- [Subscription("PMB.IsOnline")]
- public bool PMBIsOnline { get; set; }
- public string PMAState
- {
- get
- {
- return "PMA/" + (PMAIsAutoMode ? "Auto/" : "Manual/") + (PMAIsOnline ? "Online" : "Offline");
- }
- }
- public string PMBState
- {
- get
- {
- return "PMB/" + (PMBIsAutoMode ? "Auto/" : "Manual/") + (PMBIsOnline ? "Online" : "Offline");
- }
- }
- private string _SelectedModule;
- public string SelectedModule
- {
- get
- {
- return _SelectedModule;
- }
- set
- {
- _SelectedModule = value;
- Slots = GetSlotsByModule(_SelectedModule);
- SelectedSlot = 1;
- NotifyOfPropertyChange("SelectedModule");
- }
- }
- private string _PickSelectedModule;
- public string PickSelectedModule
- {
- get
- {
- return _PickSelectedModule;
- }
- set
- {
- _PickSelectedModule = value;
- PickSlots = GetSlotsByModule(_PickSelectedModule);
- PickSelectedSlot = 1;
- NotifyOfPropertyChange("PickSelectedModule");
- }
- }
- private string _PlaceSelectedModule;
- public string PlaceSelectedModule
- {
- get
- {
- return _PlaceSelectedModule;
- }
- set
- {
- _PlaceSelectedModule = value;
- PlaceSlots = GetSlotsByModule(_PlaceSelectedModule);
- PlaceSelectedSlot = 1;
- NotifyOfPropertyChange("PlaceSelectedModule");
- }
- }
- private string _ExtendSelectedModule;
- public string ExtendSelectedModule
- {
- get
- {
- return _ExtendSelectedModule;
- }
- set
- {
- _ExtendSelectedModule = value;
- ExtendSlots = GetExtendPos();
- NotifyOfPropertyChange("ExtendSelectedModule");
- }
- }
- private List<string> GetExtendPos()
- {
- //return new List<string> { "G1", "GB", "G4", "P1", "PB", "P4" };
- return new List<string> { "GoIntoGet", "GoBackGet", "GoIntoPut", "GoBackPut" };
- }
- private static Dictionary<string, string> ExtendParam = new Dictionary<string, string>()
- {
- {"GoIntoGet","GB" },
- {"GoBackGet","G4" },
- {"GoIntoPut","PB" },
- {"GoBackPut","P4" }
- };
- private string _RetractSelectedModule;
- public string RetractSelectedModule
- {
- get
- {
- return _RetractSelectedModule;
- }
- set
- {
- _RetractSelectedModule = value;
- RetractSlots = GetExtendPos();
- NotifyOfPropertyChange("RetractSelectedModule");
- }
- }
- private string _MapSelectedModule;
- public string MapSelectedModule
- {
- get
- {
- return _MapSelectedModule;
- }
- set
- {
- _MapSelectedModule = value;
- //MapSlots = GetSlotsByModule(_MapSelectedModule);
- MapSelectedSlot = 1;
- NotifyOfPropertyChange("MapSelectedModule");
- }
- }
- //[Subscription("EfemRobot.RobotMoveAction")]
- //public string EfemRobotMoveAction
- //{
- // get;
- // set;
- //}
- //[Subscription("EFEM.CassetteDoor")]
- //public AITSensorData CassetteDoorStatus
- //{
- // get;
- // set;
- //}
- private EfemType _efemType = EfemType.FutureEfem;
- public Visibility GripVisibility
- {
- get;
- set;
- }
- public Visibility CassetteDoorVisibility
- {
- get
- {
- return _efemType == EfemType.FutureEfem ? Visibility.Visible : Visibility.Collapsed;
- }
- }
- public Visibility LoadUnloadVisibility
- {
- get { return _efemType == EfemType.JetEfem ? Visibility.Visible : Visibility.Collapsed; }
- }
- public Visibility MapVisibility
- {
- get { return _efemType == EfemType.FutureEfem ? Visibility.Visible : Visibility.Collapsed; }
- }
- public Visibility CIDVisibility
- {
- get { return _efemType == EfemType.FutureEfem ? Visibility.Collapsed : Visibility.Visible; }
- }
- public bool EnableWaferSize
- {
- get { return _efemType == EfemType.FutureEfem ; }
- }
- public bool EnableCIDLP1
- {
- get
- {
- return Foup1Present;
- }
- }
- public bool EnableLoadLP1
- {
- get
- {
- return Foup1Present;
- }
- }
- public bool EnableUnloadLP1
- {
- get
- {
- return Foup1Present;
- }
- }
- public bool EnableHomeLP1
- {
- get
- {
- return Foup1Present;
- }
- }
- public bool EnableLockLP1
- {
- get
- {
- return Foup1Present;
- }
- }
- public bool EnableUnlockLP1
- {
- get
- {
- return Foup1Present;
- }
- }
- public bool EnableCIDLP2
- {
- get
- {
- return Foup2Present;
- }
- }
- public bool EnableLoadLP2
- {
- get
- {
- return Foup2Present;
- }
- }
- public bool EnableHomeLP2
- {
- get
- {
- return Foup2Present;
- }
- }
- public bool EnableUnloadLP2
- {
- get
- {
- return Foup2Present;
- }
- }
- public bool EnableLockLP2
- {
- get
- {
- return Foup2Present;
- }
- }
- public bool EnableUnlockLP2
- {
- get
- {
- return Foup2Present;
- }
- }
- [Subscription("EFEM.CassetteDoor")]
- public LidState CassetteDoorStatus
- {
- get;
- set;
- }
- public bool IsLP1PresentFeedback
- {
- get { return LP1CassetteState == LoadportCassetteState.Normal; }
- }
- public bool IsLP2PresentFeedback
- {
- get { return LP2CassetteState == LoadportCassetteState.Normal; }
- }
-
- [Subscription("LP1.IsClamped")]
- public bool IsLP1ClampedFeedback { get; set; }
- [Subscription("LP2.IsClamped")]
- public bool IsLP2ClampedFeedback { get; set; }
-
- [Subscription("LP1.CassetteState")]
- public LoadportCassetteState LP1CassetteState { get; set; }
- [Subscription("LP2.CassetteState")]
- public LoadportCassetteState LP2CassetteState { get; set; }
- public bool Foup1Present
- {
- get { return LP1CassetteState == LoadportCassetteState.Normal; }
- }
- public bool Foup2Present
- {
- get { return LP2CassetteState == LoadportCassetteState.Normal; }
- }
- [Subscription("EfemRobot.RobotMoveInfo")]
- public RobotMoveInfo EfemRobotMoveInfo { get; set; }
- //{
- // get
- // {
- // RobotMoveInfo _moveInfo = new RobotMoveInfo() { BladeTarget = "System" };
- // if (!string.IsNullOrEmpty(EfemRobotMoveAction))
- // {
- // var action = EfemRobotMoveAction.Split('.');
- // _moveInfo.BladeTarget = action[0];
- // _moveInfo.Action = (RobotAction)Enum.Parse(typeof(RobotAction), action[1]);
- // }
- // return _moveInfo;
- // }
- //}
- private List<string> _blades = new List<string>() { "Blade1", "Blade2" };
- public List<string> Blades
- {
- get { return _blades; }
- set { _blades = value; NotifyOfPropertyChange("Blades"); }
- }
- private int _SelectedSlot;
- public int SelectedSlot
- {
- get { return _SelectedSlot; }
- set { _SelectedSlot = value; NotifyOfPropertyChange("SelectedSlot"); }
- }
- private int _PickSelectedSlot;
- public int PickSelectedSlot
- {
- get { return _PickSelectedSlot; }
- set { _PickSelectedSlot = value; NotifyOfPropertyChange("PickSelectedSlot"); }
- }
- private string _pickSelectedBlade;
- public string PickSelectedBlade
- {
- get { return _pickSelectedBlade; }
- set { _pickSelectedBlade = value; NotifyOfPropertyChange("PickSelectedBlade"); }
- }
- private int _PlaceSelectedSlot;
- public int PlaceSelectedSlot
- {
- get { return _PlaceSelectedSlot; }
- set { _PlaceSelectedSlot = value; NotifyOfPropertyChange("PlaceSelectedSlot"); }
- }
- private string _placeSelectedBlade;
- public string PlaceSelectedBlade
- {
- get { return _placeSelectedBlade; }
- set { _placeSelectedBlade = value; NotifyOfPropertyChange("PlaceSelectedBlade"); }
- }
- private string _ExtendSelectedSlot;
- public string ExtendSelectedSlot
- {
- get { return _ExtendSelectedSlot; }
- set { _ExtendSelectedSlot = value; NotifyOfPropertyChange("ExtendSelectedSlot"); }
- }
- private string _extendSelectedBlade;
- public string ExtendSelectedBlade
- {
- get { return _extendSelectedBlade; }
- set { _extendSelectedBlade = value; NotifyOfPropertyChange("ExtendSelectedBlade"); }
- }
- private string _gripSelectedBlade;
- public string GripSelectedBlade
- {
- get { return _gripSelectedBlade; }
- set { _gripSelectedBlade = value; NotifyOfPropertyChange("GripSelectedBlade"); }
- }
- private string _ungripSelectedBlade;
- public string UngripSelectedBlade
- {
- get { return _ungripSelectedBlade; }
- set { _ungripSelectedBlade = value; NotifyOfPropertyChange("UngripSelectedBlade"); }
- }
- private int _RetractSelectedSlot;
- public int RetractSelectedSlot
- {
- get { return _RetractSelectedSlot; }
- set { _RetractSelectedSlot = value; NotifyOfPropertyChange("RetractSelectedSlot"); }
- }
- private int _MapSelectedSlot;
- public int MapSelectedSlot
- {
- get { return _MapSelectedSlot; }
- set { _MapSelectedSlot = value; NotifyOfPropertyChange("MapSelectedSlot"); }
- }
- private List<string> _pickModules;
- public List<string> PickPlaceModules
- {
- get { return _pickModules; }
- set { _pickModules = value; NotifyOfPropertyChange("PickPlaceModules"); }
- }
- private List<string> _mapModules;
- public List<string> MapModules
- {
- get { return _mapModules; }
- set { _mapModules = value; NotifyOfPropertyChange("MapModules"); }
- }
- private List<string> _extendModules;
- public List<string> ExtendRetractModules
- {
- get { return _extendModules; }
- set { _extendModules = value; NotifyOfPropertyChange("ExtendRetractModules"); }
- }
- private List<int> _slots;
- public List<int> Slots
- {
- get { return _slots; }
- set { _slots = value; NotifyOfPropertyChange("Slots"); }
- }
- private List<int> _Pickslots;
- public List<int> PickSlots
- {
- get { return _Pickslots; }
- set { _Pickslots = value; NotifyOfPropertyChange("PickSlots"); }
- }
- private List<int> _Placeslots;
- public List<int> PlaceSlots
- {
- get { return _Placeslots; }
- set { _Placeslots = value; NotifyOfPropertyChange("PlaceSlots"); }
- }
- private List<string> _Extendslots;
- public List<string> ExtendSlots
- {
- get { return _Extendslots; }
- set { _Extendslots = value; NotifyOfPropertyChange("ExtendSlots"); }
- }
- private List<string> _Retractslots;
- public List<string> RetractSlots
- {
- get { return _Retractslots; }
- set { _Retractslots = value; NotifyOfPropertyChange("RetractSlots"); }
- }
- [Subscription("LP1.IsLoaded")]
- public bool IsLoadedLP1 { get; set; }
-
- [Subscription("LP1.FsmState")]
- public string StateLP1 { get; set; }
- [Subscription("LP1.CarrierId")]
- public string CarrierIdLP1 { get; set; }
- [Subscription("LP1.SmartTag")]
- public string SmartTagLP1 { get; set; }
- [Subscription("LP1.WaferSize")]
- public string LP1WaferSize { get; set; }
- public string WaferSizeLP1
- {
- get { return LP1CassetteState == LoadportCassetteState.Normal ? GetWaferSize(LP1WaferSize) : "--"; }
- }
- [Subscription("LP2.IsLoaded")]
- public bool IsLoadedLP2 { get; set; }
- [Subscription("LP2.FsmState")]
- public string StateLP2 { get; set; }
- [Subscription("LP2.CarrierId")]
- public string CarrierIdLP2 { get; set; }
- [Subscription("LP2.SmartTag")]
- public string _smartTagLP2 { get; set; }
- public string SmartTagLP2
- {
- get
- {
- return _smartTagLP2;
- }
- }
- [Subscription("LP2.WaferSize")]
- public string LP2WaferSize { get; set; }
- public string WaferSizeLP2
- {
- get { return LP2CassetteState == LoadportCassetteState.Normal ? GetWaferSize(LP2WaferSize) : "--"; }
- }
- [Subscription("Aligner1.WaferSize")]
- public string Aligner1WaferSize { get; set; }
- public string WaferSizeAligner1
- {
- get { return GetWaferSize(Aligner1WaferSize); }
- }
- [Subscription("Aligner2.WaferSize")]
- public string Aligner2WaferSize { get; set; }
- public string WaferSizeAligner2
- {
- get { return GetWaferSize(Aligner2WaferSize); }
- }
- [Subscription("Cooling1.WaferSize")]
- public string Cooling1WaferSize { get; set; }
- public string WaferSizeCooling1
- {
- get { return GetWaferSize(Cooling1WaferSize); }
- }
- [Subscription("Cooling2.WaferSize")]
- public string Cooling2WaferSize { get; set; }
- public string WaferSizeCooling2
- {
- get { return GetWaferSize(Cooling2WaferSize); }
- }
- [Subscription("EfemRobot.WaferSize")]
- public string EfemRobotWaferSize { get; set; }
- public string WaferSizeEfemRobot
- {
- get { return GetWaferSize(EfemRobotWaferSize); }
- }
- [Subscription("PMA.WaferSize")]
- public string PMAWaferSize { get; set; }
- public string WaferSizePMA
- {
- get { return GetWaferSize(PMAWaferSize); }
- }
- [Subscription("PMB.WaferSize")]
- public string PMBWaferSize { get; set; }
- public string WaferSizePMB
- {
- get { return GetWaferSize(PMBWaferSize); }
- }
- [Subscription("EFEM.SmallWafer")]
- public int SmallWafer { get; set; }
- [Subscription("EFEM.MidWafer")]
- public int MidWafer { get; set; }
- [Subscription("EFEM.BigWafer")]
- public int BigWafer { get; set; }
- #region
- public bool WaferSizePMA_3
- {
- set { }
- get { return PMAWaferSize == "WS3"; }
- }
- public bool WaferSizePMA_4
- {
- set { }
- get { return PMAWaferSize == "WS4"; }
- }
- public bool WaferSizePMA_6
- {
- set { }
- get { return PMAWaferSize == "WS6"; }
- }
- public bool WaferSizePMB_3
- {
- set { }
- get { return PMBWaferSize == "WS3"; }
- }
- public bool WaferSizePMB_4
- {
- set { }
- get { return PMBWaferSize == "WS4"; }
- }
- public bool WaferSizePMB_6
- {
- set { }
- get { return PMBWaferSize == "WS6"; }
- }
- public bool WaferSizeCooling2_3
- {
- set { }
- get { return Cooling2WaferSize == "WS3"; }
- }
- public bool WaferSizeCooling2_4
- {
- set { }
- get { return Cooling2WaferSize == "WS4"; }
- }
- public bool WaferSizeCooling2_6
- {
- set { }
- get { return Cooling2WaferSize == "WS6"; }
- }
- public bool WaferSizeCooling1_3
- {
- set { }
- get { return Cooling1WaferSize == "WS3"; }
- }
- public bool WaferSizeCooling1_4
- {
- set { }
- get { return Cooling1WaferSize == "WS4"; }
- }
- public bool WaferSizeCooling1_6
- {
- set { }
- get { return Cooling1WaferSize == "WS6"; }
- }
- public bool WaferSizeAligner2_3
- {
- set { }
- get { return Aligner2WaferSize == "WS3"; }
- }
- public bool WaferSizeAligner2_4
- {
- set { }
- get { return Aligner2WaferSize == "WS4"; }
- }
- public bool WaferSizeAligner2_6
- {
- set { }
- get { return Aligner2WaferSize == "WS6"; }
- }
- public bool WaferSizeAligner1_3
- {
- set { }
- get { return Aligner1WaferSize == "WS3"; }
- }
- public bool WaferSizeAligner1_4
- {
- set { }
- get { return Aligner1WaferSize == "WS4"; }
- }
- public bool WaferSizeAligner1_6
- {
- set { }
- get { return Aligner1WaferSize == "WS6"; }
- }
- public bool WaferSizeEfemRobot_3
- {
- set { }
- get { return EfemRobotWaferSize == "WS3"; }
- }
- public bool WaferSizeEfemRobot_4
- {
- set { }
- get { return EfemRobotWaferSize == "WS4"; }
- }
- public bool WaferSizeEfemRobot_6
- {
- set { }
- get { return EfemRobotWaferSize == "WS6"; }
- }
- #endregion
- public bool PMASlitValveIsOpen
- {
- get { return SlitDoorDataA != null && SlitDoorDataA.OpenFeedback && !SlitDoorDataA.CloseFeedback; }
- }
- [Subscription("PMA.SlitDoor.DeviceData")]
- public AITCylinderData SlitDoorDataA
- {
- get;
- set;
- }
- public bool PMBSlitValveIsOpen
- {
- get { return SlitDoorDataB != null && SlitDoorDataB.OpenFeedback && !SlitDoorDataB.CloseFeedback; }
- }
- [Subscription("PMB.SlitDoor.DeviceData")]
- public AITCylinderData SlitDoorDataB
- {
- get;
- set;
- }
- public Dictionary<string, string> _waferSizeMap = new Dictionary<string, string>()
- {
- {"WS3", "3'"},{"WS4", "4'"},{"WS6", "6'"}
- };
- private string GetWaferSize(string size)
- {
- if (_efemType == EfemType.JetEfem)
- return "";
- if (size != null && _waferSizeMap.ContainsKey(size))
- switch (size)
- {
- case "WS3": return SmallWafer.ToString();
- case "WS4": return MidWafer.ToString();
- case "WS6": return BigWafer.ToString();
- default: return "";
- }
- //return _waferSizeMap[size];
- return "";
- }
- [Subscription("EfemRobot.GripStateBlade1")]
- public string GripStateBlade1 { get; set; }
- public string Blade1GripStateColor
- {
- get
- {
- switch (GripStateBlade1)
- {
- case "ON": return "Lime";
- case "OFF": return "Gray";
- default: return "Yellow";
- }
- }
- }
- [Subscription("EfemRobot.GripStateBlade2")]
- public string GripStateBlade2 { get; set; }
- public string Blade2GripStateColor
- {
- get
- {
- switch (GripStateBlade2)
- {
- case "ON": return "Lime";
- case "OFF": return "Gray";
- default: return "Yellow";
- }
- }
- }
- public Aitex.Core.Common.WaferSize SmallPinWaferSize { get; set; }
- public Aitex.Core.Common.WaferSize MediumPinWaferSize { get; set; }
- public Aitex.Core.Common.WaferSize BigPinWaferSize { get; set; }
- #endregion Properties
- public EFEMViewModel()
- {
- this.DisplayName = "EFEM";
- _pickModules = new List<string>() { "LP1", "LP2", "Aligner1", "Aligner2", "Cooling1", "Cooling2" };
- _mapModules = new List<string>() { "LP1", "LP2" };
- _extendModules = new List<string>() { "PMA", "PMB" };
- PickSelectedModule = "LP1";
- PlaceSelectedModule = "LP1";
- ExtendSelectedModule = "PMA";
- RetractSelectedModule = "PMA";
- MapSelectedModule = "LP1";
- PickSelectedBlade = PlaceSelectedBlade = ExtendSelectedBlade = GripSelectedBlade = UngripSelectedBlade = "Blade1";
- }
- protected override void OnActivate()
- {
- SmallPinWaferSize = MapWaferSize((int)QueryDataClient.Instance.Service.GetConfig($"System.SmallWafer"));
- MediumPinWaferSize = MapWaferSize((int)QueryDataClient.Instance.Service.GetConfig($"System.MidWafer"));
- BigPinWaferSize = MapWaferSize((int)QueryDataClient.Instance.Service.GetConfig($"System.BigWafer"));
- NotifyOfPropertyChange(nameof(SmallPinWaferSize));
- NotifyOfPropertyChange(nameof(MediumPinWaferSize));
- NotifyOfPropertyChange(nameof(BigPinWaferSize));
- _efemType = (int)QueryDataClient.Instance.Service.GetConfig("EFEM.EfemType") == 1 ? EfemType.FutureEfem : EfemType.JetEfem;
- GripVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("EFEM.EnableGrip") ? Visibility.Visible : Visibility.Hidden;
- base.OnActivate();
- }
- private Aitex.Core.Common.WaferSize MapWaferSize(int value)
- {
- switch (value)
- {
- case 3: return Aitex.Core.Common.WaferSize.WS3;
- case 4: return Aitex.Core.Common.WaferSize.WS4;
- case 6: return Aitex.Core.Common.WaferSize.WS6;
- case 8: return Aitex.Core.Common.WaferSize.WS8;
- case 12: return Aitex.Core.Common.WaferSize.WS12;
- case 150: return Aitex.Core.Common.WaferSize.WS150;
- case 159: return Aitex.Core.Common.WaferSize.WS159;
- }
- return Aitex.Core.Common.WaferSize.WS0;
- }
- private List<int> GetSlotsByModule(string module)
- {
- List<int> slots = new List<int>();
- int num = 0;
- switch (module)
- {
- case "LP1":
- case "LP2":
- num = 25;
- break;
- case "Aligner1":
- case "Aligner2":
- case "Cooling1":
- case "Cooling2":
- case "PMA":
- case "PMB":
- num = 1;
- break;
- }
- int j = 0;
- while (j < num)
- {
- slots.Add(j + 1);
- j++;
- }
- return slots;
- }
- protected override void OnInitialize()
- {
- MenuPermission = ClientApp.Instance.GetPermission("EFEM");
- base.OnInitialize();
- base.InitModules();
- }
-
- public void SetWaferSize(string module, string size)
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation("System.SetWaferSize", module, size);
- }
- public void HomeAligner(string module)
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{module}.{EfemOperation.Home}");
- }
- public void AlignAligner(string module)
- {
- if (MenuPermission != 3) return;
- string size = Aligner1WaferSize;
- if (module == ModuleName.Aligner2.ToString())
- size = Aligner2WaferSize;
- if (module == ModuleName.Cooling1.ToString())
- size = Cooling1WaferSize;
- if (module == ModuleName.Cooling2.ToString())
- size = Cooling2WaferSize;
- InvokeClient.Instance.Service.DoOperation($"{module}.{EfemOperation.Align}", size);
- }
- public void LiftAligner(string module)
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{module}.{EfemOperation.Lift}",true);
- }
- public void LiftAlignerDown(string module)
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{module}.{EfemOperation.Lift}", false);
- }
-
- public void HomeEfem()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.{EfemOperation.Home}");
- }
- public void ResetEfem()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.Reset");
- }
- public void ClearError()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.{EfemOperation.ClearError}");
- }
- public void HomeRobot()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Home}");
- }
- public void AbortRobot()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Abort}");
- }
- 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();
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Pick}",
- 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();
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Place}",
- PlaceSelectedModule, PlaceSelectedSlot - 1, ws, PlaceSelectedBlade);
- }
- public void RobotExtend()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Extend}", ExtendSelectedModule, ExtendParam[ExtendSelectedSlot], ExtendSelectedBlade, EfemRobotWaferSize);
- }
- public void RobotRetract()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Retract}", RetractSelectedModule, RetractSlots[RetractSelectedSlot]);
- }
- public void RobotMap()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{MapSelectedModule}.{EfemOperation.Map}");
- }
- public void RobotGrip()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Grip}", "ON", GripSelectedBlade);
- }
- public void RobotUngrip()
- {
- if (MenuPermission != 3) return;
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Grip}", "OFF", UngripSelectedBlade);
- }
- public void MapLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.MapLP(moduleID);
- }
- public void LoadLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.LoadLP(moduleID);
- }
- public void UnloadLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.UnloadLP(moduleID);
- }
- public void HomeLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.Home(moduleID);
- }
- public void ResetLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.Reset(moduleID);
- }
- public void LockLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.Clamp(moduleID);
- }
- public void UnlockLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.Unclamp(moduleID);
- }
- public void ReadCarrierIdLP(string moduleID)
- {
- if (MenuPermission != 3) return;
- LoadPortProvider.Instance.ReadCarrierID(moduleID);
- }
-
- }
- }
|