| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091 |
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.Util;
- using Caliburn.Micro;
- using Caliburn.Micro.Core;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.OperationCenter;
- using MECF.Framework.UI.Client.ClientBase;
- using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Windows;
- using System.Windows.Media;
- using FurnaceUI.Client;
- using FurnaceUI.Models;
- using FurnaceUI.Views.Jobs;
- using FurnaceUI.Views.Recipes;
- using FurnaceUI.Views.Editors;
- using MECF.Framework.Common.SubstrateTrackings;
- using FurnaceUI.Views.Status;
- using OpenSEMI.ClientBase;
- using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
- using FurnaceUI.Controls.Common;
- using MECF.Framework.Common.CommonData;
- using System;
- using MECF.Framework.Common.Jobs;
- using FurnaceUI.Common;
- using System.IO;
- namespace FurnaceUI.Views.Operations
- {
- public class StatusViewModel : FurnaceUIViewModelBase
- {
- #region Property
- [Subscription("PM1.CheckO2Location")]
- public string CheckO2Location { get; set; }
- [Subscription("PM1.N2PurgeLimitData")]
- public float N2PurgeLimitData { get; set; }
- [Subscription("PM1.O2DensityData")]
- public string O2DensityData { get; set; }
- private bool _isShowMFCBySetPoint = false;
- [Subscription("LP1.CurrentLotId")]
- public string LP1CurrentLotId { get; set; }
- [Subscription("LP1.WaitLotId")]
- public List<string> LP1WaitLotId { get; set; }
- [Subscription("LP2.CurrentLotId")]
- public string LP2CurrentLotId { get; set; }
- [Subscription("LP2.WaitLotId")]
- public List<string> LP2WaitLotId { get; set; }
- [Subscription("TransferState", "LP1")]
- public string TransferStateLp1 { get; set; }
- [Subscription("TransferState", "LP2")]
- public string TransferStateLp2 { get; set; }
- [Subscription("CarrierIDStatus", "LP1")]
- public string CarrierStatusLP1 { get; set; }
- [Subscription("CarrierIDStatus", "LP2")]
- public string CarrierStatusLP2 { get; set; }
- [Subscription("CarrierRobot.RobotMoveInfo")]
- public RobotMoveInfo CassetteRobotMoveInfo { get; set; }
- [Subscription("WaferRobot.RobotMoveInfo")]
- public RobotMoveInfo WaferRobotMoveInfo { get; set; }
- [Subscription("ProcessFlow.Status")]
- public string ProcessFlowStatus { get; set; }
- double _eDUseWarningLimit;
- double _eDUseAlarmLimit;
- SolidColorBrush _greenBk = new SolidColorBrush(Colors.LawnGreen);
- SolidColorBrush _redBk = new SolidColorBrush(Colors.Red);
- SolidColorBrush _transparentBk = new SolidColorBrush(Colors.Transparent);
- SolidColorBrush _orangeBk = new SolidColorBrush(Colors.Orange);
- SolidColorBrush _blackBk = new SolidColorBrush(Colors.Black);
- public SolidColorBrush StandbyBk
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return _transparentBk;
- return ProcessFlowStatus == "Standby" ? _greenBk : _transparentBk;
- }
- }
- public SolidColorBrush ReadyBk
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return _transparentBk;
- return (ProcessFlowStatus == "Standby" || ProcessFlowStatus == "Ready") ? _greenBk : _transparentBk;
- }
- }
- public SolidColorBrush EndBk
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return _transparentBk;
- return ProcessFlowStatus == "End" ? _greenBk : _transparentBk;
- }
- }
- public SolidColorBrush RunBk
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return _transparentBk;
- return (ProcessFlowStatus == "End" || ProcessFlowStatus == "Run") ? _greenBk : _transparentBk;
- }
- }
- public SolidColorBrush AbortBk
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return _transparentBk;
- return ProcessFlowStatus == "Abort" ? _redBk : _transparentBk;
- }
- }
- #region Job Staus
- [Subscription("System.Batch")]
- public string Batch { get; set; }
- [Subscription("System.TransferJobStatus")]
- public string TransferJobStatus { get; set; }
- public SolidColorBrush TransferJobBk
- {
- get
- {
- return TransferJobStatus == "Idle" || string.IsNullOrEmpty(TransferJobStatus) ? _transparentBk : _greenBk;
- }
- }
- [Subscription("System.ProcessJobStatus")]
- public string ProcessJobStatus { get; set; }
- [Subscription("System.Pause")]
- public bool IsPause { get; set; }
- public string ProcessJobsStatus
- {
- get
- {
- return (string.IsNullOrEmpty(Batch) || ProcessJobStatus == "Idle") ? ProcessJobStatus : $"{Batch} : {ProcessJobStatus}";
- }
- }
- public SolidColorBrush ProcessJobBk
- {
- get
- {
- if (IsPause)
- {
- return _orangeBk;
- }
- else
- {
- return ProcessJobStatus == "Idle" || string.IsNullOrEmpty(ProcessJobsStatus) ? _transparentBk : _greenBk;
- }
- return _transparentBk;
- }
- }
- #endregion
- #region SMIF
- [Subscription("LP1.Status")]
- public string LP1Status { get; set; }
- public string Lp1StatusBackground
- {
- get { return ModuleStatusBackground.GetStatusBackground(LP1Status); }
- }
- [Subscription("Boat.Status")]
- public string BoatStatus { get; set; }
- public string BoatStatusBackground
- {
- get { return ModuleStatusBackground.GetStatusBackground(BoatStatus); }
- }
- [Subscription("LP2.Status")]
- public string LP2Status { get; set; }
- public string LP2StatusBackground
- {
- get { return ModuleStatusBackground.GetStatusBackground(LP2Status); }
- }
- #endregion
- #region Stocker
- private List<ModuleName> _stokcers;
- private List<string> _stokcerWaferType;
- private int _cassetteSlot = 0;
- private ObservableCollection<string> _stockerSlots;
- public ObservableCollection<string> StockerSlots
- {
- get { return _stockerSlots; }
- set
- {
- _stockerSlots = value;
- NotifyOfPropertyChange("StockerSlots");
- }
- }
- private SolidColorBrush _WhiteFill = new SolidColorBrush(Colors.White);
- private SolidColorBrush _productionFill = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#bedadb"));
- private SolidColorBrush _SD_ED_M_Fill = new SolidColorBrush((Color)ColorConverter.ConvertFromString("LightGray"));
- private SolidColorBrush _waringFill = new SolidColorBrush(Colors.Yellow);
- private SolidColorBrush _alarmFill = new SolidColorBrush(Colors.Red);
- private List<SolidColorBrush> _stockerBackground = new List<SolidColorBrush>();
- public List<SolidColorBrush> StockerBackground
- {
- get => _stockerBackground;
- set
- {
- _stockerBackground = value;
- NotifyOfPropertyChange(nameof(StockerBackground));
- }
- }
- [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("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("CarrierRobot.Carrier")]
- public CarrierInfo CassetteRobotCarrierData { 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; }
- 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;
- #endregion
- #region Heater
- [Subscription("System.HeaterU.DeviceData")]
- public AITHeaterData HeaterUData { get; set; }
- [Subscription("System.HeaterCU.DeviceData")]
- public AITHeaterData HeaterCUData { get; set; }
- [Subscription("System.HeaterC.DeviceData")]
- public AITHeaterData HeaterCData { get; set; }
- [Subscription("System.HeaterCL.DeviceData")]
- public AITHeaterData HeaterCLData { get; set; }
- [Subscription("System.HeaterL.DeviceData")]
- public AITHeaterData HeaterLData { get; set; }
- public AITHeaterData BottomHeaterData => HeaterLData;
- public AITHeaterData CenterBottomHeaterData => HeaterCLData;
- public AITHeaterData CenterHeaterData => HeaterCData;
- public AITHeaterData TopCenterHeaterData => HeaterCUData;
- public AITHeaterData TopHeaterData => HeaterUData;
- public int ControlMode => HeaterUData.ControlMode;
- #endregion
- #region Robot
- [Subscription("WaferRobot.Status")]
- public string WaferRobotStatus { get; set; }
- public string WaferRobotStatusBackground
- {
- get { return ModuleStatusBackground.GetStatusBackground(WaferRobotStatus); }
- }
- [Subscription("CarrierRobot.Status")]
- public string CarrierRobotStatus { get; set; }
- public string CarrierRobotStatusBackground
- {
- get { return ModuleStatusBackground.GetStatusBackground(CarrierRobotStatus); }
- }
- #endregion
- #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
- #region PM
- [Subscription("PM1.Status")]
- public string PM1Status { get; set; }
- [Subscription("PM1.RecipeBeginTime")]
- public DateTime PM1RecipeBeginTime { get; set; }
- [Subscription("PM1.RecipeStepName")]
- public string PM1RecipeStepName { get; set; }
- [Subscription("PM1.RecipeNextStepName")]
- public string PM1RecipeNextStepName { get; set; }
- [Subscription("PM1.RecipeStepNumber")]
- public int PM1RecipeStepNumber { get; set; }
- [Subscription("PM1.RecipeStepElapseTime")]
- public double PM1RecipeStepElapseTime { get; set; }
- [Subscription("PM1.RecipeStepTime")]
- public double PM1RecipeStepTime { get; set; }
- [Subscription("PM1.RecipeTotalElapseTime")]
- public double PM1RecipeTotalElapseTime { get; set; }
- [Subscription("PM1.RecipeTotalTime")]
- public double PM1RecipeTotalTime { get; set; }
- [Subscription("PM1.RecipeHoldTime")]
- public double PM1RecipeHoldTime { get; set; }
- [Subscription("PM1.RecipeHold")]
- public bool PM1RecipeHold { get; set; }
- [Subscription("PM1.RecipeHolded")]
- public bool PM1RecipeHolded { get; set; }
- [Subscription("PM1.RecipeWait")]
- public bool PM1RecipeWait { get; set; }
- [Subscription("PM1.NewShowTime")]
- public double PM1NewShowTime { get; set; }
- [Subscription("PM1.IsExecuteAbortRecipe")]
- public bool PM1IsExecuteAbortRecipe { get; set; }
- [Subscription("PM1.ExecRecipeType")]
- public string PM1ExecRecipeType { get; set; }
- [Subscription("PM1.LoopCountSet")]
- public int PM1LoopCountSet { get; set; }
- [Subscription("PM1.LoopCountCurrent")]
- public int PM1LoopCountCurrent { get; set; }
- [Subscription("PM1.IsLooping")]
- public bool PM1IsLooping { get; set; }
- [Subscription("Scheduler.CoolingTime")]
- public int CoolingTime { get; set; }
- [Subscription("Scheduler.CoolingRemainTime")]
- public int CoolingRemainTime { get; set; }
- public string LoopInfo
- {
- get
- {
- if (!IsPM1Process || !PM1IsLooping)
- return "--";
- return $"{PM1ExecRecipeType} : {PM1LoopCountCurrent} / {PM1LoopCountSet}";
- }
- }
- [Subscription("PM1.SubRecipeCurrentLoopCount")]
- public int PM1SubRecipeCurrentLoopCount { get; set; }
- [Subscription("PM1.ProcessSubRecipe")]
- public string ProcessSubRecipe { get; set; }
- [Subscription("PM1.ProcessAbortRecipe")]
- public string ProcessAbortRecipe { get; set; }
- [Subscription("PM1.SubRecipeLoopCount")]
- public int PM1SubRecipeLoopCount { get; set; }
- [Subscription("PM1.IsExecuteSubRecipe")]
- public bool PM1IsExecuteSubRecipe { get; set; }
- [Subscription("PM1.ProcessSubRecipeTable")]
- public string PM1SubTable { get; set; }
- public string SubInfo
- {
- get
- {
- if (!IsPM1Process || !PM1IsExecuteSubRecipe)
- return "--";
- return $"{PM1ExecRecipeType} : {PM1SubRecipeCurrentLoopCount} / {PM1SubRecipeLoopCount}";
- }
- }
- public bool IsPM1Idle
- {
- get { return PM1Status == "Idle"; }
- }
- public bool IsPM1Process
- {
- get { return PM1Status == "Process"; }
- }
- public bool IsPM1PostProcess
- {
- get { return PM1Status == "PostProcess"; }
- }
- public bool IsPM1PreProcess
- {
- get { return PM1Status == "PreProcess"; }
- }
- public string PM1StepNumber
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- return $"{PM1RecipeStepNumber}";
- }
- }
- public string PM1StepName
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- return $"{PM1RecipeStepName}";
- }
- }
- public string PM1NextStepName
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- return $"{PM1RecipeNextStepName}";
- }
- }
- public string PM1BeginTime
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- return $"{PM1RecipeBeginTime.ToString("yyyy-MM-dd HH:mm:ss")}";
- }
- }
- private bool isCoolingFrist = false;
- private DateTime firstCoolingTime = DateTime.MinValue;
- public string PM1EndTime
- {
- get
- {
- if (LocalProcessJobs != null && LocalProcessJobs.Where(x => x.ProcessingState == EnumProcessingState.CoolingBeforeDischarge) != null)
- {
- if (!isCoolingFrist)
- {
- TimeSpan secondSpan = DateTime.Now - PM1RecipeBeginTime;
- firstCoolingTime = PM1RecipeBeginTime.AddSeconds(secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
- isCoolingFrist = true;
- }
- }
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- if (isCoolingFrist)
- {
- isCoolingFrist = false;
- firstCoolingTime = DateTime.MinValue;
- }
- return $"{CalEndTime(PM1RecipeBeginTime, PM1RecipeTotalTime, PM1RecipeTotalElapseTime)}";
- }
- }
- public string PM1StepTime
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- if (PM1RecipeHolded && PM1RecipeHoldTime > 0)
- return "--";
- return CalStepTime(PM1RecipeStepElapseTime, PM1RecipeStepTime);
- }
- }
- public string PM1RecipeTime
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- return CalRecipeTime(PM1RecipeTotalElapseTime, PM1RecipeTotalTime);
- }
- }
- public string PM1HoldTime
- {
- get
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- return CalHoldTime(PM1NewShowTime);
- }
- }
- public string PM1HoldName
- {
- get
- {
- return "Hold Time";
- }
- }
- public string HoldName
- {
- get
- {
- if (PM1RecipeHold)
- return "Continue";
- return "Hold";
- }
- }
- public string HoldWaitDisplay
- {
- get
- {
- if (PM1Status == "Idle")
- {
- return "";
- }
- else
- {
- if (PM1RecipeWait)
- return "W";
- if (PM1RecipeHolded)
- return "H";
- return "";
- }
- }
- }
- public SolidColorBrush HoldForeground
- {
- get
- {
- if (PM1RecipeHold)
- return _blackBk;
- return _redBk;
- }
- }
- [Subscription("PM1.SelectedRecipeName")]
- public string PM1SelectedRecipeName
- {
- get;
- set;
- }
- [Subscription("PM1.MainRecipeName")]
- public string PM1MainRecipeName
- {
- get;
- set;
- }
- public string PM1SelectedRecipeNameDisplay
- {
- get
- {
- if (string.IsNullOrEmpty(PM1SelectedRecipeName))
- return string.Empty;
- if (!IsPM1Process && !IsPM1PostProcess)
- return string.Empty;
- if (PM1IsExecuteSubRecipe && !string.IsNullOrEmpty(ProcessSubRecipe))
- {
- return Path.GetFileName(ProcessSubRecipe);
- }
- //return PM1SelectedRecipeName.Substring("Furnace\\Process\\".Length);
- return Path.GetFileName(PM1SelectedRecipeName);
- }
- }
- [Subscription("PM1.IsOnline")]
- public bool PM1IsOnline { get; set; }
- public bool PM1IsOffline
- {
- get { return !PM1IsOnline; }
- }
- public bool IsEnableEmergencyAbort
- {
- get
- {
- return PM1Status != "Init" && PM1Status != "Idle";
- }
- }
- private string CalStepTime(double elapseTime, double totalTime)
- {
- string stepTime = string.Empty;
- double remainingTime = totalTime - elapseTime;
- if (remainingTime < 0)
- remainingTime = 0;
- string strElapseTimeH = $"{(elapseTime / 3600).ToString().PadLeft(2, '0')}";
- string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString().PadLeft(2, '0')}";
- string strElapseTimeS = $"{(elapseTime % 60).ToString().PadLeft(2, '0')}";
- string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
- string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
- string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
- stepTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
- return stepTime;
- }
- private string CalRecipeTime(double elapseTime, double totalTime)
- {
- string recipeTime = string.Empty;
- double remainingTime = totalTime - elapseTime;
- if (remainingTime < 0)
- remainingTime = 0;
- string strElapseTimeH = $"{(elapseTime / 3600).ToString("f0").PadLeft(2, '0')}";
- string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString("f0").PadLeft(2, '0')}";
- string strElapseTimeS = $"{(elapseTime % 60).ToString("f0").PadLeft(2, '0')}";
- string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
- string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
- string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
- recipeTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
- return recipeTime;
- }
- private string CalHoldTime(double totalTime)
- {
- string holdTime = string.Empty;
- string strHoldTimeH = $"{((int)(totalTime / 3600)).ToString("f0").PadLeft(2, '0')}";
- string strHoldTimeM = $"{((int)(totalTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
- string strHoldTimeS = $"{(totalTime % 60).ToString("f1").PadLeft(2, '0')}";
- holdTime = $"{strHoldTimeH}:{strHoldTimeM}:{strHoldTimeS}";
- return holdTime;
- }
- private string _recipeProgress;
- public string RecipeProgress
- {
- get => _recipeProgress;
- set
- {
- _recipeProgress = value;
- NotifyOfPropertyChange(nameof(RecipeProgress));
- }
- }
- private int _recipeProgressValue;
- public int RecipeProgressValue
- {
- get => _recipeProgressValue;
- set
- {
- _recipeProgressValue = value;
- NotifyOfPropertyChange(nameof(RecipeProgressValue));
- }
- }
- #endregion
- #region Scheduler
- public bool IsRtInitialized
- {
- get
- {
- return RtStatus != "Init" && RtStatus != "Initializing";
- }
- }
- public bool IsRtRunning
- {
- get
- {
- return RtStatus != "Init" && RtStatus != "Idle" && RtStatus != "AutoIdle";
- }
- }
- public bool IsRtError
- {
- get
- {
- return RtStatus == "Error";
- }
- }
- public bool IsAuto
- {
- get { return RtStatus == "Auto_Running" || RtStatus == "Auto_Idle"; }
- }
- [Subscription("Rt.Status")]
- public string RtStatus { get; set; }
- public bool _isCycleMode;
- public Visibility IsCycleInfoVisibility
- {
- get { return _isCycleMode ? Visibility.Visible : Visibility.Collapsed; }
- }
- [Subscription("Scheduler.CycledCount")]
- public int CycledCount { get; set; }
- [Subscription("Scheduler.CycledWafer")]
- public int CycledWafer { get; set; }
- [Subscription("Scheduler.CycledTotalWafer")]
- public int TotalCycledWafer { get; set; }
- [Subscription("Scheduler.CycleSetPoint")]
- public int CycleSetPoint { get; set; }
- public string CycleCountDisplay
- {
- get { return (CycleSetPoint > 0 && (CycledCount > CycleSetPoint)) ? $"{CycledCount + 1}/{CycleSetPoint}" : $"{CycledCount}/{CycleSetPoint}"; }
- }
- [Subscription("Scheduler.ControlJobList")]
- public List<ControlJobInfo> LocalControlJobs
- {
- get;
- set;
- }
- [Subscription("Scheduler.ProcessJobList")]
- public List<ProcessJobInfo> LocalProcessJobs
- {
- get;
- set;
- }
- public string ControlJobStatus
- {
- get
- {
- if (LocalControlJobs == null || LocalControlJobs.Count == 0)
- return "";
- foreach (var cj in LocalControlJobs)
- {
- if (cj == null)
- continue;
- return cj.State.ToString();
- }
- return "";
- }
- }
- public string ControlJob1ID
- {
- get
- {
- if (LocalControlJobs == null || LocalControlJobs.Count == 0)
- return "";
- var cj = LocalControlJobs[0];
- return cj.Name;
- }
- }
- public string ControlJob2ID
- {
- get
- {
- if (LocalControlJobs == null || LocalControlJobs.Count <= 1)
- return "";
- var cj = LocalControlJobs[1];
- return cj.Name;
- }
- }
- public string ProcessJob1ID
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
- return "";
- var pj = LocalProcessJobs[0];
- return pj.Name;
- }
- }
- public string ProcessJob1StartTime
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
- return "";
- var pj = LocalProcessJobs[0];
- return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- public string TotolProcessJob1EndTime
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
- return "";
- var pj = LocalProcessJobs[0];
- var beginTime = pj.BeginTime;
- if (pj.BeginTime.Equals(DateTime.MinValue))
- {
- return "";
- }
- if (pj.ProcessingState == EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
- {
- return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
- }
- else
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- TimeSpan secondSpan = DateTime.Now - beginTime;
- var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
- return retime.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- }
- public string ProcessJob1Status
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
- return "";
- var pj = LocalProcessJobs[0];
- return pj.ProcessingState.ToString();
- }
- }
- public string TotolProcessJob2EndTime
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
- return "";
- var pj = LocalProcessJobs[1];
- var beginTime = pj.BeginTime;
- if (pj.BeginTime.Equals(DateTime.MinValue))
- {
- return "";
- }
- if (pj.ProcessingState == EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
- {
- return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
- }
- else
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- return "--";
- TimeSpan secondSpan = DateTime.Now - beginTime;
- var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
- return retime.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- }
- public string ProcessJob2ID
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
- return "";
- var pj = LocalProcessJobs[1];
- return pj.Name;
- }
- }
- public string ProcessJob2StartTime
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
- return "";
- var pj = LocalProcessJobs[1];
- if (pj.BeginTime.Equals(DateTime.MinValue))
- {
- return "------";
- }
- return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- public string ProcessJob2Status
- {
- get
- {
- if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
- return "";
- var pj = LocalProcessJobs[1];
- return pj.ProcessingState.ToString();
- }
- }
- #endregion
- #region Button Logic
- #endregion
- #region shutter
- [Subscription("AutoShutter.OpenCloseStatus")]
- public string AutoShutterOpenCloseStatus { get; set; }
- [Subscription("AutoShutter.UpDownStatus")]
- public string AutoShutterUpDownStatus { get; set; }
- public string AutoShutterStatus => $"{AutoShutterOpenCloseStatus}/{AutoShutterUpDownStatus}";
- #endregion
- #endregion
- public string DefaultUnit { get; set; }
- [Subscription("PM1.N2PurgeMode")]
- public string N2PurgeMode { get; set; }
- #region Gas
- [Subscription("PM1.MFCList")]
- public List<AITMfcData> MFCList { get; set; }
- #endregion
- [Subscription("CarrierRobot.Status")]
- public string CassetteRobotStatus { get; set; }
- private Visibility _isStocker1Visibility = Visibility.Collapsed;
- public Visibility IsStocker1Visibility
- {
- get { return _isStocker1Visibility; }
- set { _isStocker1Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker1Visibility)); }
- }
- private Visibility _isStocker2Visibility = Visibility.Collapsed;
- public Visibility IsStocker2Visibility
- {
- get { return _isStocker2Visibility; }
- set { _isStocker2Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker2Visibility)); }
- }
- private Visibility _isStocker3Visibility = Visibility.Collapsed;
- public Visibility IsStocker3Visibility
- {
- get { return _isStocker3Visibility; }
- set { _isStocker3Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker3Visibility)); }
- }
- private Visibility _isStocker4Visibility = Visibility.Collapsed;
- public Visibility IsStocker4Visibility
- {
- get { return _isStocker4Visibility; }
- set { _isStocker4Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker4Visibility)); }
- }
- private Visibility _isStocker5Visibility = Visibility.Collapsed;
- public Visibility IsStocker5Visibility
- {
- get { return _isStocker5Visibility; }
- set { _isStocker5Visibility = value; this.NotifyOfPropertyChange(nameof(_isStocker5Visibility)); }
- }
- private Visibility _isStocker6Visibility = Visibility.Collapsed;
- public Visibility IsStocker6Visibility
- {
- get { return _isStocker6Visibility; }
- set { _isStocker6Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker6Visibility)); }
- }
- private Visibility _isStocker7Visibility = Visibility.Collapsed;
- public Visibility IsStocker7Visibility
- {
- get { return _isStocker7Visibility; }
- set { _isStocker7Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker7Visibility)); }
- }
- private Visibility _isStocker8Visibility = Visibility.Collapsed;
- public Visibility IsStocker8Visibility
- {
- get { return _isStocker8Visibility; }
- set { _isStocker8Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker8Visibility)); }
- }
- private Visibility _isStocker9Visibility = Visibility.Collapsed;
- public Visibility IsStocker9Visibility
- {
- get { return _isStocker9Visibility; }
- set { _isStocker9Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker9Visibility)); }
- }
- private Visibility _isStocker10Visibility = Visibility.Collapsed;
- public Visibility IsStocker10Visibility
- {
- get { return _isStocker10Visibility; }
- set { _isStocker10Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker10Visibility)); }
- }
- private Visibility _isStocker11Visibility = Visibility.Collapsed;
- public Visibility IsStocker11Visibility
- {
- get { return _isStocker11Visibility; }
- set { _isStocker11Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker11Visibility)); }
- }
- private Visibility _isStocker12Visibility = Visibility.Collapsed;
- public Visibility IsStocker12Visibility
- {
- get { return _isStocker12Visibility; }
- set { _isStocker12Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker12Visibility)); }
- }
- private Visibility _isStocker13Visibility = Visibility.Collapsed;
- public Visibility IsStocker13Visibility
- {
- get { return _isStocker13Visibility; }
- set { _isStocker13Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker13Visibility)); }
- }
- private Visibility _isStocker14Visibility = Visibility.Collapsed;
- public Visibility IsStocker14Visibility
- {
- get { return _isStocker14Visibility; }
- set { _isStocker14Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker14Visibility)); }
- }
- private Visibility _isStocker15Visibility = Visibility.Collapsed;
- public Visibility IsStocker15Visibility
- {
- get { return _isStocker15Visibility; }
- set { _isStocker15Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker15Visibility)); }
- }
- private Visibility _isStocker16Visibility = Visibility.Collapsed;
- public Visibility IsStocker16Visibility
- {
- get { return _isStocker16Visibility; }
- set { _isStocker16Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker16Visibility)); }
- }
- private Visibility _isStocker17Visibility = Visibility.Collapsed;
- public Visibility IsStocker17Visibility
- {
- get { return _isStocker17Visibility; }
- set { _isStocker17Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker17Visibility)); }
- }
- private Visibility _isStocker18Visibility = Visibility.Collapsed;
- public Visibility IsStocker18Visibility
- {
- get { return _isStocker18Visibility; }
- set { _isStocker18Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker18Visibility)); }
- }
- public Visibility IsStockerVisibility { get; set; }
- public Visibility IsLPVisibility { get; set; }
- [Subscription("PM1.APC.DeviceData")]
- public AITAPCData APCData { get; set; }
- [Subscription("PM1.ValveAV75.DeviceData")]
- public AITValveData ValveAV75 { get; set; }
- public int FIMS1WaferCount { get; set; } = 0;
- public int FIMS2WaferCount { get; set; } = 0;
- public int CarrierRobotWaferCount { get; set; } = 0;
- public int WaferRobotWaferCount { get; set; } = 0;
- public int PM1WaferCount { get; set; } = 0;
- public string APCFeedbackView
- {
- get
- {
- if (ValveAV75 != null && ValveAV75.Feedback)
- {
- return APCData.Pressure1Feedback.ToString("F3");
- }
- return APCData.Pressure2Feedback.ToString("F1");
- }
- }
- public Visibility APCPressureView
- {
- get
- {
- if (ValveAV75 != null && ValveAV75.Feedback)
- {
- return Visibility.Visible;
- }
- return Visibility.Collapsed;
- }
- }
- 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 StatusViewModel()
- {
- this.DisplayName = "MainStatusViewModel";
- //ActiveUpdateData = true;
- _stokcers = new List<ModuleName>()
- {
- ModuleName.Stocker1,
- ModuleName.Stocker2,
- ModuleName.Stocker3,
- ModuleName.Stocker4,
- ModuleName.Stocker5,
- ModuleName.Stocker6,
- ModuleName.Stocker7,
- ModuleName.Stocker8,
- ModuleName.Stocker9,
- ModuleName.Stocker10,
- ModuleName.Stocker11,
- ModuleName.Stocker12,
- ModuleName.Stocker13,
- ModuleName.Stocker14,
- ModuleName.Stocker15,
- ModuleName.Stocker16,
- ModuleName.Stocker17,
- ModuleName.Stocker18,
- };
- StockerSlots = new ObservableCollection<string>()
- {
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- };
- _stokcerWaferType = Enumerable.Repeat("", 21).ToList();
- _eDUseWarningLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountWarning");
- _eDUseAlarmLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountAlarm");
- _stockerBackground = new List<SolidColorBrush>();
- for (int i = 0; i < 21; i++)
- {
- _stockerBackground.Add(_WhiteFill);
- }
- }
- protected override void OnInitialize()
- {
- base.OnInitialize();
- base.InitFOUP();
- base.InitLL();
- base.InitTM();
- base.InitEFEM();
- base.InitPM();
- base.InitBuffer();
- }
- protected override void OnActivate()
- {
- base.OnActivate();
- DefaultUnit = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.APC.PressureUnit");
- _isCycleMode = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsCycleMode");
- _cassetteSlot = (int)QueryDataClient.Instance.Service.GetConfig("System.CassetteSlotCount");
- for (int i = 0; i < _stokcers.Count; i++)
- {
- _stokcerWaferType[i] = (string)QueryDataClient.Instance.Service.GetConfig($"System.Stocker.{_stokcers[i]}WaferType");
- }
- IsStocker1Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker1Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker2Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker2Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker3Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker3Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker4Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker4Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker5Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker5Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker6Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker6Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker7Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker7Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker8Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker8Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker9Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker9Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker10Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker10Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker11Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker11Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker12Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker12Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker13Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker13Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker14Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker14Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker15Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker15Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker16Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker16Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker17Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker17Installed") ? Visibility.Visible : Visibility.Collapsed;
- IsStocker18Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker18Installed") ? Visibility.Visible : Visibility.Collapsed;
- }
- protected override void OnViewLoaded(object view)
- {
- base.OnViewLoaded(view);
- }
- public List<AITMfcData> GasDataList
- {
- get
- {
- var _gasDataList = new List<AITMfcData>();
- if (MFCList != null)
- {
- foreach (var item in MFCList)
- {
- if (item == null)
- {
- continue;
- }
- if (_isShowMFCBySetPoint)
- {
- if (item.SetPoint > 0)
- {
- _gasDataList.Add(item);
- }
- }
- else
- {
- _gasDataList.Add(item);
- }
- }
- }
- return _gasDataList;
- }
- }
- public void Start()
- {
- InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
- }
- public void Stop()
- {
- //InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
- }
- public void SwitchPage(string page)
- {
- var wm = IoC.Get<IWindowManager>();
- switch (page)
- {
- case "Stocker":
- ClientApp.Instance.SwitchPage("status", "stocker", null);
- break;
- case "TransferMain":
- ClientApp.Instance.SwitchPage("status", "TransferMain", null);
- break;
- case "N2Purge":
- ClientApp.Instance.SwitchPage("status", "N2PurgeStatus", null);
- break;
- case "Gas":
- {
- ClientApp.Instance.SwitchPage("status", "Gas", null);
- //CGlobal.BoatWaferEditViewEnable = false;
- ////var wm = IoC.Get<IWindowManager>();
- //GasDetailViewModel gasDetailViewModel = new GasDetailViewModel();
- //(wm as WindowManager)?.ShowDialogWithTitle(gasDetailViewModel, null, "Gas Detail");
- }
- break;
- case "Temp":
- ClientApp.Instance.SwitchPage("status", "temp", null);
- break;
- case "Pressure":
- {
- ClientApp.Instance.SwitchPage("status", "Pressure", null);
- // var wm = IoC.Get<IWindowManager>();
- //var viewPressureDetail = new PressureDetailViewModel();
- //(wm as WindowManager)?.ShowDialogWithTitle(viewPressureDetail, null, "Pressure Detail");
- }
- break;
- case "MainRecipe":
- if (!string.IsNullOrEmpty(PM1MainRecipeName))
- {
- CGlobal.RecipeProcessEditViewEnable = false;
- MECF.Framework.UI.Client.CenterViews.Editors.Recipe.CGlobal.RecipeProcessEditViewEnable = false;
- // var wm = IoC.Get<IWindowManager>();
- var viewProcessRecipeRecipeType = "Process";
- var recipeName = PM1MainRecipeName;
- if (PM1ExecRecipeType.Equals("Sub"))
- {
- recipeName = ProcessSubRecipe;
- }
- else
- {
- recipeName = PM1MainRecipeName;
- }
- if (PM1ExecRecipeType.Equals("Process") || PM1ExecRecipeType.Equals("Abort"))
- {
- viewProcessRecipeRecipeType = PM1ExecRecipeType;
- }
- else
- {
- viewProcessRecipeRecipeType = PM1ExecRecipeType.ToLower();
- }
- int tableIndex = 1;
- var table = PM1SubTable.Split(':');
- if (table.Length < 0 || !int.TryParse(table[0], out tableIndex))
- {
- tableIndex = 1;
- }
- var viewProcessRecipe = new RecipeProcessEditViewModel($"Furnace\\{viewProcessRecipeRecipeType}", recipeName, tableIndex: tableIndex);
- viewProcessRecipe.RecipeType = viewProcessRecipeRecipeType;
- viewProcessRecipe.IndexNoDefault = PM1RecipeStepNumber;
- viewProcessRecipe.SelectedStepName = PM1RecipeStepName;
- (wm as WindowManager)?.ShowDialogWithTitle(viewProcessRecipe, null, $"View {viewProcessRecipeRecipeType} Recpie");
- }
- break;
- case "PMCommand":
- //if (!string.IsNullOrEmpty(PM1MainRecipeName))
- //{
- // var wm = IoC.Get<IWindowManager>();
- var viewPMCommand = new PMCommandViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(viewPMCommand, this, null, "PM Command");
- //}
- break;
- case "LayoutRecipe":
- {
- CGlobal.BoatWaferEditViewEnable = false;
- // var wm = IoC.Get<IWindowManager>();
- var viewLayoutRecipe = new BoatWaferNoActionViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(viewLayoutRecipe, null, "View Boat Wafer");
- }
- break;
- case "Boat Elevator":
- {
- BoatElevatorParametersViewModel boatElevatorParametersViewModel = new BoatElevatorParametersViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(boatElevatorParametersViewModel, null, "Boat Elevator Parameter Settings");
- }
- break;
- case "CJStatus":
- {
- ClientApp.Instance.SwitchPage("status", "job", null);
- //ControlJobStatusViewModel controlJobStatusViewModel = new ControlJobStatusViewModel();
- //(wm as WindowManager)?.ShowDialogWithTitle(controlJobStatusViewModel, null, "CJ Status");
- }
- break;
- case "PJStatus":
- {
- ProcessJobWithDrawingViewModel processJobWithDrawingViewModel = new ProcessJobWithDrawingViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(processJobWithDrawingViewModel, null, "PJ Status");
- }
- break;
- case "LoadPortState":
- {
- LoadPortStateViewModel loadPortStateViewModel = new LoadPortStateViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(loadPortStateViewModel, null, "Load Port State");
- }
- break;
- case "CarrierState":
- {
- CarrierStateViewModel carrierStateViewModel = new CarrierStateViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(carrierStateViewModel, null, "Carrier State");
- }
- break;
- case "Equipment Status":
- {
- EquipmentStatusViewModel equipmentStatusViewModel = new EquipmentStatusViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(equipmentStatusViewModel, null, "Equipment Operation State");
- }
- break;
- case "Load Unload State":
- {
- LoadUnloadStateViewModel loadUnloadStateViewModel = new LoadUnloadStateViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(loadUnloadStateViewModel, null, "Load Unload State");
- }
- break;
- case "Boat Detail":
- {
- BoatWaferViewModel boatWaferViewModel = new BoatWaferViewModel();
- (wm as WindowManager)?.ShowDialogWithTitle(boatWaferViewModel, null, "Boat Detail");
- }
- break;
- }
- }
- 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"};
- protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
- {
- base.InvokeBeforeUpdateProperty(data);
- _isShowMFCBySetPoint = (bool)QueryDataClient.Instance.Service.GetConfig($"System.ShowMFCBySetPoint");
- }
- protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
- {
- UpdateStockerSlots();
- UpdateRecipeProgress();
- var isLoadPortPosition = (string)QueryDataClient.Instance.Service.GetConfig("LoadPort.LoadPortPosition");
- if (isLoadPortPosition == "Upper")
- {
- IsStockerVisibility = Visibility.Hidden;
- IsLPVisibility = Visibility.Visible;
- }
- else
- {
- IsStockerVisibility = Visibility.Visible;
- IsLPVisibility = Visibility.Hidden;
- }
- 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());
- }
- }
- NotifyOfPropertyChange("IsStocker1Visibility");
- }
- private void UpdateStockerSlots()
- {
- for (int i = 0; i < _stokcers.Count; i++)
- {
- bool bHaveAbort = false;
- var wafers = ModuleManager.ModuleInfos[_stokcers[i].ToString()].WaferManager.Wafers;
- int waferNumber = 0;
- string waferType = "";
- SolidColorBrush _tempFill = _SD_ED_M_Fill;
- if (wafers != null)
- {
- foreach (var wafer in wafers)
- {
- if (wafer.WaferStatus != 0)
- {
- waferNumber++;
- waferType = wafer.WaferType.ToString();
- if (wafer.WaferStatus == 5) // EnumWaferProcessStatus.Failed
- bHaveAbort = true;
- if (wafer.UseCount >= _eDUseWarningLimit)
- {
- _tempFill = _waringFill;
- }
- if (wafer.UseCount >= _eDUseAlarmLimit)
- {
- _tempFill = _alarmFill;
- }
- }
- }
- }
- StockerSlots[i] = $"{_stokcerWaferType[i]}-{waferNumber}/{_cassetteSlot}";
- if (_stokcerWaferType[i].Contains("P"))
- {
- if (waferNumber > 0)
- {
- if (bHaveAbort)
- StockerBackground[i] = _redBk;
- else
- StockerBackground[i] = _productionFill;
- }
- else
- {
- StockerBackground[i] = _WhiteFill;
- }
- }
- else
- {
- if (waferNumber > 0)
- {
- if (bHaveAbort)
- StockerBackground[i] = _redBk;
- else
- {
- StockerBackground[i] = _tempFill;
- }
- }
- else
- {
- StockerBackground[i] = _WhiteFill;
- }
- }
- }
- }
- private void UpdateRecipeProgress()
- {
- if (!IsPM1Process && !IsPM1PostProcess)
- {
- RecipeProgress = "";
- RecipeProgressValue = 0;
- return;
- }
- if (PM1RecipeTotalTime == 0)
- {
- RecipeProgress = "";
- RecipeProgressValue = 0;
- }
- else
- {
- double totalTime = PM1RecipeTotalTime;
- double elapseTime = PM1RecipeTotalElapseTime;
- float percentage = (float)(elapseTime / totalTime * 100);
- percentage = percentage > 100 ? 100 : percentage;
- RecipeProgress = $"{percentage.ToString("f1")}%";
- RecipeProgressValue = (int)(elapseTime / totalTime * 100);
- }
- }
- public void CanvasMouseLeftButtonDown(object sender)
- {
- }
- 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=-150, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{ "ArmA.Stocker2", new StationPosition() {
- StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker3", new StationPosition() {
- StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker4", new StationPosition() {
- StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker5", new StationPosition(){
- StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{"ArmA.Stocker6", new StationPosition(){
- StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker7", new StationPosition(){
- StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker8", new StationPosition(){
- StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker9", new StationPosition() {
- StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{ "ArmA.Stocker10", new StationPosition() {
- StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker11", new StationPosition() {
- StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }} }
- ,{"ArmA.Stocker12", new StationPosition(){
- StartPosition = new RobotPosition() { X =-325, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker13", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
- ,{ "ArmA.Stocker14", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker15", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{ "ArmA.Stocker16", new StationPosition() {
- StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker17", new StationPosition(){
- StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
- ,{"ArmA.Stocker18", new StationPosition(){
- StartPosition = new RobotPosition() { X = -250, 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 = -90, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
- ,{"ArmA.LP2", new StationPosition(){
- StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
- ,{"ArmA.LP3", new StationPosition(){
- StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
- ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
- ,{"ArmA.LP4", new StationPosition(){
- StartPosition = new RobotPosition() { X = -365, 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=-50, 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 void PopupPage(string page)
- {
- //var windowManager = IoC.Get<IWindowManager>();
- var windowManager = new WindowManager();
- switch (page)
- {
- case "PortStatus":
- //LoadIOPortViewModel portStatusViewModel = new LoadIOPortViewModel();
- //(windowManager as WindowManager)?.ShowDialogWithTitle(portStatusViewModel, null, "Port Status");
- break;
- case "JobStatus":
- JOBStatusViewModel vm = new JOBStatusViewModel();
- //bool? ret = windowManager.ShowDialog(vm);
- (windowManager as WindowManager)?.ShowDialogWithTitle(vm, null, "Job Status View");
- break;
- default:
- break;
- }
- }
- public void StandbyFactor()
- {
- //if (!string.IsNullOrEmpty(PM1MainRecipeName))
- {
- var windowManager = IoC.Get<IWindowManager>();
- StandbyFactorViewModel standbyFactorViewModel = new StandbyFactorViewModel();
- standbyFactorViewModel.MainRecipeName = PM1MainRecipeName;
- (windowManager as WindowManager)?.ShowDialogWithTitle(standbyFactorViewModel, null, "Standby Factor View");
- }
- }
- public void Skip()
- {
- if (!DialogBox.Confirm("Ara you sure to skip current step?"))
- return;
- InvokeClient.Instance.Service.DoOperation($"PM1.RecipeSkipStep", "");
- }
- public void Jump()
- {
- //if (!DialogBox.Confirm("Ara you sure to jump current step?"))
- // return;
- //var recipes = new RecipeDataBase();
- //recipes.PrefixPath = "Furnace\\Process";
- //recipes.Name = PM1MainRecipeName;
- //RecipeProvider _recipeProvider = new RecipeProvider();
- //recipes.Clear();
- //var recipeContent = _recipeProvider.LoadRecipe(recipes.PrefixPath, recipes.Name);
- //if (string.IsNullOrEmpty(recipeContent))
- //{
- // MessageBox.Show($"{recipes.PrefixPath}\\{recipes.Name} is empty, please confirm the file is valid.");
- // return;
- //}
- //recipes.RecipeChamberType = "OriginChamber";
- //recipes.InitData(recipes.PrefixPath, recipes.Name, recipeContent, "PM1");
- //var windowManager = IoC.Get<IWindowManager>();
- //RecipeLoopSetViewModel recipeLoopSetViewModel = new RecipeLoopSetViewModel();
- //recipeLoopSetViewModel.StepNames = new ObservableCollection<string>(recipes.Steps.OrderBy(x => x.StepNo).Where(x => x.StepNo != PM1RecipeStepNumber).Select(x => x.Name).ToList());
- //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeLoopSetViewModel, null, "Jump"))
- //{
- // InvokeClient.Instance.Service.DoOperation($"PM1.RecipeJumpStep", recipeLoopSetViewModel.SelectedIndex);
- //}
- }
- public void Hold()
- {
- if (HoldName == "Hold")
- {
- if (!DialogBox.Confirm("Ara you sure to hold current recipe?"))
- return;
- InvokeClient.Instance.Service.DoOperation($"PM1.RecipePause", "");
- }
- else
- {
- InvokeClient.Instance.Service.DoOperation($"PM1.RecipeContinue", "");
- }
- }
- public void EmergencyAbort()
- {
- if (!DialogBox.Confirm("Ara you sure to execute EmergencyAbort?"))
- return;
- InvokeClient.Instance.Service.DoOperation("PM1.Abort");
- }
- private string CalEndTime(DateTime beginTime, double totalTime, double totalElapseTime)
- {
- TimeSpan secondSpan = DateTime.Now - beginTime;
- return beginTime.AddSeconds(secondSpan.TotalSeconds + totalTime - totalElapseTime).ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- }
|