1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546 |
- 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");
- }
- }
- }
|