12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064 |
- using System.Collections.Generic;
- using System.Windows;
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.RT.Event;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using MECF.Framework.Common.CommonData;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.OperationCenter;
- namespace EfemDualUI.Views.Platforms.Mainframes
- {
- public class MainframeViewModel : LocalUIViewModelBase
- {
- #region Properties
- public List<string> InstallPMs { get; set; }
- private int _PickSelectPM = 0;
- public int PickSelectPM
- {
- get { return _PickSelectPM; }
- set { _PickSelectPM = value; NotifyOfPropertyChange("PickSelectPM"); }
- }
- private int _PlaceSelectPM = 0;
- public int PlaceSelectPM
- {
- get { return _PlaceSelectPM; }
- set { _PlaceSelectPM = value; NotifyOfPropertyChange("PlaceSelectPM"); }
- }
- public FoupDoorState LLAATMDoorState
- {
- get
- {
- if (LLAIsDoorOpened && !LLAIsDoorClosed) return FoupDoorState.Open;
- if (!LLAIsDoorOpened && LLAIsDoorClosed) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- public FoupDoorState LLASlitValveState
- {
- get
- {
- if (LLASlitValveOpenFeedback && !LLASlitValveCloseFeedback) return FoupDoorState.Open;
- if (!LLASlitValveOpenFeedback && LLASlitValveCloseFeedback) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- public FoupDoorState LLBATMDoorState
- {
- get
- {
- if (LLBIsDoorOpened && !LLBIsDoorClosed) return FoupDoorState.Open;
- if (!LLBIsDoorOpened && LLBIsDoorClosed) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- public FoupDoorState LLBSlitValveState
- {
- get
- {
- if (LLBSlitValveOpenFeedback && !LLBSlitValveCloseFeedback) return FoupDoorState.Open;
- if (!LLBSlitValveOpenFeedback && LLBSlitValveCloseFeedback) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- public FoupDoorState PMASlitValveState
- {
- get
- {
- if (PMASlitValveOpenFeedback && !PMASlitValveCloseFeedback) return FoupDoorState.Open;
- if (!PMASlitValveOpenFeedback && PMASlitValveCloseFeedback) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- public FoupDoorState PMBSlitValveState
- {
- get
- {
- if (PMBSlitValveOpenFeedback && !PMBSlitValveCloseFeedback) return FoupDoorState.Open;
- if (!PMBSlitValveOpenFeedback && PMBSlitValveCloseFeedback) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- public FoupDoorState PMCSlitValveState
- {
- get
- {
- if (PMCSlitValveOpenFeedback && !PMCSlitValveCloseFeedback) return FoupDoorState.Open;
- if (!PMCSlitValveOpenFeedback && PMCSlitValveCloseFeedback) return FoupDoorState.Close;
- return FoupDoorState.Unknown;
- }
- }
- [Subscription("IsAutoMode")]
- public bool IsAutoMode { get; set; }
- [Subscription("System.HeaterBuffer.DeviceData")]
- public AITHeaterData HeaterBuffer { get; set; }
- public bool PMASlitValveOpenFeedback1 { get { return PMASlitDoor1.OpenFeedback; } }
- [Subscription("PMA.SlitDoor1.DeviceData")]
- public AITCylinderData PMASlitDoor1
- {
- get;
- set;
- }
- public bool PMASlitValveOpenFeedback2 { get { return PMASlitDoor2.OpenFeedback; } }
- [Subscription("PMA.SlitDoor2.DeviceData")]
- public AITCylinderData PMASlitDoor2
- {
- get;
- set;
- }
- public bool PMBSlitValveOpenFeedback1 { get { return PMBSlitDoor1.OpenFeedback; } }
- [Subscription("PMB.SlitDoor1.DeviceData")]
- public AITCylinderData PMBSlitDoor1
- {
- get;
- set;
- }
- public bool PMBSlitValveOpenFeedback2 { get { return PMBSlitDoor2.OpenFeedback; } }
- [Subscription("PMB.SlitDoor2.DeviceData")]
- public AITCylinderData PMBSlitDoor2
- {
- get;
- set;
- }
- [Subscription("TMRobot.IsInterlockValid")]
- public bool IsInterlockValid
- {
- get;
- set;
- }
- [Subscription("TMRobot.CmdBladeTarget")]
- public string TMRobotBladeTarget
- {
- get;
- set;
- }
- [Subscription("TMRobot.CmdBlade1Extend")]
- public string TMArmAExtended
- {
- get;
- set;
- }
- [Subscription("TMRobot.CmdBlade2Extend")]
- public string TMArmBExtended
- {
- get;
- set;
- }
- [Subscription("TMRobot.RobotMoveInfo")]
- public RobotMoveInfo TmRobotMoveInfo
- {
- get;
- set;
- }
- [Subscription("TMRobot.ModuleWaferList")]
- public Aitex.Core.Common.WaferInfo[] TMRobotWafers { get; set; }
- [Subscription("LLA.Status")]
- public string LLAStatus { get; set; }
- public bool IsLLANotInit => LLAStatus == "Init";
- [Subscription("LLA.IsOnline")]
- public bool LLAIsOnline { get; set; }
- public string LLAOnlineMode => LLAIsOnline ? "Online" : "Offline";
- public bool IsLLAEnableManualOperation => LLAStatus == "Idle";
- public bool IsLLAOnlineButtonEnable => !LLAIsOnline;
- public bool IsLLAOfflineButtonEnable => LLAIsOnline;
- [Subscription("LLA.ChamberPressure")]
- public double LLAChamberPressure { get; set; }
- [Subscription("LLA.IsAtm")]
- public bool LLAIsAtmFeedback { get; set; }
- [Subscription("LLA.IsVacuum")]
- public bool LLAIsVacuumFeedback { get; set; }
- [Subscription("System.LLA.SlitDoor.OpenFeedback")]
- public bool LLAIsDoorOpened { get; set; }
- [Subscription("System.LLA.SlitDoor.CloseFeedback")]
- public bool LLAIsDoorClosed { get; set; }
- [Subscription("System.LLA.ChamberPressure.DeviceData")]
- public AITPressureMeterData LLAPressureMeterData { get; set; }
- [Subscription("System.LL.ForelinePressure.DeviceData")]
- public AITPressureMeterData LLForelinePressureMeterData { get; set; }
- [Subscription("System.LLA.FastVentValve.DeviceData")]
- public AITValveData LLAFastVentValveData { get; set; }
- [Subscription("System.LLA.SlowVentValve.DeviceData")]
- public AITValveData LLASlowVentValveData { get; set; }
- [Subscription("System.LLA.FastPumpValve.DeviceData")]
- public AITValveData LLAFastPumpValveData { get; set; }
- [Subscription("System.LLA.SlowPumpValve.DeviceData")]
- public AITValveData LLASlowPumpValveData { get; set; }
- [Subscription("System.LLA.SensorDoorOpened.DeviceData")]
- public AITSensorData LLADoorOpenData { get; set; }
- [Subscription("System.LLA.SensorDoorClosed.DeviceData")]
- public AITSensorData LLADoorCloseData { get; set; }
- [Subscription("LLB.Status")]
- public string LLBStatus { get; set; }
- public bool IsLLBNotInit => LLBStatus == "Init";
- [Subscription("LLB.IsOnline")]
- public bool LLBIsOnline { get; set; }
- public string LLBOnlineMode => LLBIsOnline ? "Online" : "Offline";
- public bool IsLLBEnableManualOperation => LLBStatus == "Idle";
- public bool IsLLBOnlineButtonEnable => !LLBIsOnline;
- public bool IsLLBOfflineButtonEnable => LLBIsOnline;
- [Subscription("LLB.ChamberPressure")]
- public double LLBChamberPressure { get; set; }
- [Subscription("LLB.IsAtm")]
- public bool LLBIsAtmFeedback { get; set; }
- [Subscription("LLB.IsVacuum")]
- public bool LLBIsVacuumFeedback { get; set; }
- [Subscription("System.LLB.SlitDoor.OpenFeedback")]
- public bool LLBIsDoorOpened { get; set; }
- [Subscription("System.LLB.SlitDoor.CloseFeedback")]
- public bool LLBIsDoorClosed { get; set; }
- [Subscription("System.LLB.ChamberPressure.DeviceData")]
- public AITPressureMeterData LLBPressureMeterData { get; set; }
- [Subscription("System.LLB.FastVentValve.DeviceData")]
- public AITValveData LLBFastVentValveData { get; set; }
- [Subscription("System.LLB.SlowVentValve.DeviceData")]
- public AITValveData LLBSlowVentValveData { get; set; }
- [Subscription("System.LLB.FastPumpValve.DeviceData")]
- public AITValveData LLBFastPumpValveData { get; set; }
- [Subscription("System.LLB.SlowPumpValve.DeviceData")]
- public AITValveData LLBSlowPumpValveData { get; set; }
- [Subscription("System.LLB.SensorDoorOpened.DeviceData")]
- public AITSensorData LLBDoorOpenData { get; set; }
- [Subscription("System.LLB.SensorDoorClosed.DeviceData")]
- public AITSensorData LLBDoorCloseData { get; set; }
- [Subscription("System.LL.SensorForelineVacSW.DeviceData")]
- public AITSensorData LLForelineVacSWData { get; set; }
- [Subscription("TM.Status")]
- public string TMStatus { get; set; }
- [Subscription("TM.TMRobot.State")]
- public string TMRobotStatus { get; set; }
- public bool IsTMNotInit => TMStatus == "Init";
- [Subscription("TM.ChamberPressure")]
- public double TMChamberPressure { get; set; }
- [Subscription("TM.IsOnline")]
- public bool TMIsOnline { get; set; }
- public string TMOnlineMode => TMIsOnline ? "Online" : "Offline";
- public bool IsTMEnableManualOperation => !TMIsOnline && TMStatus == "Idle";
- public bool IsTMOnlineButtonEnable => !TMIsOnline && TMStatus == "Idle";
- public bool IsTMOfflineButtonEnable => TMIsOnline && TMStatus == "Idle";
- [Subscription("FFU.FFU1Speed")]
- public int FFUCurrentSpeed { get; set; }
- private int _FFUSetSpeed;
- public int FFUSetSpeed
- {
- get { return _FFUSetSpeed; }
- set { _FFUSetSpeed = value; NotifyOfPropertyChange("FFUSetSpeed"); }
- }
- [Subscription("TM.IsAtm")]
- public bool IsTMAtmFeedback { get; set; }
- [Subscription("TM.IsVacuum")]
- public bool IsTMVacuumFeedback { get; set; }
- [Subscription("System.TM.SensorForelineVacSW.DeviceData")]
- public AITSensorData TMForelineVacSWData { get; set; }
- [Subscription("System.TM.FastVentValve.DeviceData")]
- public AITValveData TMVentValveData { get; set; }
- [Subscription("System.TM.N2BallastValve.DeviceData")]
- public AITValveData TMN2BallastValveData { get; set; }
- [Subscription("System.TM.FastPumpValve.DeviceData")]
- public AITValveData TMFastPumpValveData { get; set; }
- [Subscription("System.TM.SlowPumpValve.DeviceData")]
- public AITValveData TMSlowPumpValveData { get; set; }
- [Subscription("System.TM.ChamberPressure.DeviceData")]
- public AITPressureMeterData TMPressureMeterData { get; set; }
- [Subscription("System.TM.ForelinePressure.DeviceData")]
- public AITPressureMeterData TMForelinePressureMeterData { get; set; }
- [Subscription("System.PMA.SlitValve.OpenFeedback")]
- public bool PMASlitValveOpenFeedback { get; set; }
- [Subscription("System.PMA.SlitValve.CloseFeedback")]
- public bool PMASlitValveCloseFeedback { get; set; }
- [Subscription("System.PMB.SlitValve.OpenFeedback")]
- public bool PMBSlitValveOpenFeedback { get; set; }
- [Subscription("System.PMB.SlitValve.CloseFeedback")]
- public bool PMBSlitValveCloseFeedback { get; set; }
- [Subscription("System.PMC.SlitValve.OpenFeedback")]
- public bool PMCSlitValveOpenFeedback { get; set; }
- [Subscription("System.PMC.SlitValve.CloseFeedback")]
- public bool PMCSlitValveCloseFeedback { get; set; }
- [Subscription("System.LLA.SlitValve.OpenFeedback")]
- public bool LLASlitValveOpenFeedback { get; set; }
- [Subscription("System.LLA.SlitValve.CloseFeedback")]
- public bool LLASlitValveCloseFeedback { get; set; }
- [Subscription("System.LLB.SlitValve.OpenFeedback")]
- public bool LLBSlitValveOpenFeedback { get; set; }
- [Subscription("System.LLB.SlitValve.CloseFeedback")]
- public bool LLBSlitValveCloseFeedback { get; set; }
- [Subscription("LL.DryPump.DeviceData")]
- public AITPumpData LLPumpDeviceData { get; set; }
- [Subscription("TM.DryPump.DeviceData")]
- public AITPumpData TMPumpDeviceData { get; set; }
- public bool EnableServiceControl { get; set; }
- [Subscription("TM.MfcTmPurge.DeviceData")]
- public AITMfcData TMPurgeMfcData { get; set; }
- [Subscription("TMCylce.RemainedCycleCount")]
- public int RemainedCycleCount { get; set; }
- public string TMStatusBackground
- {
- get { return GetUnitStatusBackground(TMStatus); }
- }
- public bool IsTmDryPumpStandalone { get; set; }
- public bool IsTmPurgeEnabled { get; set; }
- private string _extendSelectedModule;
- public string ExtendSelectedModule
- {
- get
- {
- return _extendSelectedModule;
- }
- set
- {
- _extendSelectedModule = value;
- ExtendSlots = GetSlotsByModule(_extendSelectedModule);
- ExtendSelectedSlot = 1;
- NotifyOfPropertyChange("ExtendSelectedModule");
- }
- }
- private int _extendSelectedSlot;
- public int ExtendSelectedSlot
- {
- get { return _extendSelectedSlot; }
- set { _extendSelectedSlot = value; NotifyOfPropertyChange("ExtendSelectedSlot"); }
- }
- private string _extendSelectedBlade;
- public string ExtendSelectedBlade
- {
- get { return _extendSelectedBlade; }
- set { _extendSelectedBlade = value; NotifyOfPropertyChange("ExtendSelectedBlade"); }
- }
- private List<int> _extendSlots;
- public List<int> ExtendSlots
- {
- get { return _extendSlots; }
- set { _extendSlots = value; NotifyOfPropertyChange("ExtendSlots"); }
- }
- private string _retractSelectedModule;
- public string RetractSelectedModule
- {
- get
- {
- return _retractSelectedModule;
- }
- set
- {
- _retractSelectedModule = value;
- RetractSlots = GetSlotsByModule(_retractSelectedModule);
- RetractSelectedSlot = 1;
- NotifyOfPropertyChange("RetractSelectedModule");
- }
- }
- private int _retractSelectedSlot;
- public int RetractSelectedSlot
- {
- get { return _retractSelectedSlot; }
- set { _retractSelectedSlot = value; NotifyOfPropertyChange("RetractSelectedSlot"); }
- }
- private string _retractSelectedBlade;
- public string RetractSelectedBlade
- {
- get { return _retractSelectedBlade; }
- set { _retractSelectedBlade = value; NotifyOfPropertyChange("RetractSelectedBlade"); }
- }
- private List<int> _retractSlots;
- public List<int> RetractSlots
- {
- get { return _retractSlots; }
- set { _retractSlots = value; NotifyOfPropertyChange("RetractSlots"); }
- }
- private List<int> _slots = new List<int>() { 8, 8, 2, 2, 2, 2 };
- private List<string> _modules = new List<string>() { "LLA", "LLB", "PMA", "PMB" };
- private List<string> _blades = new List<string>() { "BladeA", "BladeB" };
- private List<string> _transfers = new List<string>() { "Pick", "Place" };
- private List<string> _tmcycleorigin = new List<string>() { "LLA", "LLB" };
- private List<string> _tmcycleto = new List<string>() { "LLA", "LLB" };
- public List<string> TMCycleOrigin
- {
- get { return _tmcycleorigin; }
- set { _tmcycleorigin = value; NotifyOfPropertyChange("TMCycleOrigin"); }
- }
- public List<string> TMCycleTo
- {
- get { return _tmcycleto; }
- set { _tmcycleto = value; NotifyOfPropertyChange("TMCycleTo"); }
- }
- public List<string> Modules
- {
- get { return _modules; }
- set { _modules = value; NotifyOfPropertyChange("Modules"); }
- }
- public List<string> Blades
- {
- get { return _blades; }
- set { _blades = value; NotifyOfPropertyChange("Blades"); }
- }
- public List<string> Transfers
- {
- get { return _transfers; }
- set { _transfers = value; NotifyOfPropertyChange("Transfers"); }
- }
- private bool _TMCycleEnable;
- public bool TMCycleEnable
- {
- get { return _TMCycleEnable; }
- set { _TMCycleEnable = value; NotifyOfPropertyChange("TMCycleEnable"); }
- }
- private string _TMCycleCount;
- public string TMCycleCount
- {
- get { return _TMCycleCount; }
- set { _TMCycleCount = value; NotifyOfPropertyChange("TMCycleCount"); }
- }
- private string _SelectedTMCycleOrigin;
- public string SelectedTMCycleOrigin
- {
- get { return _SelectedTMCycleOrigin; }
- set { _SelectedTMCycleOrigin = value; NotifyOfPropertyChange("SelectedTMCycleOrigin"); }
- }
- private string _SelectedTMCycleTo;
- public string SelectedTMCycleTo
- {
- get { return _SelectedTMCycleTo; }
- set { _SelectedTMCycleTo = value; NotifyOfPropertyChange("SelectedTMCycleTo"); }
- }
- private bool _TMCyclePMASelected;
- public bool TMCyclePMASelected
- {
- get { return _TMCyclePMASelected; }
- set { _TMCyclePMASelected = value; NotifyOfPropertyChange("TMCyclePMASelected"); }
- }
- private bool _TMCyclePMBSelected;
- public bool TMCyclePMBSelected
- {
- get { return _TMCyclePMBSelected; }
- set { _TMCyclePMBSelected = value; NotifyOfPropertyChange("TMCyclePMBSelected"); }
- }
- private string _pickSelectedModule;
- public string PickSelectedModule
- {
- get
- {
- return _pickSelectedModule;
- }
- set
- {
- _pickSelectedModule = value;
- PickSlots = GetSlotsByModule(_pickSelectedModule);
- PickSelectedSlot = 1;
- NotifyOfPropertyChange("PickSelectedModule");
- }
- }
- private int _pickSelectedSlot;
- public int PickSelectedSlot
- {
- get { return _pickSelectedSlot; }
- set { _pickSelectedSlot = value; NotifyOfPropertyChange("PickSelectedSlot"); }
- }
- private string _pickSelectedBlade;
- public string PickSelectedBlade
- {
- get { return _pickSelectedBlade; }
- set { _pickSelectedBlade = value; NotifyOfPropertyChange("PickSelectedBlade"); }
- }
- private List<int> _pickSlots;
- public List<int> PickSlots
- {
- get { return _pickSlots; }
- set { _pickSlots = value; NotifyOfPropertyChange("PickSlots"); }
- }
- private string _placeSelectedModule;
- public string PlaceSelectedModule
- {
- get
- {
- return _placeSelectedModule;
- }
- set
- {
- _placeSelectedModule = value;
- PlaceSlots = GetSlotsByModule(_placeSelectedModule);
- PlaceSelectedSlot = 1;
- NotifyOfPropertyChange("PlaceSelectedModule");
- }
- }
- private int _placeSelectedSlot;
- public int PlaceSelectedSlot
- {
- get { return _placeSelectedSlot; }
- set { _placeSelectedSlot = value; NotifyOfPropertyChange("PlaceSelectedSlot"); }
- }
- private string _placeSelectedBlade;
- public string PlaceSelectedBlade
- {
- get { return _placeSelectedBlade; }
- set { _placeSelectedBlade = value; NotifyOfPropertyChange("PlaceSelectedBlade"); }
- }
- private List<int> _placeSlots;
- public List<int> PlaceSlots
- {
- get { return _placeSlots; }
- set { _placeSlots = value; NotifyOfPropertyChange("PlaceSlots"); }
- }
- private string _pm1SelectedTransfer;
- public string PM1SelectedTransfer
- {
- get
- {
- return _pm1SelectedTransfer;
- }
- set
- {
- _pm1SelectedTransfer = value;
- NotifyOfPropertyChange("PM1SelectedTransfer");
- }
- }
- private string _pm2SelectedTransfer;
- public string PM2SelectedTransfer
- {
- get
- {
- return _pm2SelectedTransfer;
- }
- set
- {
- _pm2SelectedTransfer = value;
- NotifyOfPropertyChange("PM2SelectedTransfer");
- }
- }
- private string _pm3SelectedTransfer;
- public string PM3SelectedTransfer
- {
- get
- {
- return _pm3SelectedTransfer;
- }
- set
- {
- _pm3SelectedTransfer = value;
- NotifyOfPropertyChange("PM3SelectedTransfer");
- }
- }
- private string _pm4SelectedTransfer;
- public string PM4SelectedTransfer
- {
- get
- {
- return _pm4SelectedTransfer;
- }
- set
- {
- _pm4SelectedTransfer = value;
- NotifyOfPropertyChange("PM4SelectedTransfer");
- }
- }
- [Subscription("PMA.IsPickEnable")]
- public bool PM1PickEnable { get; set; }
- [Subscription("PMA.IsPlaceEnable")]
- public bool PM1PlaceEnable { get; set; }
- [Subscription("PMA.IsOnline")]
- public bool PM1IsOnline { get; set; }
- public bool PM1IsOffline
- {
- get { return !PM1IsOnline; }
- }
- public bool PM1TransferEnable
- {
- get { return _pm1SelectedTransfer == "Pick" ? PM1PickEnable : PM1PlaceEnable; }
- }
- [Subscription("PMB.IsPickEnable")]
- public bool PM2PickEnable { get; set; }
- [Subscription("PMB.IsPlaceEnable")]
- public bool PM2PlaceEnable { get; set; }
- [Subscription("PMB.IsOnline")]
- public bool PM2IsOnline { get; set; }
- public bool PM2IsOffline
- {
- get { return !PM2IsOnline; }
- }
- public bool PM2TransferEnable
- {
- get { return _pm2SelectedTransfer == "Pick" ? PM2PickEnable : PM2PlaceEnable; }
- }
- [Subscription("PMC.IsPickEnable")]
- public bool PM3PickEnable { get; set; }
- [Subscription("PMC.IsPlaceEnable")]
- public bool PM3PlaceEnable { get; set; }
- [Subscription("PMC.IsOnline")]
- public bool PM3IsOnline { get; set; }
- public bool PM3IsOffline
- {
- get { return !PM3IsOnline; }
- }
- public bool PM3TransferEnable
- {
- get { return _pm3SelectedTransfer == "Pick" ? PM3PickEnable : PM3PlaceEnable; }
- }
- #endregion Properties
- #region Functions
- public MainframeViewModel()
- {
- this.DisplayName = "TM";
- }
- protected override void OnInitialize()
- {
- base.OnInitialize();
- base.InitLL();
- base.InitTM();
- base.InitEFEM();
- base.InitPM();
- //InstallPMs = new List<string>() { PMA.ModuleID, PMB.ModuleID, PMC.ModuleID, PMD.ModuleID };
- ExtendSelectedModule = "VCEA";
- RetractSelectedModule = "VCEA";
- PickSelectedModule = "VCEA";
- PlaceSelectedModule = "VCEA";
- ExtendSelectedBlade = "BladeA";
- RetractSelectedBlade = "BladeA";
- PickSelectedBlade = "BladeA";
- PlaceSelectedBlade = "BladeA";
- PM1SelectedTransfer = "Pick";
- PM2SelectedTransfer = "Pick";
- PM3SelectedTransfer = "Pick";
- PM4SelectedTransfer = "Pick";
- ActiveUpdateData = true;
- }
- private List<int> GetSlotsByModule(string module)
- {
- List<int> slots = new List<int>();
- int i = _modules.IndexOf(module);
- int num = 0;
- if (i >= 0 && i < _slots.Count)
- num = _slots[i];
- int j = 0;
- while (j < num)
- {
- slots.Add(j + 1);
- j++;
- }
- return slots;
- }
- protected override void OnActivate()
- {
- base.OnActivate();
- var serviceMode = QueryDataClient.Instance.Service.GetConfig("System.IsServiceControlMode");
- EnableServiceControl = (bool)serviceMode;
- //IsTmDryPumpStandalone = (bool)QueryDataClient.Instance.Service.GetConfig("TM.IsDryPumpStandalone");
- //IsTmPurgeEnabled = (bool)QueryDataClient.Instance.Service.GetConfig("TM.IsPurgeEnabled");
- //_isLP1Visibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.LP1.IsInstalled");
- //_isLP2Visibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.LP2.IsInstalled");
- //_isLP3Visibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.LP3.IsInstalled");
- _isLLAVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.LLA.IsInstalled");
- _isLLBVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.LLB.IsInstalled");
- //_isAlignerVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.Aligner.IsInstalled");
- _isPMAVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.PMA.IsInstalled");
- _isPMBVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.PMB.IsInstalled");
- _isPMCVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.PMC.IsInstalled");
- }
- //public bool _isLP1Visibility;
- //public Visibility IsLP1Visibility
- //{
- // get { return _isLP1Visibility ? Visibility.Visible : Visibility.Hidden; }
- //}
- //public bool _isLP2Visibility;
- //public Visibility IsLP2Visibility
- //{
- // get { return _isLP2Visibility ? Visibility.Visible : Visibility.Hidden; }
- //}
- //public bool _isLP3Visibility;
- //public Visibility IsLP3Visibility
- //{
- // get { return _isLP3Visibility ? Visibility.Visible : Visibility.Hidden; }
- //}
- public bool _isPMAVisibility;
- public Visibility IsPMAVisibility
- {
- get { return _isPMAVisibility ? Visibility.Visible : Visibility.Hidden; }
- }
- public bool _isPMBVisibility;
- public Visibility IsPMBVisibility
- {
- get { return _isPMBVisibility ? Visibility.Visible : Visibility.Hidden; }
- }
- public bool _isPMCVisibility;
- public Visibility IsPMCVisibility
- {
- get { return _isPMCVisibility ? Visibility.Visible : Visibility.Hidden; }
- }
- public bool _isLLAVisibility;
- public Visibility IsLLAVisibility
- {
- get { return _isLLAVisibility ? Visibility.Visible : Visibility.Hidden; }
- }
- public bool _isLLBVisibility;
- public Visibility IsLLBVisibility
- {
- get { return _isLLBVisibility ? Visibility.Visible : Visibility.Hidden; }
- }
- //public bool _isAlignerVisibility;
- //public Visibility IsAlignerVisibility
- //{
- // get { return _isAlignerVisibility ? Visibility.Visible : Visibility.Hidden; }
- //}
- protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
- {
- //VCEA.IsOnline = VCEAIsOnline;
- //VCEB.IsOnline = VCEBIsOnline;
- }
- #region TM Robot
- public void TMRobot_Home()
- {
- //TMProvider.Instance.TMRobot_Home();
- }
- public void TMRobot_Retract()
- {
- //TMProvider.Instance.TMRobot_Retract(RetractSelectedModule, RetractSelectedSlot - 1, RetractSelectedBlade == "BladeA" ? 0 : 1);
- }
- public void TMRobot_Extend()
- {
- //TMProvider.Instance.TMRobot_Extend(ExtendSelectedModule, ExtendSelectedSlot - 1, ExtendSelectedBlade == "BladeA" ? 0 : 1);
- }
- public void TMRobot_Pick()
- {
- InvokeClient.Instance.Service.DoOperation($"TM.Pick", PickSelectedModule, PickSelectedSlot - 1, PickSelectedBlade == "BladeA" ? 0 : 1, (double)0, (double)0, false);
- //TMProvider.Instance.TMRobot_Pick(PickSelectedModule, PickSelectedSlot - 1, PickSelectedBlade == "BladeA" ? 0 : 1);
- }
- public void TMRobot_Place()
- {
- InvokeClient.Instance.Service.DoOperation($"TM.Place", PlaceSelectedModule, PlaceSelectedSlot - 1, PlaceSelectedBlade == "BladeA" ? 0 : 1, (double)0, (double)0, false);
- //TMProvider.Instance.TMRobot_Place(PlaceSelectedModule, PlaceSelectedSlot - 1, PlaceSelectedBlade == "BladeA" ? 0 : 1);
- }
- public void TMRobot_SetInterlockValid()
- {
- InvokeClient.Instance.Service.DoOperation($"TMRobot.SetParameter", "InterlockValid", true);
- }
- public void TMRobot_SetInterlockInvalid()
- {
- InvokeClient.Instance.Service.DoOperation($"TMRobot.SetParameter", "InterlockValid", false);
- }
- #endregion TM Robot
- public void SetFFUSpeed()
- {
- InvokeClient.Instance.Service.DoOperation($"FFU.SetSpeed", FFUSetSpeed.ToString());
- }
- public void Reset(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Reset");
- //TMProvider.Instance.Reset(module);
- }
- public void Home(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Home");
- //TMProvider.Instance.Home(module);
- }
- public void Load(string module)
- {
- //TMProvider.Instance.Load(module);
- }
- public void Unload(string module)
- {
- //TMProvider.Instance.Unload(module);
- }
- public void Map(string module)
- {
- //TMProvider.Instance.Map(module);
- }
- public void Pump(string module)
- {
- //TMProvider.Instance.Pump(module);
- }
- public void Vent(string module)
- {
- //TMProvider.Instance.Vent(module);
- }
- public void LiftUp(string module)
- {
- //TMProvider.Instance.LiftUp(module);
- }
- public void LiftDown(string module)
- {
- //TMProvider.Instance.LiftDown(module);
- }
- public void OpenDoor(string module)
- {
- //TMProvider.Instance.OpenDoor(module);
- }
- public void CloseDoor(string module)
- {
- //TMProvider.Instance.CloseDoor(module);
- }
- public void OpenSlitValve(string module)
- {
- //TMProvider.Instance.OpenSlitValve(module);
- }
- public void CloseSlitValve(string module)
- {
- //TMProvider.Instance.CloseSlitValve(module);
- }
- public void Abort(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Abort");
- //TMProvider.Instance.Abort(module);
- }
- public void PrepareTransfer(string module, string type)
- {
- //TMProvider.Instance.PrepareTransfer(module, type);
- }
- public void TransferHandoff(string module, string type)
- {
- //TMProvider.Instance.TransferHandoff(module, type);
- }
- public void SetOnline(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.SetOnline");
- }
- public void SetOffline(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.SetOffline");
- }
- public void LoadLockHome(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Home");
- }
- public void LoadLockAbort(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Abort");
- }
- public void LoadLockReset(string module)
- {
- InvokeClient.Instance.Service.DoOperation($"{module}.Reset");
- }
- public void TMCycleStart()
- {
- int tmCycleCount = 1;
- if (TMCycleEnable && !int.TryParse(TMCycleCount, out tmCycleCount))
- {
- EV.PostWarningLog("TMCycle", $"param set error : {TMCycleCount}");
- return;
- }
- List<string> CycleRoutine = new List<string>();
- CycleRoutine.Add(SelectedTMCycleOrigin);
- if (TMCyclePMASelected)
- {
- CycleRoutine.Add("PMA");
- }
- if (TMCyclePMBSelected)
- {
- CycleRoutine.Add("PMB");
- }
- CycleRoutine.Add(SelectedTMCycleTo);
- InvokeClient.Instance.Service.DoOperation("System.TMCycleStart", CycleRoutine.ToArray(), tmCycleCount);
- }
- public void TMCyclePause()
- {
- InvokeClient.Instance.Service.DoOperation("System.TMCyclePause");
- }
- public void TMCycleResume()
- {
- InvokeClient.Instance.Service.DoOperation("System.TMCycleResume");
- }
- public void TMCycleAbort()
- {
- InvokeClient.Instance.Service.DoOperation("System.Abort");
- }
- #endregion Functions
- }
- }
|