123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710 |
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.RT.Log;
- using ExcelLibrary.BinaryFileFormat;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.OperationCenter;
- using Prism.Commands;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Reflection;
- using System.Windows.Threading;
- using Venus_Core;
- using Venus_MainPages.Unity;
- using Venus_MainPages.Views;
- using Venus_Themes.CustomControls;
- namespace Venus_MainPages.ViewModels
- {
- public class TMOperationViewModel : BindableBase
- {
- #region 私有字段
- //private TMOperationView m_TMOperationView;
- //private bool m_IsOFFline = true;
- private bool m_TMIsOFFline = true;
- private bool m_LLAIsOFFline = true;
- private bool m_LLBIsOFFline = true;
- private bool m_PMAIsInstalled;
- private bool m_PMBIsInstalled;
- private bool m_PMCIsInstalled;
- private bool m_PMDIsInstalled;
- private bool m_LLAIsInstalled;
- private bool m_LLBIsInstalled;
- private Dictionary<string, object> m_RtDataValues;
- private string m_ModuleCheckedName = "TM";
- private bool m_TMValveN2IsOpen;
- private bool m_TMSoftPumpValveIsOpen;
- private bool m_TMFastPumpValveIsOpen;
- private bool m_TMPurgeValveIsOpen;
- private bool m_TMSoftVentValveIsOpen;
- private bool m_TMFastVentValveIsOpen;
- private bool m_LLASoftPumpValveIsOpen;
- private bool m_LLAFastPumpValveIsOpen;
- private bool m_LLAPurgeValveIsOpen;
- private bool m_LLAVentValveIsOpen;
- private bool m_LLBSoftPumpValveIsOpen;
- private bool m_LLBFastPumpValveIsOpen;
- private bool m_LLBPurgeValveIsOpen;
- private bool m_LLBVentValveIsOpen;
- private bool m_TMVentExhaustValveIsOpen;
- private bool m_LLAVentExhaustValveIsOpen;
- private bool m_LLBVentExhaustValveIsOpen;
- private List<string> m_RtDataKeys = new List<string>();
- private int m_TMOutChamberPressure;
- private int m_TMOutChamberFlow;
- private int m_TMChamberPressureSetPoint;
- private int m_TMChamberFlowSetPoint;
- private ObservableCollection<string> m_HomeAllSteps = new ObservableCollection<string>();
- private int m_StepProcess;
- private bool m_TMIsHoming;
- private PressureType m_PressureType;
- private TMState m_TMCurrentState;
- private LLState m_LLACurrentState;
- private LLState m_LLBCurrentState;
- private ObservableCollection<PMLeakCheckResult> m_LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>();
- private bool m_firstLoad = true;
- DispatcherTimer timer;
- #endregion
- #region 属性
- public PressureType PressureType
- {
- get { return m_PressureType; }
- set { SetProperty(ref m_PressureType, value); }
- }
- public bool TMValveN2IsOpen
- {
- get { return m_TMValveN2IsOpen; }
- set { SetProperty(ref m_TMValveN2IsOpen, value); }
- }
- public bool TMSoftPumpValveIsOpen
- {
- get { return m_TMSoftPumpValveIsOpen; }
- set { SetProperty(ref m_TMSoftPumpValveIsOpen, value); }
- }
- public bool TMFastPumpValveIsOpen
- {
- get { return m_TMFastPumpValveIsOpen; }
- set { SetProperty(ref m_TMFastPumpValveIsOpen, value); }
- }
- public bool TMPurgeValveIsOpen
- {
- get { return m_TMPurgeValveIsOpen; }
- set { SetProperty(ref m_TMPurgeValveIsOpen, value); }
- }
- public bool TMSoftVentValveIsOpen
- {
- get { return m_TMSoftVentValveIsOpen; }
- set { SetProperty(ref m_TMSoftVentValveIsOpen, value); }
- }
- public bool TMFastVentValveIsOpen
- {
- get { return m_TMFastVentValveIsOpen; }
- set { SetProperty(ref m_TMFastVentValveIsOpen, value); }
- }
- public bool LLAFastPumpValveIsOpen
- {
- get { return m_LLAFastPumpValveIsOpen; }
- set { SetProperty(ref m_LLAFastPumpValveIsOpen, value); }
- }
- public bool LLASoftPumpValveIsOpen
- {
- get { return m_LLASoftPumpValveIsOpen; }
- set { SetProperty(ref m_LLASoftPumpValveIsOpen, value); }
- }
- public bool LLAPurgeValveIsOpen
- {
- get { return m_LLAPurgeValveIsOpen; }
- set { SetProperty(ref m_LLAPurgeValveIsOpen, value); }
- }
- public bool LLAVentValveIsOpen
- {
- get { return m_LLAVentValveIsOpen; }
- set { SetProperty(ref m_LLAVentValveIsOpen, value); }
- }
- public bool LLBSoftPumpValveIsOpen
- {
- get { return m_LLBSoftPumpValveIsOpen; }
- set { SetProperty(ref m_LLBSoftPumpValveIsOpen, value); }
- }
- public bool LLBFastPumpValveIsOpen
- {
- get { return m_LLBFastPumpValveIsOpen; }
- set { SetProperty(ref m_LLBFastPumpValveIsOpen, value); }
- }
- public bool LLBPurgeValveIsOpen
- {
- get { return m_LLBPurgeValveIsOpen; }
- set { SetProperty(ref m_LLBPurgeValveIsOpen, value); }
- }
- public bool LLBVentValveIsOpen
- {
- get { return m_LLBVentValveIsOpen; }
- set { SetProperty(ref m_LLBVentValveIsOpen, value); }
- }
- public bool TMVentExhaustValveIsOpen
- {
- get { return m_TMVentExhaustValveIsOpen; }
- set { SetProperty(ref m_TMVentExhaustValveIsOpen, value); }
- }
- public bool LLAVentExhaustValveIsOpen
- {
- get { return m_LLAVentExhaustValveIsOpen; }
- set { SetProperty(ref m_LLAVentExhaustValveIsOpen, value); }
- }
- public bool LLBVentExhaustValveIsOpen
- {
- get { return m_LLBVentExhaustValveIsOpen; }
- set { SetProperty(ref m_LLBVentExhaustValveIsOpen, value); }
- }
- public int TMChamberPressureSetPoint
- {
- get { return m_TMChamberPressureSetPoint; }
- set { SetProperty(ref m_TMChamberPressureSetPoint, value); }
- }
- public int TMChamberFlowSetPoint
- {
- get { return m_TMChamberFlowSetPoint; }
- set { SetProperty(ref m_TMChamberFlowSetPoint, value); }
- }
- //public bool IsOFFline
- //{
- // get { return m_IsOFFline; }
- // set
- // {
- // SetProperty(ref m_IsOFFline, value);
- // }
- //}
- public bool TMIsOFFline
- {
- get { return m_TMIsOFFline; }
- set
- {
- SetProperty(ref m_TMIsOFFline, value);
- }
- }
- public bool LLAIsOFFline
- {
- get { return m_LLAIsOFFline; }
- set
- {
- SetProperty(ref m_LLAIsOFFline, value);
- }
- }
- public bool LLBIsOFFline
- {
- get { return m_LLBIsOFFline; }
- set
- {
- SetProperty(ref m_LLBIsOFFline, value);
- }
- }
- public Dictionary<string, object> RtDataValues
- {
- get { return m_RtDataValues; }
- set { SetProperty(ref m_RtDataValues, value); }
- }
- public bool PMAIsInstalled
- {
- get { return m_PMAIsInstalled; }
- set { SetProperty(ref m_PMAIsInstalled, value); }
- }
- public bool PMBIsInstalled
- {
- get { return m_PMBIsInstalled; }
- set { SetProperty(ref m_PMBIsInstalled, value); }
- }
- public bool PMCIsInstalled
- {
- get { return m_PMCIsInstalled; }
- set { SetProperty(ref m_PMCIsInstalled, value); }
- }
- public bool PMDIsInstalled
- {
- get { return m_PMDIsInstalled; }
- set { SetProperty(ref m_PMDIsInstalled, value); }
- }
- public bool LLAIsInstalled
- {
- get { return m_LLAIsInstalled; }
- set { SetProperty(ref m_LLAIsInstalled, value); }
- }
- public bool LLBIsInstalled
- {
- get { return m_LLBIsInstalled; }
- set { SetProperty(ref m_LLBIsInstalled, value); }
- }
- public int TMOutChamberFlow
- {
- get { return m_TMOutChamberFlow; }
- set
- {
- if (value != m_TMOutChamberFlow)
- {
- InvokeClient.Instance.Service.DoOperation($"TM.SetChamberFlow", value);
- }
- SetProperty(ref m_TMOutChamberFlow, value);
- }
- }
- public int TMOutChamberPressure
- {
- get { return m_TMOutChamberPressure; }
- set
- {
- SetProperty(ref m_TMOutChamberPressure, value);
- }
- }
- public ObservableCollection<string> HomeAllSteps
- {
- get { return m_HomeAllSteps; }
- set { SetProperty(ref m_HomeAllSteps, value); }
- }
- public int StepProcess
- {
- get { return m_StepProcess; }
- set { SetProperty(ref m_StepProcess, value); }
- }
- public bool TMIsHoming
- {
- get { return m_TMIsHoming; }
- set { SetProperty(ref m_TMIsHoming, value); }
- }
- public TMState TMCurrentState
- {
- get { return m_TMCurrentState; }
- set
- {
- if ((m_TMCurrentState == TMState.Leakchecking) && value == TMState.Idle)
- {
- var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult(m_ModuleCheckedName);
- if (AllLeakCheckDa != null)
- {
- LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
- }
- }
- SetProperty(ref m_TMCurrentState, value);
- }
- }
- public LLState LLACurrentState
- {
- get { return m_LLACurrentState; }
- set
- {
- if ((m_LLACurrentState == LLState.LeakCheck) && value == LLState.Idle)
- {
- var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult(m_ModuleCheckedName);
- if (AllLeakCheckDa != null)
- {
- LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
- }
- }
- SetProperty(ref m_LLACurrentState, value);
- }
- }
- public LLState LLBCurrentState
- {
- get { return m_LLBCurrentState; }
- set
- {
- if ((m_LLBCurrentState == LLState.LeakCheck) && value == LLState.Idle)
- {
- var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult(m_ModuleCheckedName);
- if (AllLeakCheckDa != null)
- {
- LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
- }
- }
- SetProperty(ref m_LLBCurrentState, value);
- }
- }
- public ObservableCollection<PMLeakCheckResult> LeakCheckResultList
- {
- get { return m_LeakCheckResultList; }
- set { SetProperty(ref m_LeakCheckResultList, value); }
- }
- #endregion
- #region 命令
- private DelegateCommand<object> _LoadCommand;
- public DelegateCommand<object> LoadCommand =>
- _LoadCommand ?? (_LoadCommand = new DelegateCommand<object>(OnLoad));
- private DelegateCommand<object> _HomeCommand;
- public DelegateCommand<object> HomeCommand =>
- _HomeCommand ?? (_HomeCommand = new DelegateCommand<object>(OnHome));
- private DelegateCommand _RobotHomeCommand;
- public DelegateCommand RobotHomeCommand =>
- _RobotHomeCommand ?? (_RobotHomeCommand = new DelegateCommand(OnRobotHome));
- private DelegateCommand<object> _VentCommand;
- public DelegateCommand<object> VentCommand =>
- _VentCommand ?? (_VentCommand = new DelegateCommand<object>(OnVent));
- private DelegateCommand<object> _PumpCommand;
- public DelegateCommand<object> PumpCommand =>
- _PumpCommand ?? (_PumpCommand = new DelegateCommand<object>(OnPump));
- private DelegateCommand<object> _PurgeCommand;
- public DelegateCommand<object> PurgeCommand =>
- _PurgeCommand ?? (_PurgeCommand = new DelegateCommand<object>(OnPurge));
- private DelegateCommand _LeakCheckCommand;
- public DelegateCommand LeakCheckCommand =>
- _LeakCheckCommand ?? (_LeakCheckCommand = new DelegateCommand(OnLeakCheck));
- private DelegateCommand<object> _AbortCommand;
- public DelegateCommand<object> AbortCommand =>
- _AbortCommand ?? (_AbortCommand = new DelegateCommand<object>(OnAbort));
- //private DelegateCommand<object> _ModuleCheckedCommand;
- //public DelegateCommand<object> ModuleCheckedCommand =>
- // _ModuleCheckedCommand ?? (_ModuleCheckedCommand = new DelegateCommand<object>(OnModuleChecked));
- private DelegateCommand<object> _ControlValveCommand;
- public DelegateCommand<object> ControlValveCommand =>
- _ControlValveCommand ?? (_ControlValveCommand = new DelegateCommand<object>(OnControlValve));
- //private DelegateCommand _OpenLLPumpCommand;
- //public DelegateCommand OpenLLPumpCommand =>
- // _OpenLLPumpCommand ?? (_OpenLLPumpCommand = new DelegateCommand(OnOpenLLPump));
- //private DelegateCommand _CloseLLPumpCommand;
- //public DelegateCommand CloseLLPumpCommand =>
- // _CloseLLPumpCommand ?? (_CloseLLPumpCommand = new DelegateCommand(OnCloseLLPump));
- private DelegateCommand<object> _OpenPumpCommand;
- public DelegateCommand<object> OpenPumpCommand =>
- _OpenPumpCommand ?? (_OpenPumpCommand = new DelegateCommand<object>(OnOpenPump));
- private DelegateCommand<object> _ClosePumpCommand;
- public DelegateCommand<object> ClosePumpCommand =>
- _ClosePumpCommand ?? (_ClosePumpCommand = new DelegateCommand<object>(OnClosePump));
- private DelegateCommand<object> _DoorUpDownCommand;
- public DelegateCommand<object> DoorUpDownCommand =>
- _DoorUpDownCommand ?? (_DoorUpDownCommand = new DelegateCommand<object>(OnDoorUpDown));
- private DelegateCommand<object> _ChamberDoorOpenCommand;
- public DelegateCommand<object> ChamberDoorOpenCommand =>
- _ChamberDoorOpenCommand ?? (_ChamberDoorOpenCommand = new DelegateCommand<object>(OnChamberDoorOpen));
- private DelegateCommand<object> _ChamberDoorCloseCommand;
- public DelegateCommand<object> ChamberDoorCloseCommand =>
- _ChamberDoorCloseCommand ?? (_ChamberDoorCloseCommand = new DelegateCommand<object>(OnChamberDoorClose));
- private DelegateCommand<object> _SetTMChamberPressureCommand;
- public DelegateCommand<object> SetTMChamberPressureCommand =>
- _SetTMChamberPressureCommand ?? (_SetTMChamberPressureCommand = new DelegateCommand<object>(OnSetTMChamberPressure));
- private DelegateCommand<object> _OnlineCommand;
- public DelegateCommand<object> OnlineCommand =>
- _OnlineCommand ?? (_OnlineCommand = new DelegateCommand<object>(OnOnline));
- private DelegateCommand<object> _OfflineCommand;
- public DelegateCommand<object> OfflineCommand =>
- _OfflineCommand ?? (_OfflineCommand = new DelegateCommand<object>(OnOffline));
- #endregion
- #region 构造函数
- public TMOperationViewModel()
- {
- addDataKeys();
- RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
- string[] allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString().Split(',');
- PMAIsInstalled = allModules.Contains("PMA");
- PMBIsInstalled = allModules.Contains("PMB");
- PMCIsInstalled = allModules.Contains("PMC");
- PMDIsInstalled = allModules.Contains("PMD");
- LLAIsInstalled = allModules.Contains("LLA");
- LLBIsInstalled = allModules.Contains("LLB");
- timer = new DispatcherTimer();
- timer.Interval = TimeSpan.FromSeconds(0.5);
- timer.Tick += timer_Tick;
- //timer.Start();
- HomeAllSteps.Add("Lid");
- HomeAllSteps.Add("Robot");
- HomeAllSteps.Add("Slit Door");
- HomeAllSteps.Add("Pump ");
- object obj = QueryDataClient.Instance.Service.GetData("System.PressureUnitType");
- PressureType = (PressureType)Convert.ToInt32(obj);
- }
- #endregion
- #region 命令方法
- private void OnLoad(object tmOperationView)
- {
- if (m_firstLoad)
- {
- //m_TMOperationView = (TMOperationView)tmOperationView;
- var AllLeakCheckDa = QueryDataClient.Instance.Service.GetPMLeakCheckResult("TM");
- if (AllLeakCheckDa != null)
- {
- LeakCheckResultList = new ObservableCollection<PMLeakCheckResult>(AllLeakCheckDa);
- }
- m_firstLoad=false;
- }
- }
- private void OnHome(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.Home");
- }
- private void OnRobotHome()
- {
- InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.RobotHome");
- }
- private void OnVent(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.{RtOperation.Vent}");
- }
- private void OnPump(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.{RtOperation.Pump}");
- }
- private void OnPurge(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.{RtOperation.Purge}");
- }
- private void OnLeakCheck()
- {
- InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.LeakCheck}");
- }
- private void OnAbort(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.{RtOperation.Abort}");
- }
- //private void OnModuleChecked(object obj)
- //{
- // m_ModuleCheckedName = obj.ToString();
- //}
- private void OnControlValve(object obj)
- {
- CommonValveControl commonValveControl = (CommonValveControl)obj;
- if (commonValveControl.IsCanEdit == true)
- {
- InvokeClient.Instance.Service.DoOperation($"TM.{commonValveControl.Tag.ToString()}.{AITValveOperation.GVTurnValve}", !commonValveControl.Status);
- string operation = commonValveControl.Status ? "关闭" : "打开";
- LOG.Info($"{ModuleName.TM},{operation}{commonValveControl.Tag.ToString()}");
- }
- }
- private void OnOpenPump(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.ControlPump", true);
- }
- private void OnClosePump(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.ControlPump", false);
- }
- //private void OnOpenLLPump()
- //{
- // InvokeClient.Instance.Service.DoOperation("LL.ControlPump", true);
- //}
- //private void OnCloseLLPump()
- //{
- // InvokeClient.Instance.Service.DoOperation("LL.ControlPump", false);
- //}
- private void OnDoorUpDown(object obj)
- {
- InvokeClient.Instance.Service.DoOperation(obj.ToString());
- }
- private void OnChamberDoorOpen(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj?.ToString()}.SlitDoor.Open");
- }
- private void OnChamberDoorClose(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj?.ToString()}.SlitDoor.Close");
- }
- private void OnSetTMChamberPressure(object obj)
- {
- if (CommonFunction.GetValue<bool>(RtDataValues, $"{obj}.IsEnableControlPressure"))
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.{RtOperation.AbortControlPressure}");
- }
- else
- {
- InvokeClient.Instance.Service.DoOperation($"{obj}.{RtOperation.ControlPressure}");
- }
- }
- private void OnOnline(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.{RtOperation.Online}");
- }
- private void OnOffline(object obj)
- {
- InvokeClient.Instance.Service.DoOperation($"{obj.ToString()}.{RtOperation.Offline}");
- }
- #endregion
- #region 私有方法
- void timer_Tick(object sender, EventArgs e)
- {
- TMOutChamberPressure = (int)QueryDataClient.Instance.Service.GetConfig("TM.ControlPressureSetPoint");
- RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
- if (RtDataValues == null)
- {
- return;
- }
- TMValveN2IsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMValveN2.IsOpen");
- TMSoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMSoftPumpValve.IsOpen"); ;
- TMFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMFastPumpValve.IsOpen"); ;
- //TMPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMPurgeValve.IsOpen"); ;
- TMSoftVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMPurgeValve.IsOpen"); ;
- TMFastVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMVentValve.IsOpen"); ;
- LLASoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLASoftPumpValve.IsOpen");
- LLAFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAFastPumpValve.IsOpen");
- LLAPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAPurgeValve.IsOpen");
- LLAVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAVentValve.IsOpen");
- LLBSoftPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBSoftPumpValve.IsOpen");
- LLBFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBFastPumpValve.IsOpen");
- LLBPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBPurgeValve.IsOpen");
- LLBVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBVentValve.IsOpen");
- LLAVentExhaustValveIsOpen= CommonFunction.GetValue<bool>(RtDataValues, "TM.LLAVentExhaustValve.IsOpen");
- LLBVentExhaustValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBVentExhaustValve.IsOpen");
- TMVentExhaustValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.TMVentExhaustValve.IsOpen");
- //IsOFFline = !CommonFunction.GetValue<bool>(RtDataValues, $"{m_ModuleCheckedName}.IsOnline");
- TMIsOFFline = !CommonFunction.GetValue<bool>(RtDataValues, $"TM.IsOnline");
- LLAIsOFFline = !CommonFunction.GetValue<bool>(RtDataValues, $"LLA.IsOnline");
- LLBIsOFFline = !CommonFunction.GetValue<bool>(RtDataValues, $"LLB.IsOnline");
- TMCurrentState = (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString()));
- LLACurrentState = (LLState)(Enum.Parse(typeof(LLState), RtDataValues[$"LLA.FsmState"].ToString()));
- LLBCurrentState = (LLState)(Enum.Parse(typeof(LLState), RtDataValues[$"LLB.FsmState"].ToString()));
- TMIsHoming = TMCurrentState == TMState.Initializing || (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString())) == TMState.InitializingRB;
- //if (m_TMOperationView != null)
- //{
- // m_TMOperationView.stepBar.Progress = CommonFunction.GetValue<int>(RtDataValues, "TM.Home.StepNo");
- //}
- }
- private void addDataKeys()
- {
- m_RtDataKeys.Add($"TM.TMValveN2.IsOpen");
- m_RtDataKeys.Add($"TM.TMSoftPumpValve.IsOpen");
- m_RtDataKeys.Add($"TM.TMFastPumpValve.IsOpen");
- m_RtDataKeys.Add($"TM.TMPurgeValve.IsOpen");
- //m_RtDataKeys.Add($"TM.TMSoftVentValve.IsOpen");
- m_RtDataKeys.Add($"TM.TMVentValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLASoftPumpValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLAFastPumpValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLAPurgeValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLBPurgeValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLAVentValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLBVentValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLBSoftPumpValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLBFastPumpValve.IsOpen");
- m_RtDataKeys.Add($"TM.TMVentExhaustValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLAVentExhaustValve.IsOpen");
- m_RtDataKeys.Add($"TM.LLBVentExhaustValve.IsOpen");
- m_RtDataKeys.Add($"TM.IoSensor.TMVacSwitch.Value");
- m_RtDataKeys.Add($"TM.IoSensor.LLAVacSwitch.Value");
- m_RtDataKeys.Add($"TM.IoSensor.LLBVacSwitch.Value");
- m_RtDataKeys.Add($"TM.IoSensor.TMATMSwitch.Value");
- m_RtDataKeys.Add($"TM.IoSensor.LLAATMSwitch.Value");
- m_RtDataKeys.Add($"TM.IoSensor.LLBATMSwitch.Value");
- m_RtDataKeys.Add($"TM.TMProcessGauge.Value");
- m_RtDataKeys.Add($"TM.TMForelineGauge.Value");
- m_RtDataKeys.Add($"TM.LLAPressureGauge.Value");
- m_RtDataKeys.Add($"TM.LLBPressureGauge.Value");
- m_RtDataKeys.Add($"TM.LLAForelineGauge.Value");
- m_RtDataKeys.Add($"TM.LLBForelineGauge.Value");
- m_RtDataKeys.Add($"TM.PumpIsRunning");
- m_RtDataKeys.Add($"LLA.PumpIsRunning");
- m_RtDataKeys.Add($"LLB.PumpIsRunning");
- m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
- m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
- m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
- m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
- 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("TM.IoSensor.N2PressureSwitch.Value");
- m_RtDataKeys.Add("TM.TMPressureCtrl.TMChamberSetPoint");
- m_RtDataKeys.Add("TM.TMPressureCtrl.LLAChamberSetPoint");
- m_RtDataKeys.Add("TM.TMPressureCtrl.LLBChamberSetPoint");
- m_RtDataKeys.Add("LLA.IsOnline");
- m_RtDataKeys.Add("LLB.IsOnline");
- m_RtDataKeys.Add("TM.IsOnline");
- m_RtDataKeys.Add("TM.FsmState");
- m_RtDataKeys.Add("LLA.FsmState");
- m_RtDataKeys.Add("LLB.FsmState");
- m_RtDataKeys.Add("TM.Home.StepNo");
- m_RtDataKeys.Add("TM.PMASlitDoor.IsClosed");
- m_RtDataKeys.Add("TM.PMBSlitDoor.IsClosed");
- m_RtDataKeys.Add("TM.PMCSlitDoor.IsClosed");
- m_RtDataKeys.Add("TM.PMDSlitDoor.IsClosed");
- m_RtDataKeys.Add("LLA.IsEnableControlPressure");
- m_RtDataKeys.Add("LLB.IsEnableControlPressure");
- }
- public void EnterExitView(bool isEnter)
- {
- if (isEnter)
- {
- timer_Tick(null, null);
- timer.Start();
- }
- else
- {
- timer.Stop();
- }
- }
- #endregion
- }
- }
|