1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390 |
- 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;
- using System.Configuration;
- 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;
- private double _vacuumValue;
- #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); }
- }
- /// <summary>
- /// 真空数值
- /// </summary>
- public double VacuumValue
- {
- get { return _vacuumValue; }
- set { SetProperty(ref _vacuumValue, 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;
- VacuumValue = CommonFunction.GetValue<double>(RtDataValues, "EFEM.VacuumValue");
- }
- 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("Dummy1.CassettePlaced");
- m_RtDataKeys.Add("Dummy2.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");
- m_RtDataKeys.Add("Dummy1.WaferSize");
- m_RtDataKeys.Add("Dummy2.WaferSize");
- m_RtDataKeys.Add("EFEM.VacuumValue");
- }
- /// <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
- }
- }
|