123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545 |
- using Aitex.Core.UI.MVVM;
- using Aitex.Core.Util;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.CommonData;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.OperationCenter;
- using MECF.Framework.Common.SubstrateTrackings;
- using MECF.Framework.UI.Client.ClientBase;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows;
- using System.Windows.Input;
- using FurnaceUI.Models;
- using FurnaceUI;
- using FurnaceUI.Controls.Common;
- using FurnaceUI.Client;
- using Caliburn.Micro;
- using Caliburn.Micro.Core;
- using FurnaceUI.Views.Maintenances;
- namespace FurnaceUI.Views.Operations
- {
- public class SelfCheckViewModel : FurnaceUIViewModelBase
- {
- #region Subscription Properties
- [Subscription("WaferRobot.MappingResult")]
- public string MappingResult { get; set; }
- [Subscription("PM1.SensorStocker1.Value")]
- public bool SensorStation1Presence { get; set; }
- [Subscription("PM1.SensorStocker2.Value")]
- public bool SensorStation2Presence { get; set; }
- [Subscription("PM1.SensorStocker3.Value")]
- public bool SensorStation3Presence { get; set; }
- [Subscription("PM1.SensorStocker4.Value")]
- public bool SensorStation4Presence { get; set; }
- [Subscription("PM1.SensorStocker5.Value")]
- public bool SensorStation5Presence { get; set; }
- [Subscription("PM1.SensorStocker6.Value")]
- public bool SensorStation6Presence { get; set; }
- [Subscription("PM1.SensorStocker7.Value")]
- public bool SensorStation7Presence { get; set; }
- [Subscription("PM1.SensorStocker8.Value")]
- public bool SensorStation8Presence { get; set; }
- [Subscription("PM1.SensorStocker9.Value")]
- public bool SensorStation9Presence { get; set; }
- [Subscription("PM1.SensorStocker10.Value")]
- public bool SensorStation10Presence { get; set; }
- [Subscription("PM1.SensorStocker11.Value")]
- public bool SensorStation11Presence { get; set; }
- [Subscription("PM1.SensorStocker12.Value")]
- public bool SensorStation12Presence { get; set; }
- [Subscription("PM1.SensorStocker13.Value")]
- public bool SensorStation13Presence { get; set; }
- [Subscription("PM1.SensorStocker14.Value")]
- public bool SensorStation14Presence { get; set; }
- [Subscription("PM1.SensorStocker15.Value")]
- public bool SensorStation15Presence { get; set; }
- [Subscription("PM1.SensorStocker16.Value")]
- public bool SensorStation16Presence { get; set; }
- [Subscription("PM1.SensorStocker17.Value")]
- public bool SensorStation17Presence { get; set; }
- [Subscription("PM1.SensorStocker18.Value")]
- public bool SensorStation18Presence { get; set; }
- [Subscription("System.SensorStage1CASSPresence.Value")]
- public bool SensorStage1CASSPresence { get; set; }
- [Subscription("System.SensorStage2CASSPresence.Value")]
- public bool SensorStage2CASSPresence { get; set; }
- [Subscription("Stocker1.Carrier")]
- public CarrierInfo Stocker1CarrierData { get; set; }
- [Subscription("Stocker2.Carrier")]
- public CarrierInfo Stocker2CarrierData { get; set; }
- [Subscription("Stocker3.Carrier")]
- public CarrierInfo Stocker3CarrierData { get; set; }
- [Subscription("Stocker4.Carrier")]
- public CarrierInfo Stocker4CarrierData { get; set; }
- [Subscription("Stocker5.Carrier")]
- public CarrierInfo Stocker5CarrierData { get; set; }
- [Subscription("Stocker6.Carrier")]
- public CarrierInfo Stocker6CarrierData { get; set; }
- [Subscription("Stocker7.Carrier")]
- public CarrierInfo Stocker7CarrierData { get; set; }
- [Subscription("Stocker8.Carrier")]
- public CarrierInfo Stocker8CarrierData { get; set; }
- [Subscription("Stocker9.Carrier")]
- public CarrierInfo Stocker9CarrierData { get; set; }
- [Subscription("Stocker10.Carrier")]
- public CarrierInfo Stocker10CarrierData { get; set; }
- [Subscription("Stocker11.Carrier")]
- public CarrierInfo Stocker11CarrierData { get; set; }
- [Subscription("Stocker12.Carrier")]
- public CarrierInfo Stocker12CarrierData { get; set; }
- [Subscription("Stocker13.Carrier")]
- public CarrierInfo Stocker13CarrierData { get; set; }
- [Subscription("Stocker14.Carrier")]
- public CarrierInfo Stocker14CarrierData { get; set; }
- [Subscription("Stocker15.Carrier")]
- public CarrierInfo Stocker15CarrierData { get; set; }
- [Subscription("Stocker16.Carrier")]
- public CarrierInfo Stocker16CarrierData { get; set; }
- [Subscription("Stocker17.Carrier")]
- public CarrierInfo Stocker17CarrierData { get; set; }
- [Subscription("Stocker18.Carrier")]
- public CarrierInfo Stocker18CarrierData { get; set; }
- [Subscription("FIMS1.Carrier")]
- public CarrierInfo FIMS1CarrierData { get; set; }
- [Subscription("FIMS2.Carrier")]
- public CarrierInfo FIMS2CarrierData { get; set; }
- [Subscription("LP1.Carrier")]
- public CarrierInfo LP1CarrierData { get; set; }
- [Subscription("LP2.Carrier")]
- public CarrierInfo LP2CarrierData { get; set; }
- [Subscription("LP3.Carrier")]
- public CarrierInfo LP3CarrierData { get; set; }
- [Subscription("LP4.Carrier")]
- public CarrierInfo LP4CarrierData { get; set; }
- [Subscription("CarrierRobot.Carrier")]
- public CarrierInfo CassetteRobotCarrierData { get; set; }
- [Subscription("CarrierRobot.RobotMoveInfo")]
- public RobotMoveInfo CassetteRobotMoveInfo { get; set; }
- [Subscription("WaferRobot.RobotMoveInfo")]
- public RobotMoveInfo WaferRobotMoveInfo { get; set; }
- public ICommand CreateCassetteCommand { get; private set; }
- public ICommand DeleteCassetteCommand { get; private set; }
- [Subscription("CarrierRobot.Status")]
- public string CassetteRobotStatus { get; set; }
- public bool IsCassetteRobotInitialized
- {
- get
- {
- return CassetteRobotStatus != "Init" && CassetteRobotStatus != "Homing";
- }
- }
- [Subscription("WaferRobot.Status")]
- public string WaferRobotStatus { get; set; }
- [Subscription("LP1.Status")]
- public string LP1Status { get; set; }
- [Subscription("LP2.Status")]
- public string LP2Status { get; set; }
- [Subscription("LP3.Status")]
- public string LP3Status { get; set; }
- [Subscription("LP4.Status")]
- public string LP4Status { get; set; }
- [Subscription("BoatElevatorRobot.Status")]
- public string BoatElevatorRobotStatus { get; set; }
- private string _boatPosition;
- [Subscription("Boat.BoatPosition")]
- public string BoatPosition
- {
- get => _boatPosition;
- set
- {
- _boatPosition = value;
- NotifyOfPropertyChange(nameof(BoatPosition));
- }
- }
- [Subscription("Boat.BoatZCurrentPosition")]
- public int BoatCurrentValue { get; set; }
- private int _boatZMinValue;
- public int BoatZMinValue
- {
- get => _boatZMinValue;
- set
- {
- _boatZMinValue = value;
- NotifyOfPropertyChange(nameof(BoatZMinValue));
- }
- }
- private int _boatZMaxValue;
- public int BoatZMaxValue
- {
- get => _boatZMaxValue;
- set
- {
- _boatZMaxValue = value;
- NotifyOfPropertyChange(nameof(BoatZMaxValue));
- }
- }
- public bool IsWaferRobotInitialized
- {
- get
- {
- return WaferRobotStatus != "Init" && WaferRobotStatus != "Homing";
- }
- }
- public string WaferRobotAxleStatusPath
- {
- get
- {
- switch (WaferRobotStatus)
- {
- case "Homing":
- case "Init":
- return "/FurnaceUI;component/Resources/Images/Controls3/hg2y.png";
- case "Idle":
- case "InTransfer":
- case "Loading":
- case "Unloading":
- case "Picking":
- case "Placing":
- return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
- case "Error":
- return "/FurnaceUI;component/Resources/Images/Controls3/hg2r.png";
- default:
- break;
- }
- return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
- }
- }
- public string CassetteRobotAxleStatusPath
- {
- get
- {
- switch (CassetteRobotStatus)
- {
- case "Homing":
- case "Init":
- return "/FurnaceUI;component/Resources/Images/Controls3/hg1y.png";
- case "Idle":
- case "InTransfer":
- case "Picking":
- case "Placing":
- return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
- case "Error":
- return "/FurnaceUI;component/Resources/Images/Controls3/hg1r.png";
- default:
- break;
- }
- return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
- }
- }
- public string SMIFAStatusPath
- {
- get
- {
- switch (LP1Status)
- {
- case "Homing":
- case "Init":
- return "/FurnaceUI;component/Resources/Images/Controls/smif-yellow.png";
- case "Idle":
- case "InTransfer":
- case "Picking":
- case "Placing":
- return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
- case "Error":
- return "/FurnaceUI;component/Resources/Images/Controls/smif-red.png";
- default:
- break;
- }
- return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
- }
- }
- public string SMIFBStatusPath
- {
- get
- {
- switch (LP2Status)
- {
- case "Homing":
- case "Init":
- return "/FurnaceUI;component/Resources/Images/Controls/smif-yellow.png";
- case "Idle":
- case "InTransfer":
- case "Picking":
- case "Placing":
- return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
- case "Error":
- return "/FurnaceUI;component/Resources/Images/Controls/smif-red.png";
- default:
- break;
- }
- return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
- }
- }
- [Subscription("PM1.Status")]
- public string PM1Status { get; set; }
- public bool IsPM1Initialized
- {
- get
- {
- return PM1Status != "Init" && PM1Status != "Homing";
- }
- }
- private string _boatStatus;
- [Subscription("Boat.Status")]
- public string BoatStatus
- {
- get => _boatStatus;
- set
- {
- _boatStatus = value;
- NotifyOfPropertyChange(nameof(BoatStatus));
- }
- }
- public bool IsBoatInitialized
- {
- get
- {
- return BoatStatus != "Init" && BoatStatus != "Homing";
- }
- }
- [Subscription("System.IsInitialized")]
- public bool SystemIsInitialized { get; set; }
- [Subscription("Rt.Status")]
- public string RtStatus { get; set; }
- public bool IsAuto
- {
- get { return RtStatus == "AutoRunning" || RtStatus == "AutoIdle"; }
- }
- public bool IsRtRunning
- {
- get
- {
- return RtStatus != "Init" && RtStatus != "Idle" && RtStatus != "AutoIdle";
- }
- }
- public bool IsRtInitialized
- {
- get
- {
- return RtStatus != "Init" && RtStatus != "Initializing";
- }
- }
- public bool IsEnableInitialize
- {
- get { return !IsAuto && !IsRtRunning; }
- }
- private bool _isShowBoatElevatorRobot = true;
- public bool IsShowBoatElevatorRobot
- {
- get => _isShowBoatElevatorRobot;
- set
- {
- _isShowBoatElevatorRobot = value;
- NotifyOfPropertyChange(nameof(IsShowBoatElevatorRobot));
- }
- }
- public int Stocker1WaferCount { get; set; } = 0;
- public int Stocker2WaferCount { get; set; } = 0;
- public int Stocker3WaferCount { get; set; } = 0;
- public int Stocker4WaferCount { get; set; } = 0;
- public int Stocker5WaferCount { get; set; } = 0;
- public int Stocker6WaferCount { get; set; } = 0;
- public int Stocker7WaferCount { get; set; } = 0;
- public int Stocker8WaferCount { get; set; } = 0;
- public int Stocker9WaferCount { get; set; } = 0;
- public int Stocker10WaferCount { get; set; } = 0;
- public int Stocker11WaferCount { get; set; } = 0;
- public int Stocker12WaferCount { get; set; } = 0;
- public int Stocker13WaferCount { get; set; } = 0;
- public int Stocker14WaferCount { get; set; } = 0;
- public int Stocker15WaferCount { get; set; } = 0;
- public int Stocker16WaferCount { get; set; } = 0;
- public int Stocker17WaferCount { get; set; } = 0;
- public int Stocker18WaferCount { get; set; } = 0;
- public int FIMS1WaferCount { get; set; } = 0;
- public int FIMS2WaferCount { get; set; } = 0;
- public int LP1WaferCount { get; set; } = 0;
- public int LP2WaferCount { get; set; } = 0;
- public int CarrierRobotWaferCount { get; set; } = 0;
- public int WaferRobotWaferCount { get; set; } = 0;
- public int PM1WaferCount { get; set; } = 0;
- #region StockerCarrierType
- private string GetStockerCarrierType(CarrierInfo carrierInfo)
- {
- if (carrierInfo != null && carrierInfo.Status == CarrierStatus.Normal)
- {
- if (carrierInfo.IsProcessed(carrierInfo.Name))
- {
- return "Process";
- }
- return carrierInfo.CarrierType.ToString();
- }
- return "";
- }
- public string Stocker1CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker1CarrierData);
- }
- }
- public string Stocker2CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker2CarrierData);
- }
- }
- public string Stocker3CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker3CarrierData);
- }
- }
- public string Stocker4CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker4CarrierData);
- }
- }
- public string Stocker5CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker5CarrierData);
- }
- }
- public string Stocker6CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker6CarrierData);
- }
- }
- public string Stocker7CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker7CarrierData);
- }
- }
- public string Stocker8CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker8CarrierData);
- }
- }
- public string Stocker9CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker9CarrierData);
- }
- }
- public string Stocker10CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker10CarrierData);
- }
- }
- public string Stocker11CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker11CarrierData);
- }
- }
- public string Stocker12CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker12CarrierData);
- }
- }
- public string Stocker13CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker13CarrierData);
- }
- }
- public string Stocker14CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker14CarrierData);
- }
- }
- public string Stocker15CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker15CarrierData);
- }
- }
- public string Stocker16CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker16CarrierData);
- }
- }
- public string Stocker17CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker17CarrierData);
- }
- }
- public string Stocker18CarrierType
- {
- get
- {
- return GetStockerCarrierType(Stocker18CarrierData);
- }
- }
- #endregion
- private WaferInfo _waferRobotWafer1;
- public WaferInfo WaferRobotWafer1
- {
- get
- {
- return _waferRobotWafer1;
- }
- set
- {
- _waferRobotWafer1 = value;
- NotifyOfPropertyChange(nameof(WaferRobotWafer1));
- }
- }
- private WaferInfo _waferRobotWafer2;
- public WaferInfo WaferRobotWafer2
- {
- get
- {
- return _waferRobotWafer2;
- }
- set
- {
- _waferRobotWafer2 = value;
- NotifyOfPropertyChange(nameof(WaferRobotWafer2));
- }
- }
- [Subscription("CarrierRobot.Status")]
- public string CarrierRobotStatus { get; set; }
- [Subscription("CarrierRobot.SwapCycledCount")]
- public int SwapCycledCount { get; set; }
- [Subscription("CarrierRobot.CycleSwapCycledCount")]
- public int CycleSwapCycledCount { get; set; }
- [Subscription("WaferRobot.SwapCycledCount")]
- public int WaferRobotSwapCycledCount { get; set; }
- private Visibility _cycleCountVisibility;
- public Visibility CycleCountVisibility
- {
- get => _cycleCountVisibility;
- set
- {
- _cycleCountVisibility = value;
- NotifyOfPropertyChange(nameof(CycleCountVisibility));
- }
- }
- private int _cycleNumber { get; set; }
- private int _cycleSwapNumber { get; set; }
- public string CycleCountDisplay
- {
- get
- {
- if (CarrierRobotStatus == "Swaping")
- {
- return $"{SwapCycledCount + 1}/{_cycleNumber}";
- }
- if (CarrierRobotStatus == "CycleSwaping")
- {
- return $"{CycleSwapCycledCount}/{_cycleSwapNumber}";
- }
- return "--";
- }
- }
- private Visibility _waferRobotCycleCountVisibility;
- public Visibility WaferRobotCycleCountVisibility
- {
- get => _waferRobotCycleCountVisibility;
- set
- {
- _waferRobotCycleCountVisibility = value;
- NotifyOfPropertyChange(nameof(WaferRobotCycleCountVisibility));
- }
- }
- private int _waferRobotCycleNumber { get; set; }
- public string WaferRobotCycleCountDisplay
- {
- get
- {
- if (WaferRobotStatus == "Swaping")
- {
- return $"{WaferRobotSwapCycledCount + 1}/{_waferRobotCycleNumber}";
- }
- return "--";
- }
- }
- #endregion
- public bool IsEnableReturnWafer
- {
- get
- {
- return RtStatus == "Idle" || RtStatus == "AutoIdle";
- }
- }
- public bool PM1Installed { get; set; }
- public bool LP1Installed { get; set; }
- public bool LP2Installed { get; set; }
- public bool LP3Installed { get; set; }
- public bool LP4Installed { get; set; }
- public bool FIMS1Installed { get; set; }
- public bool FIMS2Installed { get; set; }
- private bool _stocker1Installed;
- public bool Stocker1Installed
- {
- get { return _stocker1Installed; }
- set { _stocker1Installed = value; this.NotifyOfPropertyChange(nameof(Stocker1Installed)); }
- }
- private bool _stocker2Installed;
- public bool Stocker2Installed
- {
- get { return _stocker2Installed; }
- set { _stocker2Installed = value; this.NotifyOfPropertyChange(nameof(Stocker2Installed)); }
- }
- private bool _stocker3Installed;
- public bool Stocker3Installed
- {
- get { return _stocker3Installed; }
- set { _stocker3Installed = value; this.NotifyOfPropertyChange(nameof(Stocker3Installed)); }
- }
- private bool _stocker4Installed;
- public bool Stocker4Installed
- {
- get { return _stocker4Installed; }
- set { _stocker4Installed = value; this.NotifyOfPropertyChange(nameof(Stocker4Installed)); }
- }
- private bool _stocker5Installed;
- public bool Stocker5Installed
- {
- get { return _stocker5Installed; }
- set { _stocker5Installed = value; this.NotifyOfPropertyChange(nameof(Stocker5Installed)); }
- }
- private bool _stocker6Installed;
- public bool Stocker6Installed
- {
- get { return _stocker6Installed; }
- set { _stocker6Installed = value; this.NotifyOfPropertyChange(nameof(Stocker6Installed)); }
- }
- private bool _stocker7Installed;
- public bool Stocker7Installed
- {
- get { return _stocker7Installed; }
- set { _stocker7Installed = value; this.NotifyOfPropertyChange(nameof(Stocker7Installed)); }
- }
- private bool _stocker8Installed;
- public bool Stocker8Installed
- {
- get { return _stocker8Installed; }
- set { _stocker8Installed = value; this.NotifyOfPropertyChange(nameof(Stocker8Installed)); }
- }
- private bool _stocker9Installed;
- public bool Stocker9Installed
- {
- get { return _stocker9Installed; }
- set { _stocker9Installed = value; this.NotifyOfPropertyChange(nameof(Stocker9Installed)); }
- }
- private bool _stocker10Installed;
- public bool Stocker10Installed
- {
- get { return _stocker10Installed; }
- set { _stocker10Installed = value; this.NotifyOfPropertyChange(nameof(Stocker10Installed)); }
- }
- private bool _stocker11Installed;
- public bool Stocker11Installed
- {
- get { return _stocker11Installed; }
- set { _stocker11Installed = value; this.NotifyOfPropertyChange(nameof(Stocker11Installed)); }
- }
- private bool _stocker12Installed;
- public bool Stocker12Installed
- {
- get { return _stocker12Installed; }
- set { _stocker12Installed = value; this.NotifyOfPropertyChange(nameof(Stocker12Installed)); }
- }
- private bool _stocker13Installed;
- public bool Stocker13Installed
- {
- get { return _stocker13Installed; }
- set { _stocker13Installed = value; this.NotifyOfPropertyChange(nameof(Stocker13Installed)); }
- }
- private bool _stocker14Installed;
- public bool Stocker14Installed
- {
- get { return _stocker14Installed; }
- set { _stocker14Installed = value; this.NotifyOfPropertyChange(nameof(Stocker14Installed)); }
- }
- private bool _stocker15Installed;
- public bool Stocker15Installed
- {
- get { return _stocker15Installed; }
- set { _stocker15Installed = value; this.NotifyOfPropertyChange(nameof(Stocker15Installed)); }
- }
- private bool _stocker16Installed;
- public bool Stocker16Installed
- {
- get { return _stocker16Installed; }
- set { _stocker16Installed = value; this.NotifyOfPropertyChange(nameof(Stocker16Installed)); }
- }
- private bool _stocker17Installed;
- public bool Stocker17Installed
- {
- get { return _stocker17Installed; }
- set { _stocker17Installed = value; this.NotifyOfPropertyChange(nameof(Stocker17Installed)); }
- }
- private bool _stocker18Installed;
- public bool Stocker18Installed
- {
- get { return _stocker18Installed; }
- set { _stocker18Installed = value; this.NotifyOfPropertyChange(nameof(Stocker18Installed)); }
- }
- public bool Stocker19Installed { get; set; }
- public bool Stocker20Installed { get; set; }
- public bool Stocker21Installed { get; set; }
- public bool Stocker1InstalledVisible { get; set; }
- public bool Stocker2InstalledVisible { get; set; }
- public bool Stocker3InstalledVisible { get; set; }
- public bool Stocker4InstalledVisible { get; set; }
- public bool Stocker5InstalledVisible { get; set; }
- public bool Stocker6InstalledVisible { get; set; }
- public bool Stocker7InstalledVisible { get; set; }
- public bool Stocker8InstalledVisible { get; set; }
- public bool Stocker9InstalledVisible { get; set; }
- public bool Stocker10InstalledVisible { get; set; }
- public bool Stocker11InstalledVisible { get; set; }
- public bool Stocker12InstalledVisible { get; set; }
- public bool Stocker13InstalledVisible { get; set; }
- public bool Stocker14InstalledVisible { get; set; }
- public bool Stocker15InstalledVisible { get; set; }
- public bool Stocker16InstalledVisible { get; set; }
- public bool Stocker17InstalledVisible { get; set; }
- public bool Stocker18InstalledVisible { get; set; }
- public bool Stocker19InstalledVisible { get; set; }
- public bool Stocker20InstalledVisible { get; set; }
- public bool Stocker21InstalledVisible { get; set; }
- private List<string> _PMList { get; set; } = new List<string>() { "PM1" };
- private List<string> _LPList { get; set; } = new List<string>() { "LP1", "LP2", "LP3", "LP4", };
- private List<string> _FIMSList { get; set; } = new List<string>() { "FIMS1", "FIMS2" };
- private List<string> _StockerList { get; set; } = new List<string>() { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5"
- , "Stocker6", "Stocker7", "Stocker8", "Stocker9", "Stocker10"
- , "Stocker11", "Stocker12", "Stocker13", "Stocker14", "Stocker15"
- , "Stocker16", "Stocker17", "Stocker18" };
- private int _boatSlotCount;
- private int _boatPWaferCount;
- public int BoatPWaferCount
- {
- get => _boatPWaferCount;
- set
- {
- _boatPWaferCount = value;
- NotifyOfPropertyChange(nameof(BoatPWaferCount));
- }
- }
- private int _boatM1WaferCount;
- public int BoatM1WaferCount
- {
- get => _boatM1WaferCount;
- set
- {
- _boatM1WaferCount = value;
- NotifyOfPropertyChange(nameof(BoatM1WaferCount));
- }
- }
- private int _boatM2WaferCount;
- public int BoatM2WaferCount
- {
- get => _boatM2WaferCount;
- set
- {
- _boatM2WaferCount = value;
- NotifyOfPropertyChange(nameof(BoatM2WaferCount));
- }
- }
- private int _boatSDWaferCount;
- public int BoatSDWaferCount
- {
- get => _boatSDWaferCount;
- set
- {
- _boatSDWaferCount = value;
- NotifyOfPropertyChange(nameof(BoatSDWaferCount));
- }
- }
- private int _boatEDWaferCount;
- public int BoatEDWaferCount
- {
- get => _boatEDWaferCount;
- set
- {
- _boatEDWaferCount = value;
- NotifyOfPropertyChange(nameof(BoatEDWaferCount));
- }
- }
- private int _boatEmptyWaferCount;
- public int BoatEmptyWaferCount
- {
- get => _boatEmptyWaferCount;
- set
- {
- _boatEmptyWaferCount = value;
- NotifyOfPropertyChange(nameof(BoatEmptyWaferCount));
- }
- }
- private string _boatAllWaferCount;
- public string BoatAllWaferCount
- {
- get => _boatAllWaferCount;
- set
- {
- _boatAllWaferCount = value;
- NotifyOfPropertyChange(nameof(BoatAllWaferCount));
- }
- }
- private List<string> _stockerWaferType;
- public List<string> StockerWaferType
- {
- get => _stockerWaferType;
- set
- {
- _stockerWaferType = value;
- NotifyOfPropertyChange(nameof(StockerWaferType));
- }
- }
- public Visibility IsStockerVisibility { get; set; }
- public Visibility IsLPVisibility { get; set; }
- public int LPPortCanvasTop { get; set; }
- public SelfCheckViewModel()
- {
- this.DisplayName = "SelfCheckViewModel";
- CreateCassetteCommand = new DelegateCommand<string>(CreateCassette);
- DeleteCassetteCommand = new DelegateCommand<string>(DeleteCassette);
- EnableTimer(true);
- }
- public void TestBoat()
- {
- if (BoatCurrentValue >= 1000)
- {
- BoatCurrentValue = 0;
- }
- else
- {
- BoatCurrentValue += 50;
- }
- }
- public Dictionary<string, StationPosition> StationPosition
- {
- get
- {
- return new Dictionary<string, StationPosition>()
- {
- { "ArmA.System", new StationPosition() {
- StartPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
- ,{ "Robot", new StationPosition() {
- StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
- ,{"ArmA.Stocker1", new StationPosition(){
- StartPosition = new RobotPosition() { X=-230, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{"ArmA.Stocker2", new StationPosition(){
- StartPosition = new RobotPosition() { X=-230, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker3", new StationPosition(){
- StartPosition = new RobotPosition() { X=-230, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker4", new StationPosition(){
- StartPosition = new RobotPosition() { X=-230, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker5", new StationPosition() {
- StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{ "ArmA.Stocker6", new StationPosition() {
- StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker7", new StationPosition() {
- StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }} }
- ,{"ArmA.Stocker8", new StationPosition(){
- StartPosition = new RobotPosition() { X =-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker9", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{ "ArmA.Stocker10", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker11", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker12", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker13", new StationPosition() {
- StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{ "ArmA.Stocker14", new StationPosition() {
- StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker15", new StationPosition() {
- StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker16", new StationPosition() {
- StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker17", new StationPosition(){
- StartPosition = new RobotPosition() { X = -310, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker18", new StationPosition(){
- StartPosition = new RobotPosition() { X = -310, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
- ,{"ArmA.FIMS1", new StationPosition(){
- StartPosition = new RobotPosition() { X = 35, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.FIMS2", new StationPosition(){
- StartPosition = new RobotPosition() { X = -95, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.LP1", new StationPosition(){
- StartPosition = new RobotPosition() { X = -210, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
- ,{"ArmA.LP2", new StationPosition(){
- StartPosition = new RobotPosition() { X = -210, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
- ,{"ArmA.LP3", new StationPosition(){
- StartPosition = new RobotPosition() { X = -453, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
- ,{"ArmA.LP4", new StationPosition(){
- StartPosition = new RobotPosition() { X = -453, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
- };
- }
- }
- public Dictionary<string, StationPosition> StationPosition2
- {
- get
- {
- return new Dictionary<string, StationPosition>()
- {
- { "ArmA.System", new StationPosition() {
- StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
- }
- ,{ "Robot", new StationPosition() {
- StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
- }
- ,{ "ArmA.FIMS1", new StationPosition() {
- StartPosition = new RobotPosition() { X=-20, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
- }
- ,{ "ArmA.FIMS2", new StationPosition() {
- StartPosition = new RobotPosition() { X=-168, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
- }
- ,{ "ArmA.PM1", new StationPosition() {
- StartPosition = new RobotPosition() { X=20, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
- }
- };
- }
- }
- public Dictionary<string, StationPosition> StationPosition3
- {
- get
- {
- return new Dictionary<string, StationPosition>()
- {
- { "HomePosition", new StationPosition() {
- StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 0, Hand = 0 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
- },
- { "Position1", new StationPosition() {
- StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 0, Hand = 0 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
- },
- { "Position2", new StationPosition() {
- StartPosition = new RobotPosition() { X=-100, Root = 0, Arm = 0, Hand = 0 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
- },
- { "ProcessPosition", new StationPosition() {
- StartPosition = new RobotPosition() { X=-280, Root = 0, Arm = 0, Hand = 0 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
- }
- };
- }
- }
- public bool IsSimulateMode { get; set; }
- protected override void OnInitialize()
- {
- base.OnInitialize();
- //StockerWaferType = new List<string>();
- //for (int i = 1; i <= 18; i++)
- //{
- // var type = (string)QueryDataClient.Instance.Service.GetConfig($"System.Stocker.Stocker{i}WaferType").ToString().Replace("1", "").Replace("2", ""); ;
- // StockerWaferType.Add(type.ToString());
- //}
- #region GetModuleInstalled
- foreach (var item in _PMList)
- {
- var test = this.GetType().GetProperty($"{item}Installed");
- var test1 = this.GetType();
- this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
- }
- foreach (var item in _LPList)
- {
- this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
- }
- foreach (var item in _FIMSList)
- {
- this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
- }
- foreach (var item in _StockerList)
- {
- this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
- }
- #endregion
- base.InitFOUP();
- //base.InitLL();
- //base.InitTM();
- //base.InitEFEM();
- base.InitPM();
- base.InitBuffer();
- }
- protected override void OnViewLoaded(object view)
- {
- base.OnViewLoaded(view);
- }
- protected override void OnActivate()
- {
- EnableTimer(true);
- base.OnActivate();
- _boatSlotCount = (int)QueryDataClient.Instance.Service.GetConfig("Boat.SlotCount");
- BoatZMinValue = (int)QueryDataClient.Instance.Service.GetConfig("Boat.ZMinPosition");
- BoatZMaxValue = (int)QueryDataClient.Instance.Service.GetConfig("Boat.ZMaxPosition");
- IsSimulateMode = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsSimulatorMode");
- _cycleNumber = (int)QueryDataClient.Instance.Service.GetConfig("CarrierRobot.TransferModeNumber");
- _cycleSwapNumber = (int)QueryDataClient.Instance.Service.GetConfig("CarrierRobot.RunToRunNumber");
- _waferRobotCycleNumber = (int)QueryDataClient.Instance.Service.GetConfig("WaferRobot.TransferModeNumber");
- CycleCountVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("CarrierRobot.TransferMode") ? Visibility.Visible : Visibility.Hidden;
- WaferRobotCycleCountVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("WaferRobot.TransferMode") ? Visibility.Visible : Visibility.Hidden;
- Stocker1Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker1Installed");
- Stocker2Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker2Installed");
- Stocker3Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker3Installed");
- Stocker4Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker4Installed");
- Stocker5Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker5Installed");
- Stocker6Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker6Installed");
- Stocker7Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker7Installed");
- Stocker8Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker8Installed");
- Stocker9Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker9Installed");
- Stocker10Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker10Installed");
- Stocker11Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker11Installed");
- Stocker12Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker12Installed");
- Stocker13Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker13Installed");
- Stocker14Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker14Installed");
- Stocker15Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker15Installed");
- Stocker16Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker16Installed");
- Stocker17Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker17Installed");
- Stocker18Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker18Installed");
- }
- string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
- "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18",
- "FIMS1","FIMS2","CarrierRobot","WaferRobot","PM1"};
- //string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
- // "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18",
- // "FIMS1","FIMS2","CarrierRobot","LP1","LP2","LP3","LP4"};
- protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
- {
- base.InvokeAfterUpdateProperty(data);
- //IsShowBoatElevatorRobot = RefreshBoatWafersTask();
- // if (Stocker1CarrierData != null)
- // Stocker1CarrierData = new CarrierInfo(10)
- // { Status = CarrierStatus.Normal, HasWaferIn=true };
- // Stocker1CassetteType = "ED";//(bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.IsStocker1Installed") && Stocker1CarrierData?.Status.ToString() == "Normal" ? Stocker1CarrierData?.CarrierType.ToString() : "";
- foreach (var item in moduleNames)
- {
- if (ModuleManager.ModuleInfos.ContainsKey(item))
- {
- this.GetType().GetProperty($"{item}WaferCount").SetValue(this, ModuleManager.ModuleInfos[item].WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count());
- }
- }
- if (ModuleManager.ModuleInfos.ContainsKey("WaferRobot"))
- {
- WaferInfo[] waferInfos = ModuleManager.ModuleInfos["WaferRobot"].WaferManager.Wafers.ToArray();
- WaferRobotWafer1 = waferInfos[0];
- WaferRobotWafer2 = waferInfos[1];
- }
- var isLoadPortPosition = (string)QueryDataClient.Instance.Service.GetConfig("LoadPort.LoadPortPosition");
- if (isLoadPortPosition == "Upper")
- {
- IsStockerVisibility = Visibility.Hidden;
- IsLPVisibility = Visibility.Visible;
- LPPortCanvasTop = 5;
- }
- else
- {
- IsStockerVisibility = Visibility.Visible;
- IsLPVisibility = Visibility.Hidden;
- LPPortCanvasTop = 352;
- }
- RefreshBoatWafers();
- }
- private void RefreshBoatWafers()
- {
- var wafers = ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Reverse().ToList();
- int NumberP = 0, NumberM1 = 0, NumberM2 = 0, NumberSD = 0, NumberED = 0, NumberT = 0, NumberXD = 0;
- for (int i = 0; i < wafers.Count; i++)
- {
- if (ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Count > i)
- {
- var wafer = wafers[i];
- if (wafer.WaferStatus != 0)//empty
- {
- switch (wafer.WaferType.ToString())
- {
- case "P":
- NumberP++;
- break;
- case "M1":
- NumberM1++;
- break;
- case "M2":
- NumberM2++;
- break;
- case "SD":
- NumberSD++;
- break;
- case "ED":
- NumberED++;
- break;
- }
- }
- }
- }
- BoatPWaferCount = NumberP;
- BoatM1WaferCount = NumberM1;
- BoatM2WaferCount = NumberM2;
- BoatSDWaferCount = NumberSD;
- BoatEDWaferCount = NumberED;
- BoatEmptyWaferCount = _boatSlotCount - BoatPWaferCount - BoatM1WaferCount - BoatM2WaferCount - BoatSDWaferCount - BoatEDWaferCount;
- BoatAllWaferCount = $"{BoatPWaferCount + BoatM1WaferCount + BoatM2WaferCount + BoatSDWaferCount + BoatEDWaferCount}/{_boatSlotCount}";
- }
- private bool RefreshBoatWafersTask()
- {
- var wafers = ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Reverse().ToList();
- for (int i = 0; i < (int)QueryDataClient.Instance.Service.GetConfig("Boat.SlotCount"); i++)
- {
- if (ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Count > i)
- {
- var wafer = wafers[i];
- if (wafer.WaferStatus != 0)//empty
- {
- return true;
- }
- }
- }
- return false;
- }
- public void SwitchPage(string page)
- {
- }
- public void Abort()
- {
- InvokeClient.Instance.Service.DoOperation("System.Abort");
- }
- public void CreateCassette(string module)
- {
- InvokeClient.Instance.Service.DoOperation("CreateCarrier", module, 0);
- }
- public void DeleteCassette(string module)
- {
- InvokeClient.Instance.Service.DoOperation("DeleteCarrier", module, 0);
- }
- public void Home(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Home");
- }
- public void HomeAll()
- {
- InvokeClient.Instance.Service.DoOperation("System.HomeAll");
- }
- public void CassetteIn()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.CassetteRobot}.In");
- }
- public void CassetteOut()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.CassetteRobot}.Out");
- }
- public void ShowSensors()
- {
- //WindowManager wm = new WindowManager();
- //SensorsViewModel svm = new SensorsViewModel();
- //wm.ShowDialogWithTitle(svm, null, "Sensor Information");
- }
- public void BoatWafers()
- {
- //WindowManager wm = new WindowManager();
- //BoatWaferViewModel svm = new BoatWaferViewModel();
- //wm.ShowDialogWithTitle(svm, null, "Boat Wafer");
- }
- public void WaferRobotWafers()
- {
- //WindowManager wm = new WindowManager();
- //WaferRobotWaferViewModel svm = new WaferRobotWaferViewModel();
- //wm.ShowDialogWithTitle(svm, null, "Wafer Robot Wafer");
- }
- public void StageWafers()
- {
- //WindowManager wm = new WindowManager();
- //StageCassetteViewModel svm = new StageCassetteViewModel();
- //wm.ShowDialogWithTitle(svm, null, "Stage Wafer");
- }
- public void CassetteRobotWafers()
- {
- //WindowManager wm = new WindowManager();
- //CassetteRobotWaferViewModel svm = new CassetteRobotWaferViewModel();
- //wm.ShowDialogWithTitle(svm, null, "Cassette Robot Wafer");
- }
- protected override void Poll()
- {
- if (GetView() != null)
- {
- //Application.Current.Dispatcher.Invoke(() =>
- //{
- // ((SelfCheckView)GetView()).ATMArmRobotTwo.Wafer1 = WaferRobotWafer1;
- //}
- //);
- }
- base.Poll();
- }
- public void DeleteWafer()
- {
- InvokeClient.Instance.Service.DoOperation("System.DeleteAllWafer");
- }
- public void DeleteCarrier()
- {
- InvokeClient.Instance.Service.DoOperation("System.DeleteAllCarrier");
- }
- public void Reset()
- {
- InvokeClient.Instance.Service.DoOperation("System.Reset");
- }
- public void ManualOperation(string deviceName)
- {
- var windowManager = IoC.Get<IWindowManager>();
- switch (deviceName)
- {
- case "LP1":
- {
- LPSensorViewModel lpViewModel = new LPSensorViewModel();
- lpViewModel.LP1BorderVisibility = true;
- lpViewModel.LP2BorderVisibility = false;
- lpViewModel.LP3BorderVisibility = false;
- lpViewModel.LP4BorderVisibility = false;
- lpViewModel.TabSelectIndex = 0;
- (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, null, "LP1 Manual");
- }
- break;
- case "LP2":
- {
- LPSensorViewModel lpViewModel = new LPSensorViewModel();
- lpViewModel.LP1BorderVisibility = false;
- lpViewModel.LP2BorderVisibility = true;
- lpViewModel.LP3BorderVisibility = false;
- lpViewModel.LP4BorderVisibility = false;
- lpViewModel.TabSelectIndex =1;
- (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, null, "LP2 Manual");
- }
- break;
- case "LP3":
- {
- LPSensorViewModel lpViewModel = new LPSensorViewModel();
- lpViewModel.LP1BorderVisibility = false;
- lpViewModel.LP2BorderVisibility = false;
- lpViewModel.LP3BorderVisibility = true;
- lpViewModel.LP4BorderVisibility = false;
- lpViewModel.TabSelectIndex = 2;
- (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, null, "LP3 Manual");
- }
- break;
- case "LP4":
- {
- LPSensorViewModel lpViewModel = new LPSensorViewModel();
- lpViewModel.LP1BorderVisibility = false;
- lpViewModel.LP2BorderVisibility = false;
- lpViewModel.LP3BorderVisibility = false;
- lpViewModel.LP4BorderVisibility = true;
- lpViewModel.TabSelectIndex = 3;
- (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, null, "LP4 Manual");
- }
- break;
- case "FIMS1":
- case "FIMS2":
- {
- FIMSSensorViewModel fimsSensorViewModel = new FIMSSensorViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(fimsSensorViewModel, null, "FIMS Manual");
- }
- break;
-
- default:
- break;
- }
- }
- public void PopupPage(string page)
- {
- var windowManager = IoC.Get<IWindowManager>();
- switch (page)
- {
- case "SMIFA":
- {
- SMIFViewModel smifViewModel = new SMIFViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(smifViewModel, null, "SMIF Status");
- }
- break;
- case "SMIFB":
- {
- SMIFViewModel smifViewModel = new SMIFViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(smifViewModel, null, "SMIF Status");
- }
- break;
- case "CassetteRobot":
- CassetteRobotViewModel cassetteRobotViewModel = new CassetteRobotViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(cassetteRobotViewModel, null, "CassetteRobot Status");
- break;
- case "WaferRobot":
- WaferRobotViewModel waferRobotViewModel = new WaferRobotViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(waferRobotViewModel, null, "WaferRobot Status");
- break;
- case "Stage":
- StageSensorViewModel stageSensorViewModel = new StageSensorViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(stageSensorViewModel, null, "Stage Status");
- break;
- case "Stocker":
- StockerSensorViewModel stockerSensorViewModel = new StockerSensorViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(stockerSensorViewModel, null, "Stocker Status");
- break;
- case "Boat":
- BoatSensorViewModel boatSensorViewModel = new BoatSensorViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(boatSensorViewModel, null, "Boat Status");
- break;
- default:
- break;
- }
- }
- public void CanvasMouseLeftButtonDown(object sender)
- {
- //var windowManager = IoC.Get<IWindowManager>();
- //Point pp = Mouse.GetPosition((IInputElement)sender);
- //if ((pp.X > 80 && pp.X < 310 && pp.Y > 80 && pp.Y < 340) || (pp.X > 350 && pp.X < 550 && pp.Y > 80 && pp.Y < 400))
- //{
- // StockerSensorViewModel stockerSensorViewModel = new StockerSensorViewModel();
- // (windowManager as WindowManager)?.ShowDialogWithTitle(stockerSensorViewModel, null, "Stocker Status");
- //}
- //else if (pp.X > 350 && pp.X < 500 && pp.Y > 410 && pp.Y < 625)
- //{
- // StageSensorViewModel stageSensorViewModel = new StageSensorViewModel();
- // (windowManager as WindowManager)?.ShowDialogWithTitle(stageSensorViewModel, null, "Stage Status");
- //}
- //else if (pp.X > 590 && pp.X < 755 && pp.Y > 100 && pp.Y < 620)
- //{
- // BoatSensorViewModel boatSensorViewModel = new BoatSensorViewModel();
- // (windowManager as WindowManager)?.ShowDialogWithTitle(boatSensorViewModel, null, "Boat Status");
- //}
- }
- public void BoatModify()
- {
- var windowManager = IoC.Get<IWindowManager>();
- BoatModifyViewModel boatModifyViewModel = new BoatModifyViewModel(ModuleName.PM1.ToString());
- (windowManager as WindowManager)?.ShowDialogWithTitle(boatModifyViewModel, null, "Boat Wafer");
- }
- public void PopupModule(string module)
- {
- var windowManager = IoC.Get<IWindowManager>();
- switch (module)
- {
- case "Init":
- SelfCheckInitViewModel shelfCheckInitViewModel = new SelfCheckInitViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckInitViewModel, null, "Init");
- break;
- case "ManualOperation":
- SelfCheckManualOperationViewModel shelfCheckManualOperationViewModel = new SelfCheckManualOperationViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckManualOperationViewModel, null, "Manual Operation");
- break;
- case "Modify":
- SelfCheckModifyViewModel shelfCheckModifyViewModel = new SelfCheckModifyViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckModifyViewModel, null, "Modify");
- break;
- //case "SensorStatus":
- // SensorsViewModel sensorsViewModel = new SensorsViewModel();
- // (windowManager as WindowManager)?.ShowDialogWithTitle(sensorsViewModel, null, "Sensor Status");
- // break;
- }
- }
- public void RobotCommand()
- {
- var windowManager = IoC.Get<IWindowManager>();
- RobotCommandViewModel robotCommandViewModel = new RobotCommandViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(robotCommandViewModel, null, "Modify");
- }
- public void CloseCmd()
- {
- ClientApp.Instance.SwitchPage("status", "main", null);
- }
- public void ReturnWafer()
- {
- InvokeClient.Instance.Service.DoOperation("System.ReturnAllWafer");
- }
- }
- }
|