|
@@ -1,15 +1,18 @@
|
|
using Aitex.Core.Common.DeviceData;
|
|
using Aitex.Core.Common.DeviceData;
|
|
using Aitex.Core.UI.Control;
|
|
using Aitex.Core.UI.Control;
|
|
using MECF.Framework.Common.DataCenter;
|
|
using MECF.Framework.Common.DataCenter;
|
|
|
|
+using MECF.Framework.Common.Equipment;
|
|
using MECF.Framework.Common.OperationCenter;
|
|
using MECF.Framework.Common.OperationCenter;
|
|
using Prism.Commands;
|
|
using Prism.Commands;
|
|
using Prism.Mvvm;
|
|
using Prism.Mvvm;
|
|
using System;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
+using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Windows.Threading;
|
|
using System.Windows.Threading;
|
|
using Venus_Core;
|
|
using Venus_Core;
|
|
using Venus_MainPages.Unity;
|
|
using Venus_MainPages.Unity;
|
|
|
|
+using Venus_MainPages.Views;
|
|
using Venus_Themes.CustomControls;
|
|
using Venus_Themes.CustomControls;
|
|
using Venus_Themes.Unity;
|
|
using Venus_Themes.Unity;
|
|
|
|
|
|
@@ -18,14 +21,19 @@ namespace Venus_MainPages.ViewModels
|
|
public class TMOperationViewModel : BindableBase
|
|
public class TMOperationViewModel : BindableBase
|
|
{
|
|
{
|
|
#region 私有字段
|
|
#region 私有字段
|
|
- private bool m_TMIsOFFline;
|
|
|
|
- private bool m_LLIsOFFline;
|
|
|
|
|
|
+ private TMOperationView m_TMOperationView;
|
|
|
|
+ private bool m_IsOFFline=true;
|
|
|
|
|
|
- private bool m_PMADoorIsOpen;
|
|
|
|
- private bool m_PMBDoorIsOpen;
|
|
|
|
- private bool m_PMCDoorIsOpen;
|
|
|
|
- private bool m_PMDDoorIsOpen;
|
|
|
|
- private bool m_LLADoorIsOpen;
|
|
|
|
|
|
+ private bool m_TMIsOFFline = true;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //private bool m_PMADoorIsOpen;
|
|
|
|
+ //private bool m_PMBDoorIsOpen;
|
|
|
|
+ //private bool m_PMCDoorIsOpen;
|
|
|
|
+ //private bool m_PMDDoorIsOpen;
|
|
|
|
+ //private bool m_LLADoorIsOpen;
|
|
|
|
|
|
|
|
|
|
private bool m_PMAIsInstalled;
|
|
private bool m_PMAIsInstalled;
|
|
@@ -56,8 +64,17 @@ namespace Venus_MainPages.ViewModels
|
|
private List<string> m_RtDataKeys=new List<string> ();
|
|
private List<string> m_RtDataKeys=new List<string> ();
|
|
|
|
|
|
private int m_TMOutChamberPressure;
|
|
private int m_TMOutChamberPressure;
|
|
|
|
+ private int m_TMOutChamberFlow;
|
|
|
|
+
|
|
private int m_TMChamberPressureSetPoint;
|
|
private int m_TMChamberPressureSetPoint;
|
|
|
|
+ private int m_TMChamberFlowSetPoint;
|
|
|
|
+ private ObservableCollection<string> m_HomeAllSteps = new ObservableCollection<string>();
|
|
|
|
+ private int m_StepProcess;
|
|
|
|
+ private bool m_TMIsHoming;
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
|
|
|
|
+ #region 属性
|
|
public bool TMValveN2IsOpen
|
|
public bool TMValveN2IsOpen
|
|
{
|
|
{
|
|
get { return m_TMValveN2IsOpen; }
|
|
get { return m_TMValveN2IsOpen; }
|
|
@@ -133,30 +150,63 @@ namespace Venus_MainPages.ViewModels
|
|
get { return m_TMChamberPressureSetPoint; }
|
|
get { return m_TMChamberPressureSetPoint; }
|
|
set { SetProperty(ref m_TMChamberPressureSetPoint, value); }
|
|
set { SetProperty(ref m_TMChamberPressureSetPoint, value); }
|
|
}
|
|
}
|
|
-
|
|
|
|
- #endregion
|
|
|
|
-
|
|
|
|
- #region 属性
|
|
|
|
- public bool TMIsOFFline
|
|
|
|
|
|
+ public int TMChamberFlowSetPoint
|
|
{
|
|
{
|
|
- get { return m_TMIsOFFline; }
|
|
|
|
- set { SetProperty(ref m_TMIsOFFline, value); }
|
|
|
|
- }
|
|
|
|
- public bool LLIsOFFline
|
|
|
|
- {
|
|
|
|
- get { return m_LLIsOFFline; }
|
|
|
|
- set { SetProperty(ref m_LLIsOFFline, value); }
|
|
|
|
|
|
+ get { return m_TMChamberFlowSetPoint; }
|
|
|
|
+ set { SetProperty(ref m_TMChamberFlowSetPoint, value); }
|
|
}
|
|
}
|
|
- public bool PMADoorIsOpen
|
|
|
|
|
|
+ public bool IsOFFline
|
|
{
|
|
{
|
|
- get { return m_PMADoorIsOpen; }
|
|
|
|
- set { SetProperty(ref m_PMADoorIsOpen, value); }
|
|
|
|
|
|
+ get { return m_IsOFFline; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ SetProperty(ref m_IsOFFline, value);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- public bool LLADoorIsOpen
|
|
|
|
|
|
+ public bool TMIsOFFline
|
|
{
|
|
{
|
|
- get { return m_LLADoorIsOpen; }
|
|
|
|
- set { SetProperty(ref m_LLADoorIsOpen, value); }
|
|
|
|
|
|
+ get { return m_TMIsOFFline; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ if (m_TMIsOFFline == true && value == false)
|
|
|
|
+ {
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.ControlPressure}");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (m_TMIsOFFline == false && value == true)
|
|
|
|
+ {
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.AbortControlPressure}");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ SetProperty(ref m_TMIsOFFline, value);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //public bool PMADoorIsOpen
|
|
|
|
+ //{
|
|
|
|
+ // get { return m_PMADoorIsOpen; }
|
|
|
|
+ // set { SetProperty(ref m_PMADoorIsOpen, value); }
|
|
|
|
+ //}
|
|
|
|
+ //public bool PMBDoorIsOpen
|
|
|
|
+ //{
|
|
|
|
+ // get { return m_PMBDoorIsOpen; }
|
|
|
|
+ // set { SetProperty(ref m_PMBDoorIsOpen, value); }
|
|
|
|
+ //}
|
|
|
|
+ //public bool PMCDoorIsOpen
|
|
|
|
+ //{
|
|
|
|
+ // get { return m_PMCDoorIsOpen; }
|
|
|
|
+ // set { SetProperty(ref m_PMCDoorIsOpen, value); }
|
|
|
|
+ //}
|
|
|
|
+ //public bool PMDDoorIsOpen
|
|
|
|
+ //{
|
|
|
|
+ // get { return m_PMDDoorIsOpen; }
|
|
|
|
+ // set { SetProperty(ref m_PMDDoorIsOpen, value); }
|
|
|
|
+ //}
|
|
|
|
+ //public bool LLADoorIsOpen
|
|
|
|
+ //{
|
|
|
|
+ // get { return m_LLADoorIsOpen; }
|
|
|
|
+ // set { SetProperty(ref m_LLADoorIsOpen, value); }
|
|
|
|
+ //}
|
|
public Dictionary<string, object> RtDataValues
|
|
public Dictionary<string, object> RtDataValues
|
|
{
|
|
{
|
|
get { return m_RtDataValues; }
|
|
get { return m_RtDataValues; }
|
|
@@ -192,23 +242,52 @@ namespace Venus_MainPages.ViewModels
|
|
get { return m_LLBIsInstalled; }
|
|
get { return m_LLBIsInstalled; }
|
|
set { SetProperty(ref m_LLBIsInstalled, value); }
|
|
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
|
|
public int TMOutChamberPressure
|
|
{
|
|
{
|
|
get { return m_TMOutChamberPressure; }
|
|
get { return m_TMOutChamberPressure; }
|
|
set
|
|
set
|
|
{
|
|
{
|
|
- if (value != m_TMOutChamberPressure)
|
|
|
|
- {
|
|
|
|
- InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure",value);
|
|
|
|
- }
|
|
|
|
|
|
+ //if (value != m_TMOutChamberPressure)
|
|
|
|
+ //{
|
|
|
|
+ // InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure",value);
|
|
|
|
+ //}
|
|
SetProperty(ref m_TMOutChamberPressure, value);
|
|
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); }
|
|
|
|
+ }
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
#region 命令
|
|
#region 命令
|
|
-
|
|
|
|
|
|
+ private DelegateCommand<object> _LoadCommand;
|
|
|
|
+ public DelegateCommand<object> LoadCommand =>
|
|
|
|
+ _LoadCommand ?? (_LoadCommand = new DelegateCommand<object>(OnLoad));
|
|
|
|
|
|
private DelegateCommand _HomeCommand;
|
|
private DelegateCommand _HomeCommand;
|
|
public DelegateCommand HomeCommand =>
|
|
public DelegateCommand HomeCommand =>
|
|
@@ -271,7 +350,14 @@ namespace Venus_MainPages.ViewModels
|
|
private DelegateCommand _SetTMChamberPressureCommand;
|
|
private DelegateCommand _SetTMChamberPressureCommand;
|
|
public DelegateCommand SetTMChamberPressureCommand =>
|
|
public DelegateCommand SetTMChamberPressureCommand =>
|
|
_SetTMChamberPressureCommand ?? (_SetTMChamberPressureCommand = new DelegateCommand(OnSetTMChamberPressure));
|
|
_SetTMChamberPressureCommand ?? (_SetTMChamberPressureCommand = new DelegateCommand(OnSetTMChamberPressure));
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ private DelegateCommand _OnlineCommand;
|
|
|
|
+ public DelegateCommand OnlineCommand =>
|
|
|
|
+ _OnlineCommand ?? (_OnlineCommand = new DelegateCommand(OnOnline));
|
|
|
|
+
|
|
|
|
+ private DelegateCommand _OfflineCommand;
|
|
|
|
+ public DelegateCommand OfflineCommand =>
|
|
|
|
+ _OfflineCommand ?? (_OfflineCommand = new DelegateCommand(OnOffline));
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
@@ -298,9 +384,11 @@ namespace Venus_MainPages.ViewModels
|
|
UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
|
|
UIEvents.LLTDoorRaiseChangedEvent += UIEvents_LLTDoorRaiseChangedEvent;
|
|
|
|
|
|
UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
|
|
UIEvents.LLEDoorRaiseChangedEvent += UIEvents_LLEDoorRaiseChangedEvent;
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ HomeAllSteps.Add("Lid");
|
|
|
|
+ HomeAllSteps.Add("Robot");
|
|
|
|
+ HomeAllSteps.Add("Slit Door");
|
|
|
|
+ HomeAllSteps.Add("Pump");
|
|
|
|
+ HomeAllSteps.Add("ATM Switch");
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -308,7 +396,10 @@ namespace Venus_MainPages.ViewModels
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
#region 命令方法
|
|
#region 命令方法
|
|
-
|
|
|
|
|
|
+ private void OnLoad(object tmOperationView)
|
|
|
|
+ {
|
|
|
|
+ m_TMOperationView = (TMOperationView)tmOperationView;
|
|
|
|
+ }
|
|
|
|
|
|
private void OnHome()
|
|
private void OnHome()
|
|
{
|
|
{
|
|
@@ -382,15 +473,23 @@ namespace Venus_MainPages.ViewModels
|
|
{
|
|
{
|
|
//InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure", TMChamberPressureSetPoint);
|
|
//InvokeClient.Instance.Service.DoOperation($"TM.SetChamberPressure", TMChamberPressureSetPoint);
|
|
//TMOutChamberPressure = TMChamberPressureSetPoint;
|
|
//TMOutChamberPressure = TMChamberPressureSetPoint;
|
|
- InvokeClient.Instance.Service.DoOperation("System.SetConfig","TM.ChamberPressure", TMChamberPressureSetPoint.ToString());
|
|
|
|
|
|
+ ////InvokeClient.Instance.Service.DoOperation("System.SetConfig", "TM.ControlPressureSetPoint", TMChamberPressureSetPoint.ToString());
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ private void OnOnline()
|
|
|
|
+ {
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Online}");
|
|
|
|
+ }
|
|
|
|
+ private void OnOffline()
|
|
|
|
+ {
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{m_ModuleCheckedName}.{RtOperation.Offline}");
|
|
|
|
+ }
|
|
|
|
+
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
#region 私有方法
|
|
#region 私有方法
|
|
void timer_Tick(object sender, EventArgs e)
|
|
void timer_Tick(object sender, EventArgs e)
|
|
{
|
|
{
|
|
- TMOutChamberPressure = (int)QueryDataClient.Instance.Service.GetConfig("TM.ChamberPressure");
|
|
|
|
|
|
+ TMOutChamberPressure = (int)QueryDataClient.Instance.Service.GetConfig("TM.ControlPressureSetPoint");
|
|
|
|
|
|
|
|
|
|
RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
|
|
RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
|
|
@@ -414,6 +513,14 @@ namespace Venus_MainPages.ViewModels
|
|
LLBFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBFastPumpValve.IsOpen");
|
|
LLBFastPumpValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBFastPumpValve.IsOpen");
|
|
LLBPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBPurgeValve.IsOpen");
|
|
LLBPurgeValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBPurgeValve.IsOpen");
|
|
LLBVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBVentValve.IsOpen");
|
|
LLBVentValveIsOpen = CommonFunction.GetValue<bool>(RtDataValues, "TM.LLBVentValve.IsOpen");
|
|
|
|
+ IsOFFline= !CommonFunction.GetValue<bool>(RtDataValues, $"{m_ModuleCheckedName}.IsOnline");
|
|
|
|
+ TMIsOFFline= !CommonFunction.GetValue<bool>(RtDataValues, $"TM.IsOnline");
|
|
|
|
+ TMIsHoming= (TMState)(Enum.Parse(typeof(TMState), RtDataValues[$"TM.FsmState"].ToString()))== TMState.Initializing;
|
|
|
|
+ if (m_TMOperationView != null)
|
|
|
|
+ {
|
|
|
|
+ m_TMOperationView.stepBar.Progress= CommonFunction.GetValue<int>(RtDataValues, "TM.Home.StepNo");
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
private void addDataKeys()
|
|
private void addDataKeys()
|
|
{
|
|
{
|
|
@@ -459,9 +566,13 @@ namespace Venus_MainPages.ViewModels
|
|
m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
|
|
m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
|
|
m_RtDataKeys.Add("TM.N2PressureSwitch.Value");
|
|
m_RtDataKeys.Add("TM.N2PressureSwitch.Value");
|
|
m_RtDataKeys.Add("TM.TMPressureCtrl.TMChamberSetPoint");
|
|
m_RtDataKeys.Add("TM.TMPressureCtrl.TMChamberSetPoint");
|
|
|
|
+ m_RtDataKeys.Add("LLA.IsOnline");
|
|
|
|
+ m_RtDataKeys.Add("LLB.IsOnline");
|
|
|
|
+ m_RtDataKeys.Add("TM.IsOnline");
|
|
|
|
+ m_RtDataKeys.Add("TM.FsmState");
|
|
|
|
+ m_RtDataKeys.Add("TM.Home.StepNo");
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
|
|
private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
|
|
{
|
|
{
|