123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371 |
- using Aitex.Sorter.Common;
- using ExcelLibrary.BinaryFileFormat;
- using MECF.Framework.Common.CommonData;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.OperationCenter;
- using MECF.Framework.Common.Schedulers;
- using OpenSEMI.ClientBase;
- using OpenSEMI.Ctrlib.Controls;
- using Prism.Commands;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows.Threading;
- using CyberX8_Core;
- using CyberX8_MainPages.Unity;
- using CyberX8_Themes.CustomControls;
- using CyberX8_Themes.Unity;
- using MECF.Framework.Common.Utilities;
- using CyberX8_Themes.UserControls;
- using Caliburn.Micro;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows;
- using MECF.Framework.Common.Jobs;
- namespace CyberX8_MainPages.ViewModels
- {
- public enum EFEMModule
- {
- LP1,LP2,LP3,Aligner1,PUF1,PUF2,SRD1,SRD2,Dummy1,Dummy2
- }
- public enum EFEMBlade
- {
- Blade1
- }
- internal class EfemViewModel:BindableBase
- {
- #region 私有字段
- private bool m_puf1IsInstalled;
- private bool m_puf2IsInstalled;
- private bool m_srd1IsInstalled;
- private bool m_srd2IsInstalled;
- private bool m_puf1IsInRobotStation;
- private bool m_puf2IsInRobotStation;
- private bool _isAlignerVacuumOn;
- private bool _isRobotVacuumOn;
- private ModuleInfo m_LP1ModuleInfo;
- private ModuleInfo m_LP2ModuleInfo;
- private ModuleInfo m_LP3ModuleInfo;
- private ModuleInfo m_EFEMModuleInfo;
- private ModuleInfo m_srd1ModuleInfo;//upper
- private ModuleInfo m_srd2ModuleInfo;
- private ModuleInfo m_puf1ModuleInfo;
- private ModuleInfo m_puf2ModuleInfo;
- private List<EFEMModule> m_EFEMModules = new List<EFEMModule>();
- private List<EFEMModule> m_PUFModules = new List<EFEMModule>();
- private EFEMBlade m_PickSelectedBlade;
- private EFEMBlade m_PlaceSelectedBlade;
- private EFEMBlade m_ExtendSelectedBlade;
- private EFEMBlade m_RetractSelectedBlade;
- private ObservableCollection<int> m_PlaceSoltItemsSource = new ObservableCollection<int>();
- private ObservableCollection<int> m_PickSoltItemsSource = new ObservableCollection<int>();
- private ObservableCollection<int> m_PUFPlaceSoltItemsSource = new ObservableCollection<int>();
- private ObservableCollection<int> m_PUFPickSoltItemsSource = new ObservableCollection<int>();
- private ObservableCollection<int> m_ExtendSoltItemsSource = new ObservableCollection<int>();
- private ObservableCollection<int> m_RetractSoltItemsSource = new ObservableCollection<int>();
- private int m_PickSoltSelectedIndex;
- private int m_PlaceSoltSelectedIndex;
- private int m_PUFPickSoltSelectedIndex;
- private int m_PUFPlaceSoltSelectedIndex;
- private int m_ExtendSoltSelectedIndex;
- private int m_RetractSoltSelectedIndex;
- private EFEMModule m_PickSelectedModule;
- private EFEMModule m_PlaceSelectedModule;
- private EFEMModule m_ExtendSelectedModule;
- private EFEMModule m_RetractSelectedModule;
- private EFEMModule m_PUFPickSelectedModule;
- private EFEMModule m_PUFPlaceSelectedModule;
- private WaferInfo m_BladeAWafer;
- private WaferInfo m_BladeBWafer;
- private WaferInfo m_puf1Wafer;
- private WaferInfo m_puf2Wafer;
- private WaferInfo m_srd1Wafer;
- private WaferInfo m_srd2Wafer;
-
- private WaferInfo m_Aligner1Wafer;
- private string m_LP1Status;
- private string m_LP2Status;
- private string m_LP3Status;
-
- private string _setLP1IDValue;
- private string _setLP2IDValue;
- private string _setLP3IDValue;
- private int _setLP1CycleValue;
- private int _setLP2CycleValue;
- private int _setLP3CycleValue;
- private bool _isLp1Unable;
- private bool _isLp2Unable;
- private bool _isLp3Unable;
- private List<string> m_RtDataKeys=new List<string>();
- private Dictionary<string, object> m_RtDataValues;
- private int m_AlignValue;
- private int m_RobotSpeedValue;
- private WaferRobotTAction m_Robot1TAction;
- private WaferRobotXAction m_Robot1XAction;
- private WaferRobotTAction m_Robot2TAction;
- private WaferRobotXAction m_Robot2XAction;
- //int arm1oldWaferStatus = 100;
- //int arm2oldWaferStatus = 100;
- private EFEM.RobotPosition m_CurrentRobotPosition;
- private ModuleInfo _dummy1ModuleInfo;
- private ModuleInfo _dummy2ModuleInfo;
- private int m_dummy1WaferCount;
- private int m_dummy2WaferCount;
- private bool _isLp1HasNoJob;
- private bool _isLp2HasNoJob;
- private bool _isLp3HasNoJob;
- private bool _isHomeAllEnable;
- #endregion
- #region 属性
- public bool IsHomeAllEnable
- {
- get { return _isHomeAllEnable; }
- set { SetProperty(ref _isHomeAllEnable, value); }
- }
- public ModuleInfo LP1ModuleInfo
- {
- get { return m_LP1ModuleInfo; }
- set { SetProperty(ref m_LP1ModuleInfo, value); }
- }
- public ModuleInfo LP2ModuleInfo
- {
- get { return m_LP2ModuleInfo; }
- set { SetProperty(ref m_LP2ModuleInfo, value); }
- }
- public ModuleInfo LP3ModuleInfo
- {
- get { return m_LP3ModuleInfo; }
- set { SetProperty(ref m_LP3ModuleInfo, value); }
- }
- public bool IsLP1Unable
- {
- get { return _isLp1Unable; }
- set { SetProperty(ref _isLp1Unable, value); }
- }
- public bool IsLP2Unable
- {
- get { return _isLp2Unable; }
- set { SetProperty(ref _isLp2Unable, value); }
- }
- public bool IsLP3Unable
- {
- get { return _isLp3Unable; }
- set { SetProperty(ref _isLp3Unable, value); }
- }
- public bool IsLP1HasNoJob
- {
- get { return _isLp1HasNoJob; }
- set { SetProperty(ref _isLp1HasNoJob, value); }
- }
- public bool IsLP2HasNoJob
- {
- get { return _isLp2HasNoJob; }
- set { SetProperty(ref _isLp2HasNoJob, value); }
- }
- public bool IsLP3HasNoJob
- {
- get { return _isLp3HasNoJob; }
- set { SetProperty(ref _isLp3HasNoJob, value); }
- }
- public ModuleInfo EFEMModuleInfo
- {
- get { return m_EFEMModuleInfo; }
- set { SetProperty(ref m_EFEMModuleInfo, value); }
- }
- public List<EFEMModule> EFEMModules
- {
- get { return m_EFEMModules; }
- set { SetProperty(ref m_EFEMModules, value); }
- }
- public List<EFEMModule> PUFModules
- {
- get { return m_PUFModules; }
- set { SetProperty(ref m_PUFModules, value); }
- }
- public EFEMBlade PickSelectedBlade
- {
- get { return m_PickSelectedBlade; }
- set { SetProperty(ref m_PickSelectedBlade, value); }
- }
- public EFEMBlade PlaceSelectedBlade
- {
- get { return m_PlaceSelectedBlade; }
- set { SetProperty(ref m_PlaceSelectedBlade, value); }
- }
- public EFEMBlade ExtendSelectedBlade
- {
- get { return m_ExtendSelectedBlade; }
- set { SetProperty(ref m_ExtendSelectedBlade, value); }
- }
- public EFEMBlade RetractSelectedBlade
- {
- get { return m_RetractSelectedBlade; }
- set { SetProperty(ref m_RetractSelectedBlade, value); }
- }
- public ObservableCollection<int> PickSoltItemsSource
- {
- get { return m_PickSoltItemsSource; }
- set { SetProperty(ref m_PickSoltItemsSource, value); }
- }
- public ObservableCollection<int> PlaceSoltItemsSource
- {
- get { return m_PlaceSoltItemsSource; }
- set { SetProperty(ref m_PlaceSoltItemsSource, value); }
- }
- public ObservableCollection<int> PUFPickSoltItemsSource
- {
- get { return m_PUFPickSoltItemsSource; }
- set { SetProperty(ref m_PUFPickSoltItemsSource, value); }
- }
- public ObservableCollection<int> PUFPlaceSoltItemsSource
- {
- get { return m_PUFPlaceSoltItemsSource; }
- set { SetProperty(ref m_PUFPlaceSoltItemsSource, value); }
- }
- public ObservableCollection<int> ExtendSoltItemsSource
- {
- get { return m_ExtendSoltItemsSource; }
- set { SetProperty(ref m_ExtendSoltItemsSource, value); }
- }
- public ObservableCollection<int> RetractSoltItemsSource
- {
- get { return m_RetractSoltItemsSource; }
- set { SetProperty(ref m_RetractSoltItemsSource, value); }
- }
- public int PickSoltSelectedIndex
- {
- get { return m_PickSoltSelectedIndex; }
- set { SetProperty(ref m_PickSoltSelectedIndex, value); }
- }
- public int PlaceSoltSelectedIndex
- {
- get { return m_PlaceSoltSelectedIndex; }
- set { SetProperty(ref m_PlaceSoltSelectedIndex, value); }
- }
- public int PUFPickSoltSelectedIndex
- {
- get { return m_PUFPickSoltSelectedIndex; }
- set { SetProperty(ref m_PUFPickSoltSelectedIndex, value); }
- }
- public int PUFPlaceSoltSelectedIndex
- {
- get { return m_PUFPlaceSoltSelectedIndex; }
- set { SetProperty(ref m_PUFPlaceSoltSelectedIndex, value); }
- }
- public int ExtendSoltSelectedIndex
- {
- get { return m_ExtendSoltSelectedIndex; }
- set { SetProperty(ref m_ExtendSoltSelectedIndex, value); }
- }
- public int RetractSoltSelectedIndex
- {
- get { return m_RetractSoltSelectedIndex; }
- set { SetProperty(ref m_RetractSoltSelectedIndex, value); }
- }
- public EFEMModule PickSelectedModule
- {
- get { return m_PickSelectedModule; }
- set { SetProperty(ref m_PickSelectedModule, value); }
- }
- public EFEMModule PlaceSelectedModule
- {
- get { return m_PlaceSelectedModule; }
- set { SetProperty(ref m_PlaceSelectedModule, value); }
- }
- public EFEMModule PUFPickSelectedModule
- {
- get { return m_PUFPickSelectedModule; }
- set { SetProperty(ref m_PUFPickSelectedModule, value); }
- }
- public EFEMModule PUFPlaceSelectedModule
- {
- get { return m_PUFPlaceSelectedModule; }
- set { SetProperty(ref m_PUFPlaceSelectedModule, value); }
- }
- public EFEMModule ExtendSelectedModule
- {
- get { return m_ExtendSelectedModule; }
- set { SetProperty(ref m_ExtendSelectedModule, value); }
- }
- public EFEMModule RetractSelectedModule
- {
- get { return m_RetractSelectedModule; }
- set { SetProperty(ref m_RetractSelectedModule, value); }
- }
- public WaferInfo BladeAWafer
- {
- get { return m_BladeAWafer; }
- set { SetProperty(ref m_BladeAWafer, value); }
- }
- public WaferInfo Aligner1Wafer
- {
- get { return m_Aligner1Wafer; }
- set { SetProperty(ref m_Aligner1Wafer, value); }
- }
- public WaferInfo Puf1Wafer
- {
- get { return m_puf1Wafer; }
- set { SetProperty(ref m_puf1Wafer, value); }
- }
- public WaferInfo Puf2Wafer
- {
- get { return m_puf2Wafer; }
- set { SetProperty(ref m_puf2Wafer, value); }
- }
- public bool Puf1IsInstalled
- {
- get { return m_puf1IsInstalled; }
- set { SetProperty(ref m_puf1IsInstalled, value); }
- }
- public bool Puf2IsInstalled
- {
- get { return m_puf2IsInstalled; }
- set { SetProperty(ref m_puf2IsInstalled, value); }
- }
- public bool Srd1IsInstalled
- {
- get { return m_srd1IsInstalled; }
- set { SetProperty(ref m_srd1IsInstalled, value); }
- }
- public bool Srd2IsInstalled
- {
- get { return m_srd2IsInstalled; }
- set { SetProperty(ref m_srd2IsInstalled, value); }
- }
- public ModuleInfo Puf1ModuleInfo
- {
- get { return m_puf1ModuleInfo; }
- set { SetProperty(ref m_puf1ModuleInfo, value); }
- }
- public ModuleInfo Puf2ModuleInfo
- {
- get { return m_puf2ModuleInfo; }
- set { SetProperty(ref m_puf2ModuleInfo, value); }
- }
- public bool Puf1IsInRobotStation
- {
- get { return m_puf1IsInRobotStation; }
- set { SetProperty(ref m_puf1IsInRobotStation, value); }
- }
- public bool Puf2IsInRobotStation
- {
- get { return m_puf2IsInRobotStation; }
- set { SetProperty(ref m_puf2IsInRobotStation, value); }
- }
- public bool IsAlignerVacuumOn
- {
- get { return _isAlignerVacuumOn; }
- set { SetProperty(ref _isAlignerVacuumOn, value); }
- }
- public bool IsRobotVacuumOn
- {
- get { return _isRobotVacuumOn; }
- set { SetProperty(ref _isRobotVacuumOn, value); }
- }
- public string LP1Status
- {
- get { return m_LP1Status; }
- set { SetProperty(ref m_LP1Status, value); }
- }
- public string LP2Status
- {
- get { return m_LP2Status; }
- set { SetProperty(ref m_LP2Status, value); }
- }
- public string LP3Status
- {
- get { return m_LP3Status; }
- set { SetProperty(ref m_LP3Status, value); }
- }
- public string SetLP1IDValue
- {
- get { return _setLP1IDValue; }
- set { SetProperty(ref _setLP1IDValue, value); }
- }
- public string SetLP2IDValue
- {
- get { return _setLP1IDValue; }
- set { SetProperty(ref _setLP1IDValue, value); }
- }
- public string SetLP3IDValue
- {
- get { return _setLP1IDValue; }
- set { SetProperty(ref _setLP1IDValue, value); }
- }
- public int SetLP1CycleValue
- {
- get { return _setLP1CycleValue; }
- set { SetProperty(ref _setLP1CycleValue, value); }
- }
- public int SetLP2CycleValue
- {
- get { return _setLP2CycleValue; }
- set { SetProperty(ref _setLP2CycleValue, value); }
- }
- public int SetLP3CycleValue
- {
- get { return _setLP3CycleValue; }
- set { SetProperty(ref _setLP3CycleValue, value); }
- }
- public Dictionary<string, object> RtDataValues
- {
- get { return m_RtDataValues; }
- set { SetProperty(ref m_RtDataValues, value); }
- }
- public int AlignValue
- {
- get { return m_AlignValue; }
- set { SetProperty(ref m_AlignValue, value); }
- }
- public int RobotSpeedValue
- {
- get { return m_RobotSpeedValue; }
- set { SetProperty(ref m_RobotSpeedValue, value); }
- }
- public WaferRobotTAction Robot1TAction
- {
- get { return m_Robot1TAction; }
- set { SetProperty(ref m_Robot1TAction, value); }
- }
- public WaferRobotXAction Robot1XAction
- {
- get { return m_Robot1XAction; }
- set { SetProperty(ref m_Robot1XAction, value); }
- }
- public WaferRobotTAction Robot2TAction
- {
- get { return m_Robot2TAction; }
- set { SetProperty(ref m_Robot2TAction, value); }
- }
- public WaferRobotXAction Robot2XAction
- {
- get { return m_Robot2XAction; }
- set { SetProperty(ref m_Robot2XAction, value); }
- }
- private string m_RobotTarget;
- public string RobotTarget
- {
- get { return m_RobotTarget; }
- set
- {
- SetProperty(ref m_RobotTarget, value);
- }
- }
- public RobotMoveInfo m_robotMoveInfo;
- public RobotMoveInfo RobotMoveInfo
- {
- get { return m_robotMoveInfo; }
- set
- {
- RobotMoveInfoChanged(m_robotMoveInfo, value);
- m_robotMoveInfo = value;
- }
- }
- public EFEM.RobotPosition CurrentRobotPosition
- {
- get { return m_CurrentRobotPosition; }
- set { SetProperty(ref m_CurrentRobotPosition, value); }
- }
- public ModuleInfo Dummy1ModuleInfo
- {
- get { return _dummy1ModuleInfo; }
- set { SetProperty(ref _dummy1ModuleInfo, value); }
- }
- public ModuleInfo Dummy2ModuleInfo
- {
- get { return _dummy2ModuleInfo; }
- set { SetProperty(ref _dummy2ModuleInfo, value); }
- }
- public int Dummy1WaferCount
- {
- get { return m_dummy1WaferCount; }
- set { SetProperty(ref m_dummy1WaferCount, value); }
- }
- public int Dummy2WaferCount
- {
- get { return m_dummy2WaferCount; }
- set { SetProperty(ref m_dummy2WaferCount, value); }
- }
- public ModuleInfo Srd1ModuleInfo
- {
- get { return m_srd1ModuleInfo; }
- set { SetProperty(ref m_srd1ModuleInfo, value); }
- }
- public ModuleInfo Srd2ModuleInfo
- {
- get { return m_srd2ModuleInfo; }
- set { SetProperty(ref m_srd2ModuleInfo, value); }
- }
- public WaferInfo Srd1Wafer
- {
- get { return m_srd1Wafer; }
- set { SetProperty(ref m_srd1Wafer, value); }
- }
- public WaferInfo Srd2Wafer
- {
- get { return m_srd2Wafer; }
- set { SetProperty(ref m_srd2Wafer, value); }
- }
- #endregion
- #region 命令
- private DelegateCommand _ExtendCommand;
- public DelegateCommand ExtendCommand =>
- _ExtendCommand ?? (_ExtendCommand = new DelegateCommand(OnExtend));
- private DelegateCommand _RetractCommand;
- public DelegateCommand RetractCommand =>
- _RetractCommand ?? (_RetractCommand = new DelegateCommand(OnRetract));
- private DelegateCommand<object> _PUFModuleChangeCommand;
- public DelegateCommand<object> PUFModuleChangeCommand =>
- _PUFModuleChangeCommand ?? (_PUFModuleChangeCommand = new DelegateCommand<object>(OnPUFModuleChange));
- private DelegateCommand<object> _ModuleChangeCommand;
- public DelegateCommand<object> ModuleChangeCommand =>
- _ModuleChangeCommand ?? (_ModuleChangeCommand = new DelegateCommand<object>(OnModuleChange));
- private DelegateCommand _PickCommand;
- public DelegateCommand PickCommand =>
- _PickCommand ?? (_PickCommand = new DelegateCommand(OnPick));
- private DelegateCommand _PlaceCommand;
- public DelegateCommand PlaceCommand =>
- _PlaceCommand ?? (_PlaceCommand = new DelegateCommand(OnPlace));
-
- private DelegateCommand _BFMapCommand;
- public DelegateCommand BFMapCommand =>
- _BFMapCommand ?? (_BFMapCommand = new DelegateCommand(OnBFMap));
- private DelegateCommand _SetRobotSpeedCommand;
- public DelegateCommand SetRobotSpeedCommand =>
- _SetRobotSpeedCommand ?? (_SetRobotSpeedCommand = new DelegateCommand(OnSetRobotSpeed));
- private DelegateCommand<object> _PUFPickCommand;
- public DelegateCommand<object> PUFPickCommand =>
- _PUFPickCommand ?? (_PUFPickCommand = new DelegateCommand<object>(OnPUFPick));
- private DelegateCommand<object> _PUFPlaceCommand;
- public DelegateCommand<object> PUFPlaceCommand =>
- _PUFPlaceCommand ?? (_PUFPlaceCommand = new DelegateCommand<object>(OnPUFPlace));
- private DelegateCommand _HomeAllCommand;
- public DelegateCommand HomeAllCommand =>
- _HomeAllCommand ?? (_HomeAllCommand = new DelegateCommand(OnHomeAll));
- private DelegateCommand _ClearErrorCommand;
- public DelegateCommand ClearErrorCommand =>
- _ClearErrorCommand ?? (_ClearErrorCommand = new DelegateCommand(OnClearError));
- private DelegateCommand _AbortCommand;
- public DelegateCommand AbortCommand =>
- _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
- private DelegateCommand _CloseBuzzerCommand;
- public DelegateCommand CloseBuzzerCommand =>
- _CloseBuzzerCommand ?? (_CloseBuzzerCommand = new DelegateCommand(OnCloseBuzzer));
- private DelegateCommand _Align1HomeCommand;
- public DelegateCommand Align1HomeCommand =>
- _Align1HomeCommand ?? (_Align1HomeCommand = new DelegateCommand(OnAlign1Home));
- private DelegateCommand _Align1AlignCommand;
- public DelegateCommand Align1AlignCommand =>
- _Align1AlignCommand ?? (_Align1AlignCommand = new DelegateCommand(OnAlign1Align));
-
- private DelegateCommand _RobotHomeCommand;
- public DelegateCommand RobotHomeCommand =>
- _RobotHomeCommand ?? (_RobotHomeCommand = new DelegateCommand(OnRobotHome));
-
- private DelegateCommand _RobotPowerOnCommand;
- public DelegateCommand RobotPowerOnCommand =>
- _RobotPowerOnCommand ?? (_RobotPowerOnCommand = new DelegateCommand(RobotPowerOn));
-
- private DelegateCommand _RobotPowerOffCommand;
- public DelegateCommand RobotPowerOffCommand =>
- _RobotPowerOffCommand ?? (_RobotPowerOffCommand = new DelegateCommand(RobotPowerOff));
-
- private DelegateCommand<object> _LPHomeCommand;
- public DelegateCommand<object> LPHomeCommand =>
- _LPHomeCommand ?? (_LPHomeCommand = new DelegateCommand<object>(OnLPHome));
- private DelegateCommand<object> _LPAbortCommand;
- public DelegateCommand<object> LPAbortCommand =>
- _LPAbortCommand ?? (_LPAbortCommand = new DelegateCommand<object>(OnLPAbort));
- private DelegateCommand<object> _LPResetCommand;
- public DelegateCommand<object> LPResetCommand =>
- _LPResetCommand ?? (_LPResetCommand = new DelegateCommand<object>(OnLPReset));
- private DelegateCommand<object> _LPLoadCommand;
- public DelegateCommand<object> LPLoadCommand =>
- _LPLoadCommand ?? (_LPLoadCommand = new DelegateCommand<object>(OnLPLoad));
- private DelegateCommand<object> _LPUnLoadCommand;
- public DelegateCommand<object> LPUnLoadCommand =>
- _LPUnLoadCommand ?? (_LPUnLoadCommand = new DelegateCommand<object>(OnLPUnLoad));
- private DelegateCommand<object> _LPMapCommand;
- public DelegateCommand<object> LPMapCommand =>
- _LPMapCommand ?? (_LPMapCommand = new DelegateCommand<object>(OnLPMap));
- private DelegateCommand<object> _LPReadIDCommand;
- public DelegateCommand<object> LPReadIDCommand =>
- _LPReadIDCommand ?? (_LPReadIDCommand = new DelegateCommand<object>(OnLPReadID));
- private DelegateCommand<object> _LP1WriteIDCommand;
- public DelegateCommand<object> LP1WriteIDCommand =>
- _LP1WriteIDCommand ?? (_LP1WriteIDCommand = new DelegateCommand<object>(OnLP1WriteID));
- private DelegateCommand<object> _LP2WriteIDCommand;
- public DelegateCommand<object> LP2WriteIDCommand =>
- _LP2WriteIDCommand ?? (_LP2WriteIDCommand = new DelegateCommand<object>(OnLP2WriteID));
- private DelegateCommand<object> _LP3WriteIDCommand;
- public DelegateCommand<object> LP3WriteIDCommand =>
- _LP3WriteIDCommand ?? (_LP3WriteIDCommand = new DelegateCommand<object>(OnLP3WriteID));
- private DelegateCommand<object> _LPClampCommand;
- public DelegateCommand<object> LPClampCommand =>
- _LPClampCommand ?? (_LPClampCommand = new DelegateCommand<object>(OnLPClamp));
- private DelegateCommand<object> _LPUnClampCommand;
- public DelegateCommand<object> LPUnClampCommand =>
- _LPUnClampCommand ?? (_LPUnClampCommand = new DelegateCommand<object>(OnLPUnClamp));
- private DelegateCommand<object> _LPDockCommand;
- public DelegateCommand<object> LPDockCommand =>
- _LPDockCommand ?? (_LPDockCommand = new DelegateCommand<object>(OnLPDock));
- private DelegateCommand<object> _LPUnDockCommand;
- public DelegateCommand<object> LPUnDockCommand =>
- _LPUnDockCommand ?? (_LPUnDockCommand = new DelegateCommand<object>(OnLPUnDock));
- private DelegateCommand<object> _LPOpenDoorCommand;
- public DelegateCommand<object> LPOpenDoorCommand =>
- _LPOpenDoorCommand ?? (_LPOpenDoorCommand = new DelegateCommand<object>(OnLPOpenDoor));
- private DelegateCommand<object> _LPCloseDoorCommand;
- public DelegateCommand<object> LPCloseDoorCommand =>
- _LPCloseDoorCommand ?? (_LPCloseDoorCommand = new DelegateCommand<object>(OnLPCloseDoor));
- private DelegateCommand _OnlineCommand;
- public DelegateCommand OnlineCommand =>
- _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));
- private DelegateCommand _OfflineCommand;
- public DelegateCommand OfflineCommand =>
- _OfflineCommand ?? (_OfflineCommand = new DelegateCommand(OnOffline));
- private DelegateCommand _AlignerVacuumCommand;
- public DelegateCommand AlignerVacuumCommand =>
- _AlignerVacuumCommand ?? (_AlignerVacuumCommand = new DelegateCommand(AlignerVacuum));
-
- private DelegateCommand _RobotVacuumCommand;
- public DelegateCommand RobotVacuumCommand =>
- _RobotVacuumCommand ?? (_RobotVacuumCommand = new DelegateCommand(RobotVacuum));
- private ICommand _lP1CycleCommand;
- public ICommand LP1CycleCommand => _lP1CycleCommand ?? (_lP1CycleCommand = new DelegateCommand<object>(OnLP1CycleAction));
- private ICommand _lP2CycleCommand;
- public ICommand LP2CycleCommand => _lP2CycleCommand ?? (_lP2CycleCommand = new DelegateCommand<object>(OnLP2CycleAction));
- private ICommand _lP3CycleCommand;
- public ICommand LP3CycleCommand => _lP3CycleCommand ?? (_lP3CycleCommand = new DelegateCommand<object>(OnLP3CycleAction));
- #endregion
- #region 构造函数
- public EfemViewModel()
- {
- Dictionary<string, object> allModulesDictionary = QueryDataClient.Instance.Service.PollData(new List<string>() { "System.InstalledModules" });
- if (allModulesDictionary != null)
- {
- List<string> allModules = CommonFunction.GetValue<List<string>>(allModulesDictionary, "System.InstalledModules");
- Puf1IsInstalled = allModules.Contains("PUF1");
- Puf2IsInstalled = allModules.Contains("PUF2");
- Srd1IsInstalled = allModules.Contains("SRD1");
- Srd2IsInstalled = allModules.Contains("SRD2");
- }
-
- DispatcherTimer timer = new DispatcherTimer();
- timer.Interval = TimeSpan.FromSeconds(0.1);
- timer.Tick += Timer_Tick;
- timer.Start();
- EFEMModules.Add(EFEMModule.LP1);
- EFEMModules.Add(EFEMModule.LP2);
- EFEMModules.Add(EFEMModule.LP3);
- EFEMModules.Add(EFEMModule.Aligner1);
- EFEMModules.Add(EFEMModule.PUF1);
- EFEMModules.Add(EFEMModule.PUF2);
- EFEMModules.Add(EFEMModule.SRD1);
- EFEMModules.Add(EFEMModule.SRD2);
- EFEMModules.Add(EFEMModule.Dummy1);
- EFEMModules.Add(EFEMModule.Dummy2);
- PUFModules.Add(EFEMModule.PUF1);
- PUFModules.Add(EFEMModule.PUF2);
- OnModuleChange("Pick");
- OnModuleChange("Place");
- OnPUFModuleChange("Pick");
- OnPUFModuleChange("Place");
- Init();
- }
- #endregion
- #region 命令方法
- private void OnPUFModuleChange(object obj)
- {
- var value = obj.ToString();
- switch (value)
- {
- case "Pick":
- PUFPickSoltItemsSource.Clear();
- switch (PUFPickSelectedModule)
- {
- case EFEMModule.PUF1:
- case EFEMModule.PUF2:
- PUFPickSoltItemsSource.Add(1);
- PUFPickSoltItemsSource.Add(2);
- break;
- }
- PUFPickSoltSelectedIndex = 0;
- break;
- case "Place":
- PUFPlaceSoltItemsSource.Clear();
- switch (PUFPlaceSelectedModule)
- {
- case EFEMModule.PUF1:
- case EFEMModule.PUF2:
- PUFPlaceSoltItemsSource.Add(1);
- PUFPlaceSoltItemsSource.Add(2);
- break;
- }
- PUFPlaceSoltSelectedIndex = 0;
- break;
- }
- }
- private void OnModuleChange(object obj)
- {
- var value = obj.ToString();
- switch (value)
- {
- case "Pick":
- PickSoltItemsSource.Clear();
- switch (PickSelectedModule)
- {
- case EFEMModule.PUF1:
- case EFEMModule.PUF2:
- PickSoltItemsSource.Add(1);
- PickSoltItemsSource.Add(2);
- break;
- case EFEMModule.Dummy1:
- case EFEMModule.Dummy2:
- for (int i = 1; i < 17; i++)
- {
- PickSoltItemsSource.Add(i);
- }
- break;
- case EFEMModule.LP1:
- case EFEMModule.LP2:
- case EFEMModule.LP3:
- for (int i = 1; i < 26; i++)
- {
- PickSoltItemsSource.Add(i);
- }
- break;
- default:
- PickSoltItemsSource.Add(1);
- break;
- }
- PickSoltSelectedIndex = 0;
- break;
- case "Place":
- PlaceSoltItemsSource.Clear();
- switch (PlaceSelectedModule)
- {
- case EFEMModule.PUF1:
- case EFEMModule.PUF2:
- PlaceSoltItemsSource.Add(1);
- PlaceSoltItemsSource.Add(2);
- break;
- case EFEMModule.Dummy1:
- case EFEMModule.Dummy2:
- for (int i = 1; i < 17; i++)
- {
- PlaceSoltItemsSource.Add(i);
- }
- break;
- case EFEMModule.LP1:
- case EFEMModule.LP2:
- case EFEMModule.LP3:
- for (int i = 1; i < 26; i++)
- {
- PlaceSoltItemsSource.Add(i);
- }
- break;
- default:
- PlaceSoltItemsSource.Add(1);
- break;
- }
- PlaceSoltSelectedIndex = 0;
- break;
- }
- }
- private void OnExtend()
- {
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
- var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
- InvokeClient.Instance.Service.DoOperation($"EFEM.{RtOperation.Extend}", moduleName, 0, selectedHand);
- }
- private void OnRetract()
- {
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
- var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
- InvokeClient.Instance.Service.DoOperation($"EFEM.{RtOperation.Retract}", moduleName, 0, selectedHand);
- }
- private void OnPick()
- {
- Queue<MoveItem> moveItems = new Queue<MoveItem>();
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PickSelectedModule.ToString(), true);
- var selectedHand = (Hand)Enum.Parse(typeof(Hand), PickSelectedBlade.ToString(), true);
- MoveItem moveItem = new MoveItem(moduleName, PickSoltItemsSource[PickSoltSelectedIndex]-1, ModuleName.EfemRobot, 0, selectedHand);
- moveItems.Enqueue(moveItem);
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Pick}", moveItems);
- }
- private void OnPlace()
- {
- Queue<MoveItem> moveItems = new Queue<MoveItem>();
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PlaceSelectedModule.ToString(), true);
- var selectedHand = (Hand)Enum.Parse(typeof(Hand), PlaceSelectedBlade.ToString(), true);
- MoveItem moveItem = new MoveItem(ModuleName.EfemRobot, 0, moduleName, PlaceSoltItemsSource[PlaceSoltSelectedIndex]-1, selectedHand);
- moveItems.Enqueue(moveItem);
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Place}", moveItems);
- }
- private void OnPUFPick(object obj)
- {
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PUFPickSelectedModule.ToString(), true);
- var PufSlot = PUFPickSoltSelectedIndex == 0 ? "SideA" : "SideB";
- InvokeClient.Instance.Service.DoOperation($"{moduleName}.GotoRobotPositionForPick", PufSlot);
- }
- private void OnPUFPlace(object obj)
- {
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), PUFPlaceSelectedModule.ToString(), true);
- var PufSlot = PUFPlaceSoltSelectedIndex == 0 ? "SideA" : "SideB";
- InvokeClient.Instance.Service.DoOperation($"{moduleName}.GotoRobotPositionForPlace", PufSlot);
- }
- private void OnHomeAll()
- {
- InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.Home}");
- }
- private void OnClearError()
- {
- InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.ClearError}");
- }
- private void OnCloseBuzzer()
- {
- InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.TurnOffBuzzer}");
- }
- private void OnAbort()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Abort}");
- }
- private void OnAlign1Home()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.Aligner1}.{EfemOperation.Home}");
- }
- private void OnAlign1Align()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.Aligner1}.{EfemOperation.Align}",0, AlignValue);
- }
- private void AlignerVacuum()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.Aligner1}.{EfemOperation.Vacuum}", ModuleName.Aligner1,IsAlignerVacuumOn);
- }
- private void RobotVacuum()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Vacuum}", ModuleName.EfemRobot, IsRobotVacuumOn);
- }
- private void OnRobotHome()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Home}");
- }
- private void RobotPowerOn()
- {
-
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.PowerOn}", true);
-
- }
- private void RobotPowerOff()
- {
-
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.PowerOn}", false);
-
- }
- private void OnBFMap()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.DummyMap}");
- }
- private void OnSetRobotSpeed()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Speed}", RobotSpeedValue);
- }
- private void OnLPHome(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Home");
- }
- private void OnLPAbort(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Abort");
- }
- private void OnLPReset(object obj)
- {
- //InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.ReSet");
- }
- private void OnLPLoad(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Load");
- }
- private void OnLPUnLoad(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Unload");
- }
- private void OnLPMap(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Map");
- }
-
- private void OnLPReadID(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.ReadCarrierId");
- }
- private void OnLP1WriteID(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.WriteCarrierID", SetLP1IDValue);
- }
- private void OnLP2WriteID(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.WriteCarrierID", SetLP2IDValue);
- }
- private void OnLP3WriteID(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.WriteCarrierID", SetLP3IDValue);
- }
- private void OnLPClamp(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Clamp");
- }
- private void OnLPUnClamp(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Unclamp");
- }
- private void OnLPDock(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Dock");
- }
- private void OnLPUnDock(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Undock");
- }
- private void OnLPOpenDoor(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.OpenDoor");
- }
- private void OnLPCloseDoor(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.CloseDoor");
- }
- private void OnOnline()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.Online",true);
- }
- private void OnOffline()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.Online", false);
- }
- private void OnLP1CycleAction(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.CycleLoadUnload", SetLP1CycleValue);
- }
- private void OnLP2CycleAction(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.CycleLoadUnload", SetLP2CycleValue);
- }
- private void OnLP3CycleAction(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.CycleLoadUnload", SetLP3CycleValue);
- }
- #endregion
- #region 私有方法
- private void Timer_Tick(object sender, EventArgs e)
- {
- if (Puf1IsInstalled)
- {
- if (ModuleManager.ModuleInfos["PUF1"].WaferManager.Wafers.Count != 0)
- {
- Puf1Wafer = ModuleManager.ModuleInfos["PUF1"].WaferManager.Wafers[0];
- }
- Puf1ModuleInfo = ModuleManager.ModuleInfos["PUF1"];
- }
- if (Puf2IsInstalled)
- {
- if (ModuleManager.ModuleInfos["PUF2"].WaferManager.Wafers.Count != 0)
- {
- Puf2Wafer = ModuleManager.ModuleInfos["PUF2"].WaferManager.Wafers[0];
- }
- Puf2ModuleInfo = ModuleManager.ModuleInfos["PUF2"];
- }
- if (Srd1IsInstalled)
- {
- if (ModuleManager.ModuleInfos["SRD1"].WaferManager.Wafers.Count != 0)
- {
- Srd1Wafer = ModuleManager.ModuleInfos["SRD1"].WaferManager.Wafers[0];
- }
- Srd1ModuleInfo = ModuleManager.ModuleInfos["SRD1"];
- }
- if (Srd2IsInstalled)
- {
- if (ModuleManager.ModuleInfos["SRD2"].WaferManager.Wafers.Count != 0)
- {
- Srd2Wafer = ModuleManager.ModuleInfos["SRD2"].WaferManager.Wafers[0];
- }
- Srd2ModuleInfo = ModuleManager.ModuleInfos["SRD2"];
- }
- LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
- LP2ModuleInfo = ModuleManager.ModuleInfos["LP2"];
- LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];
- EFEMModuleInfo = ModuleManager.ModuleInfos["EfemRobot"];
- if (ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers.Count != 0)
- {
- BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
- }
- if (ModuleManager.ModuleInfos["Aligner1"].WaferManager.Wafers.Count != 0)
- {
- Aligner1Wafer = ModuleManager.ModuleInfos["Aligner1"].WaferManager.Wafers[0];
- }
- RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
- if(RtDataValues!=null)
- {
- IsHomeAllEnable = !CommonFunction.GetValue<bool>(RtDataValues, "System.IsAutoMode");
-
- Puf1IsInRobotStation = CommonFunction.GetValue<bool>(RtDataValues, "PUF1.IsInRobotStation");
- Puf2IsInRobotStation = CommonFunction.GetValue<bool>(RtDataValues, "PUF2.IsInRobotStation");
- ControlJobInfo lp1Cj = CommonFunction.GetValue<ControlJobInfo>(RtDataValues, "LP1.CurrentControlJob");
- IsLP1HasNoJob = lp1Cj == null ? true : false;
- ControlJobInfo lp2Cj = CommonFunction.GetValue<ControlJobInfo>(RtDataValues, "LP2.CurrentControlJob");
- IsLP2HasNoJob = lp2Cj == null ? true : false;
- ControlJobInfo lp3Cj = CommonFunction.GetValue<ControlJobInfo>(RtDataValues, "LP3.CurrentControlJob");
- IsLP3HasNoJob = lp3Cj == null ? true : false;
- }
- RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
- Dummy1ModuleInfo = ModuleManager.ModuleInfos["Dummy1"];
- Dummy1WaferCount = Dummy1ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
- Dummy2ModuleInfo = ModuleManager.ModuleInfos["Dummy2"];
- Dummy2WaferCount = Dummy2ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
- IsLP1Unable = (bool)QueryDataClient.Instance.Service.GetConfig("EFEM.IsLoadPort1Unable");
- IsLP2Unable = (bool)QueryDataClient.Instance.Service.GetConfig("EFEM.IsLoadPort2Unable");
- IsLP3Unable = (bool)QueryDataClient.Instance.Service.GetConfig("EFEM.IsLoadPort3Unable");
- }
- private void Init()
- {
- m_RtDataKeys.Add("System.IsAutoMode");
-
- m_RtDataKeys.Add("LP1.Status");
- m_RtDataKeys.Add("LP2.Status");
- m_RtDataKeys.Add("LP3.Status");
- m_RtDataKeys.Add("LP1.IsLoaded");
- m_RtDataKeys.Add("LP2.IsLoaded");
- m_RtDataKeys.Add("LP3.IsLoaded");
- m_RtDataKeys.Add("LP1.CarrierId");
- m_RtDataKeys.Add("LP2.CarrierId");
- m_RtDataKeys.Add("LP3.CarrierId");
- m_RtDataKeys.Add("LP1.IsClamped");
- m_RtDataKeys.Add("LP2.IsClamped");
- m_RtDataKeys.Add("LP3.IsClamped");
- m_RtDataKeys.Add("LP1.IsDocked");
- m_RtDataKeys.Add("LP2.IsDocked");
- m_RtDataKeys.Add("LP3.IsDocked");
- m_RtDataKeys.Add("LP1.IsDoorOpened");
- m_RtDataKeys.Add("LP2.IsDoorOpened");
- m_RtDataKeys.Add("LP3.IsDoorOpened");
- m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
- m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
- m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
- m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
- m_RtDataKeys.Add("LP1.CassettePlaced");
- m_RtDataKeys.Add("LP2.CassettePlaced");
- m_RtDataKeys.Add("LP3.CassettePlaced");
- m_RtDataKeys.Add("PUF1.IsInRobotStation");
- m_RtDataKeys.Add("PUF2.IsInRobotStation");
- m_RtDataKeys.Add("LP1.CurrentControlJob");
- m_RtDataKeys.Add("LP2.CurrentControlJob");
- m_RtDataKeys.Add("LP3.CurrentControlJob");
- m_RtDataKeys.Add("LP1.WaferSize");
- m_RtDataKeys.Add("LP2.WaferSize");
- m_RtDataKeys.Add("LP3.WaferSize");
- }
- /// <summary>
- /// Robot位置信息变更(动画)
- /// </summary>
- /// <param name="oldValue"></param>
- /// <param name="newValue"></param>
- private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
- {
- if (oldValue == null || newValue == null)
- {
- return;
- }
- if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
- {
- var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
- if (TMRobotMoveActionBladeTarget != null)
- {
- RobotTarget = TMRobotMoveActionBladeTarget.ToString();
- }
- else
- {
- return;
- }
- var values = RobotTarget.Split('.');
- var arm = values[0];
- var module = values[1];
- if (arm == "ArmA")
- {
- var robot1Robot1TAction= (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
- //Robot整体平移动画
- await ChangePosition(robot1Robot1TAction, newValue.Action);
- if (Robot1TAction != robot1Robot1TAction)
- {
- Robot1TAction = robot1Robot1TAction;
- await Task.Delay(600);
- }
- //await Task.Delay(1500);
-
- Robot1XAction = WaferRobotXAction.Extend;
-
- while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0].WaferStatus == 0))
- {
- await Task.Delay(100);
- }
-
- Robot1XAction = WaferRobotXAction.Retract;
-
- if(newValue.Action == RobotAction.Placing)
- {
- await ChangePosition(WaferRobotTAction.T_Origin, newValue.Action);
- }
- }
- }
- #region Home
- else if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Homing)
- {
- if (Robot1XAction == WaferRobotXAction.Extend||Robot2XAction == WaferRobotXAction.Extend2)
- {
- Robot1XAction = WaferRobotXAction.Retract2;
- }
- if (Robot2XAction == WaferRobotXAction.Extend|| Robot2XAction == WaferRobotXAction.Extend2)
- {
- Robot2XAction = WaferRobotXAction.Retract2;
- }
- await Task.Delay(2000);
- if (Robot1TAction != WaferRobotTAction.T_Origin)
- {
- Robot1TAction = WaferRobotTAction.T_Origin;
- }
- if (Robot2TAction != WaferRobotTAction.T_Origin)
- {
- Robot2TAction = WaferRobotTAction.T_Origin;
- }
- if (CurrentRobotPosition != EFEM.RobotPosition.Origin)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Origin;
- }
- await ChangePosition(WaferRobotTAction.T_Origin, newValue.Action);
- }
- #endregion
- }
- private async Task ChangePosition(WaferRobotTAction waferRobotTAction, RobotAction robotAction)
- {
- //CurrentRobotPosition = RobotPosition.Origin;
- //await Task.Delay(1000);
- if(robotAction == RobotAction.Placing)
- {
- if (waferRobotTAction == WaferRobotTAction.LP1 || waferRobotTAction == WaferRobotTAction.PUF1)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Left_Place;
- }
- else if (waferRobotTAction == WaferRobotTAction.LP3)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Right_Place;
- }
- else if (waferRobotTAction == WaferRobotTAction.LP2 || waferRobotTAction == WaferRobotTAction.PUF2)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Middle_Place;
- }
- else if (waferRobotTAction == WaferRobotTAction.Aligner1)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Aligner_Place;
- }
- else if (waferRobotTAction == WaferRobotTAction.SRD1 || waferRobotTAction == WaferRobotTAction.SRD2)
- {
- CurrentRobotPosition = EFEM.RobotPosition.SRD_Place;
- }
- else if (waferRobotTAction == WaferRobotTAction.Dummy1 || waferRobotTAction == WaferRobotTAction.Dummy2)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Dummy_Place;
- }
- else
- {
- CurrentRobotPosition = EFEM.RobotPosition.Origin;
- }
- }
- else
- {
- if (waferRobotTAction == WaferRobotTAction.LP1 || waferRobotTAction == WaferRobotTAction.PUF1)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Left;
- }
- else if (waferRobotTAction == WaferRobotTAction.LP3)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Right;
- }
- else if (waferRobotTAction == WaferRobotTAction.LP2 || waferRobotTAction == WaferRobotTAction.PUF2)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Middle;
- }
- else if (waferRobotTAction == WaferRobotTAction.Aligner1)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Aligner;
- }
- else if (waferRobotTAction == WaferRobotTAction.SRD1 || waferRobotTAction == WaferRobotTAction.SRD2)
- {
- CurrentRobotPosition = EFEM.RobotPosition.SRD;
- }
- else if (waferRobotTAction == WaferRobotTAction.Dummy1 || waferRobotTAction == WaferRobotTAction.Dummy2)
- {
- CurrentRobotPosition = EFEM.RobotPosition.Dummy;
- }
- else
- {
- CurrentRobotPosition = EFEM.RobotPosition.Origin;
- }
- }
-
- await Task.Delay(600);
- }
- #endregion
- }
- }
|