|
@@ -1,9 +1,11 @@
|
|
|
using Aitex.Sorter.Common;
|
|
|
+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;
|
|
@@ -16,42 +18,54 @@ using System.Windows.Threading;
|
|
|
using Venus_Core;
|
|
|
using Venus_MainPages.Unity;
|
|
|
using Venus_Themes.CustomControls;
|
|
|
+using static Venus_Themes.CustomControls.SERobot;
|
|
|
|
|
|
namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
public enum SeTMModule
|
|
|
{
|
|
|
- PMA, PMB, PMC, VCE1, Aligner
|
|
|
+ PMA, PMB, PMC, VCE1, VPA
|
|
|
}
|
|
|
public enum SeTMBlade
|
|
|
{
|
|
|
Blade1, Blade2
|
|
|
}
|
|
|
- internal class SeTMViewModel : BindableBase
|
|
|
+ public class SeTMViewModel : BindableBase
|
|
|
{
|
|
|
#region 私有字段
|
|
|
- private ModuleInfo m_VCE1ModuleInfo;
|
|
|
- private ModuleInfo m_AlignerModuleInfo;
|
|
|
+ public double m_VPAangle;
|
|
|
+
|
|
|
+ private ModuleInfo m_VCEModuleInfo;
|
|
|
+ private ModuleInfo m_VPAModuleInfo;
|
|
|
private ModuleInfo m_TMModuleInfo;
|
|
|
|
|
|
|
|
|
private WaferInfo m_PMAWafer;
|
|
|
private WaferInfo m_PMBWafer;
|
|
|
private WaferInfo m_PMCWafer;
|
|
|
+ public WaferInfo m_RobotUpperWafer;
|
|
|
+ public WaferInfo m_RobotLowerWafer;
|
|
|
+ public WaferInfo m_PAWafer;
|
|
|
+
|
|
|
|
|
|
private bool m_PMADoorIsOpen;
|
|
|
private bool m_PMBDoorIsOpen;
|
|
|
private bool m_PMCDoorIsOpen;
|
|
|
- private bool m_VCE1DoorIsOpen;
|
|
|
+ private bool m_VCEDoorIsOpen;
|
|
|
+ private bool m_VCEOutDoorIsOpen;
|
|
|
+
|
|
|
|
|
|
private SeTMModule m_PickSelectedModule;
|
|
|
private SeTMModule m_PlaceSelectedModule;
|
|
|
private SeTMModule m_ExtendSelectedModule;
|
|
|
private SeTMModule m_RetractSelectedModule;
|
|
|
+ private SeTMModule m_GotoSelectedModule;
|
|
|
private SeTMBlade m_PickSelectedBlade;
|
|
|
private SeTMBlade m_PlaceSelectedBlade;
|
|
|
private SeTMBlade m_ExtendSelectedBlade;
|
|
|
private SeTMBlade m_RetractSelectedBlade;
|
|
|
+ private SeTMBlade m_GoToSelectedBlade;
|
|
|
+
|
|
|
|
|
|
|
|
|
private ObservableCollection<int> m_PickSoltItemsSource = new ObservableCollection<int>();
|
|
@@ -70,14 +84,37 @@ namespace Venus_MainPages.ViewModels
|
|
|
private bool m_PMAIsInstalled;
|
|
|
private bool m_PMBIsInstalled;
|
|
|
private bool m_PMCIsInstalled;
|
|
|
- private bool m_VCE1IsInstalled;
|
|
|
- private bool m_AlignerIsInstalled;
|
|
|
- private bool m_VCEOutDoorIsOpen;
|
|
|
+ private bool m_VCEIsInstalled;
|
|
|
+ private bool m_VPAIsInstalled;
|
|
|
private Dictionary<string, object> m_RtDataValues = new Dictionary<string, object>();
|
|
|
private List<string> m_RtDataKeys = new List<string>();
|
|
|
+
|
|
|
+
|
|
|
+ private SERobotTAction m_SERobotTAction;
|
|
|
+ private SERobotTAction m_Robot1TAction;
|
|
|
+ private SERobotXAction m_Robot1XAction;
|
|
|
+ private SERobotTAction m_Robot2TAction;
|
|
|
+ private SERobotXAction m_Robot2XAction;
|
|
|
+ public RobotMoveInfo m_robotMoveInfo;
|
|
|
+
|
|
|
+ private List<string> m_OriginalCycle = new List<string>();
|
|
|
+ private List<string> m_ToCycle = new List<string>();
|
|
|
+ private bool m_CycleEnable;
|
|
|
+
|
|
|
+ private bool m_PMAIsCycle;
|
|
|
+ private bool m_PMBIsCycle;
|
|
|
+ private bool m_PMCIsCycle;
|
|
|
+
|
|
|
+ private int m_CycleCount;
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
|
+ public double VPAangle
|
|
|
+ {
|
|
|
+ get { return m_VPAangle; }
|
|
|
+ set { SetProperty(ref m_VPAangle, value); }
|
|
|
+ }
|
|
|
public WaferInfo PMAWafer
|
|
|
{
|
|
|
get { return m_PMAWafer; }
|
|
@@ -93,15 +130,25 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_PMCWafer; }
|
|
|
set { SetProperty(ref m_PMCWafer, value); }
|
|
|
}
|
|
|
+ public WaferInfo RobotUpperWafer
|
|
|
+ {
|
|
|
+ get { return m_RobotUpperWafer; }
|
|
|
+ set { SetProperty(ref m_RobotUpperWafer, value); }
|
|
|
+ }
|
|
|
|
|
|
- public bool VCE1DoorIsOpen
|
|
|
+ public WaferInfo RobotLowerWafer
|
|
|
{
|
|
|
- get => m_VCE1DoorIsOpen;
|
|
|
- set
|
|
|
- {
|
|
|
- SetProperty(ref m_VCE1DoorIsOpen,value);
|
|
|
- }
|
|
|
+ get { return m_RobotLowerWafer; }
|
|
|
+ set { SetProperty(ref m_RobotLowerWafer, value); }
|
|
|
+ }
|
|
|
+ public WaferInfo PAWafer
|
|
|
+ {
|
|
|
+ get { return m_PAWafer; }
|
|
|
+ set { SetProperty(ref m_PAWafer, value); }
|
|
|
}
|
|
|
+ public bool VCEDoorIsOpen { get => m_VCEDoorIsOpen; set => SetProperty(ref m_VCEDoorIsOpen, value); }
|
|
|
+ public bool VCEOutDoorIsOpen { get => m_VCEOutDoorIsOpen; set => SetProperty(ref m_VCEOutDoorIsOpen, value); }
|
|
|
+
|
|
|
|
|
|
public bool PMCDoorIsOpen
|
|
|
{
|
|
@@ -122,20 +169,20 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_PMBDoorIsOpen; }
|
|
|
set { SetProperty(ref m_PMBDoorIsOpen, value); }
|
|
|
}
|
|
|
- public ModuleInfo VCE1ModuleInfo
|
|
|
+ public ModuleInfo VCEModuleInfo
|
|
|
{
|
|
|
- get { return m_VCE1ModuleInfo; }
|
|
|
+ get { return m_VCEModuleInfo; }
|
|
|
set
|
|
|
{
|
|
|
- SetProperty(ref m_VCE1ModuleInfo, value);
|
|
|
+ SetProperty(ref m_VCEModuleInfo, value);
|
|
|
}
|
|
|
}
|
|
|
- public ModuleInfo AlignerModuleInfo
|
|
|
+ public ModuleInfo VPAModuleInfo
|
|
|
{
|
|
|
- get { return m_AlignerModuleInfo; }
|
|
|
+ get { return m_VPAModuleInfo; }
|
|
|
set
|
|
|
{
|
|
|
- SetProperty(ref m_AlignerModuleInfo, value);
|
|
|
+ SetProperty(ref m_VPAModuleInfo, value);
|
|
|
}
|
|
|
}
|
|
|
public Dictionary<string, object> RtDataValues
|
|
@@ -144,7 +191,6 @@ namespace Venus_MainPages.ViewModels
|
|
|
set { SetProperty(ref m_RtDataValues, value); }
|
|
|
}
|
|
|
|
|
|
- public bool VCEOutDoorIsOpen { get => m_VCEOutDoorIsOpen; set => SetProperty(ref m_VCEOutDoorIsOpen, value); }
|
|
|
public bool PMAIsInstalled
|
|
|
{
|
|
|
get { return m_PMAIsInstalled; }
|
|
@@ -160,15 +206,15 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_PMCIsInstalled; }
|
|
|
set { SetProperty(ref m_PMCIsInstalled, value); }
|
|
|
}
|
|
|
- public bool VCE1IsInstalled
|
|
|
+ public bool VCEIsInstalled
|
|
|
{
|
|
|
- get { return m_VCE1IsInstalled; }
|
|
|
- set { SetProperty(ref m_VCE1IsInstalled, value); }
|
|
|
+ get { return m_VCEIsInstalled; }
|
|
|
+ set { SetProperty(ref m_VCEIsInstalled, value); }
|
|
|
}
|
|
|
- public bool AlignerIsInstalled
|
|
|
+ public bool VPAIsInstalled
|
|
|
{
|
|
|
- get { return m_AlignerIsInstalled; }
|
|
|
- set { SetProperty(ref m_AlignerIsInstalled, value); }
|
|
|
+ get { return m_VPAIsInstalled; }
|
|
|
+ set { SetProperty(ref m_VPAIsInstalled, value); }
|
|
|
}
|
|
|
|
|
|
public List<SeTMModule> TMModules
|
|
@@ -198,6 +244,11 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_RetractSelectedModule; }
|
|
|
set { SetProperty(ref m_RetractSelectedModule, value); }
|
|
|
}
|
|
|
+ public SeTMModule GotoSelectedModule
|
|
|
+ {
|
|
|
+ get { return m_GotoSelectedModule; }
|
|
|
+ set { SetProperty(ref m_GotoSelectedModule, value); }
|
|
|
+ }
|
|
|
public ModuleInfo TMModuleInfo
|
|
|
{
|
|
|
get { return m_TMModuleInfo; }
|
|
@@ -227,6 +278,12 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_RetractSelectedBlade; }
|
|
|
set { SetProperty(ref m_RetractSelectedBlade, value); }
|
|
|
}
|
|
|
+ public SeTMBlade GoToSelectedBlade
|
|
|
+ {
|
|
|
+ get { return m_GoToSelectedBlade; }
|
|
|
+ set { SetProperty(ref m_GoToSelectedBlade, value); }
|
|
|
+ }
|
|
|
+
|
|
|
public ObservableCollection<int> PickSoltItemsSource
|
|
|
{
|
|
|
get { return m_PickSoltItemsSource; }
|
|
@@ -267,6 +324,77 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_RetractSoltSelectedIndex; }
|
|
|
set { SetProperty(ref m_RetractSoltSelectedIndex, value); }
|
|
|
}
|
|
|
+
|
|
|
+ public SERobotTAction SERobotTAction
|
|
|
+ {
|
|
|
+ get { return m_SERobotTAction; }
|
|
|
+ set { SetProperty(ref m_SERobotTAction, value); }
|
|
|
+ }
|
|
|
+ public SERobotTAction Robot1TAction
|
|
|
+ {
|
|
|
+ get { return m_Robot1TAction; }
|
|
|
+ set { SetProperty(ref m_Robot1TAction, value); }
|
|
|
+ }
|
|
|
+ public SERobotXAction Robot1XAction
|
|
|
+ {
|
|
|
+ get { return m_Robot1XAction; }
|
|
|
+ set { SetProperty(ref m_Robot1XAction, value); }
|
|
|
+ }
|
|
|
+ public SERobotTAction Robot2TAction
|
|
|
+ {
|
|
|
+ get { return m_Robot2TAction; }
|
|
|
+ set { SetProperty(ref m_Robot2TAction, value); }
|
|
|
+ }
|
|
|
+ public SERobotXAction Robot2XAction
|
|
|
+ {
|
|
|
+ get { return m_Robot2XAction; }
|
|
|
+ set { SetProperty(ref m_Robot2XAction, value); }
|
|
|
+ }
|
|
|
+ public RobotMoveInfo RobotMoveInfo
|
|
|
+ {
|
|
|
+ get { return m_robotMoveInfo; }
|
|
|
+ set
|
|
|
+ {
|
|
|
+ RobotMoveInfoChanged(m_robotMoveInfo, value);
|
|
|
+ m_robotMoveInfo = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<string> OriginalCycle
|
|
|
+ {
|
|
|
+ get { return m_OriginalCycle; }
|
|
|
+ set { SetProperty(ref m_OriginalCycle, value); }
|
|
|
+ }
|
|
|
+ public List<string> ToCycle
|
|
|
+ {
|
|
|
+ get { return m_ToCycle; }
|
|
|
+ set { SetProperty(ref m_ToCycle, value); }
|
|
|
+ }
|
|
|
+ public bool CycleEnable
|
|
|
+ {
|
|
|
+ get { return m_CycleEnable; }
|
|
|
+ set { SetProperty(ref m_CycleEnable, value); }
|
|
|
+ }
|
|
|
+ public bool PMAIsCycle
|
|
|
+ {
|
|
|
+ get { return m_PMAIsCycle; }
|
|
|
+ set { SetProperty(ref m_PMAIsCycle, value); }
|
|
|
+ }
|
|
|
+ public bool PMBIsCycle
|
|
|
+ {
|
|
|
+ get { return m_PMBIsCycle; }
|
|
|
+ set { SetProperty(ref m_PMBIsCycle, value); }
|
|
|
+ }
|
|
|
+ public bool PMCIsCycle
|
|
|
+ {
|
|
|
+ get { return m_PMCIsCycle; }
|
|
|
+ set { SetProperty(ref m_PMCIsCycle, value); }
|
|
|
+ }
|
|
|
+ public int CycleCount
|
|
|
+ {
|
|
|
+ get { return m_CycleCount; }
|
|
|
+ set { SetProperty(ref m_CycleCount, value); }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
#endregion
|
|
@@ -296,7 +424,23 @@ namespace Venus_MainPages.ViewModels
|
|
|
public DelegateCommand _RobotHomeCommand;
|
|
|
public DelegateCommand RobotHomeCommand =>
|
|
|
_RobotHomeCommand ?? (_RobotHomeCommand = new DelegateCommand(OnRobotHome));
|
|
|
+ private DelegateCommand _HomeCommand;
|
|
|
+ public DelegateCommand HomeCommand =>
|
|
|
+ _HomeCommand ?? (_HomeCommand = new DelegateCommand(OnHome));
|
|
|
+ private DelegateCommand _GotoCommand;
|
|
|
+ public DelegateCommand GotoCommand =>
|
|
|
+ _GotoCommand ?? (_GotoCommand = new DelegateCommand(OnGoto));
|
|
|
#endregion
|
|
|
+
|
|
|
+ private DelegateCommand _StartCycleCommand;
|
|
|
+ public DelegateCommand StartCycleCommand =>
|
|
|
+ _StartCycleCommand ?? (_StartCycleCommand = new DelegateCommand(OnStartCycle));
|
|
|
+
|
|
|
+ private DelegateCommand _StopCycleCommand;
|
|
|
+
|
|
|
+ public DelegateCommand StopCycleCommand =>
|
|
|
+ _StopCycleCommand ?? (_StopCycleCommand = new DelegateCommand(OnStopCycle));
|
|
|
+
|
|
|
|
|
|
#region 构造函数
|
|
|
public SeTMViewModel()
|
|
@@ -305,8 +449,8 @@ namespace Venus_MainPages.ViewModels
|
|
|
PMAIsInstalled = allModules.Contains("PMA");
|
|
|
PMBIsInstalled = allModules.Contains("PMB");
|
|
|
PMCIsInstalled = allModules.Contains("PMC");
|
|
|
- VCE1IsInstalled = allModules.Contains("VCE1");
|
|
|
- AlignerIsInstalled = allModules.Contains("VPA");
|
|
|
+ VCEIsInstalled = allModules.Contains("VCE1");
|
|
|
+ VPAIsInstalled = allModules.Contains("VPA");
|
|
|
if (PMAIsInstalled == true)
|
|
|
{
|
|
|
TMModules.Add(SeTMModule.PMA);
|
|
@@ -318,14 +462,20 @@ namespace Venus_MainPages.ViewModels
|
|
|
if (PMCIsInstalled == true)
|
|
|
{
|
|
|
TMModules.Add(SeTMModule.PMC);
|
|
|
+ m_VPAangle = 270;
|
|
|
}
|
|
|
- if (VCE1IsInstalled == true)
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_VPAangle = 180;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (VCEIsInstalled == true)
|
|
|
{
|
|
|
TMModules.Add(SeTMModule.VCE1);
|
|
|
}
|
|
|
- if (AlignerIsInstalled == true)
|
|
|
+ if (VPAIsInstalled == true)
|
|
|
{
|
|
|
- TMModules.Add(SeTMModule.Aligner);
|
|
|
+ TMModules.Add(SeTMModule.VPA);
|
|
|
}
|
|
|
|
|
|
PickSoltItemsSource.Add(1);
|
|
@@ -337,7 +487,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
addDataKeys();
|
|
|
RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
|
|
|
|
|
|
- VCE1DoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.VCESlitDoorClosed");
|
|
|
+ VCEDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.VCESlitDoorClosed");
|
|
|
PMADoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.PMASlitDoorClosed");
|
|
|
PMBDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.PMBSlitDoorClosed");
|
|
|
PMCDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.PMCSlitDoorClosed");
|
|
@@ -441,8 +591,6 @@ namespace Venus_MainPages.ViewModels
|
|
|
var selectedHand = (Hand)Enum.Parse(typeof(Hand), PickSelectedBlade.ToString(), true);
|
|
|
MoveItem moveItem = new MoveItem(moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, ModuleName.TMRobot, 0, selectedHand);
|
|
|
moveItems.Enqueue(moveItem);
|
|
|
-
|
|
|
-
|
|
|
if ((int)PickSelectedModule < TMModules.Count - 2)
|
|
|
{
|
|
|
InvokeClient.Instance.Service.DoOperation($"SETM.PMPick", moveItems);
|
|
@@ -458,12 +606,13 @@ namespace Venus_MainPages.ViewModels
|
|
|
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.TMRobot, 0, moduleName, PlaceSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
|
|
|
+ MoveItem moveItem = new MoveItem(ModuleName.TMRobot, 0, moduleName, PlaceSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
|
|
|
moveItems.Enqueue(moveItem);
|
|
|
- if ((int)PickSelectedModule < TMModules.Count - 2)
|
|
|
+ if ((int)PlaceSelectedModule < TMModules.Count - 2)
|
|
|
{
|
|
|
InvokeClient.Instance.Service.DoOperation($"SETM.PMPlace", moveItems);
|
|
|
}
|
|
|
+
|
|
|
else
|
|
|
{
|
|
|
InvokeClient.Instance.Service.DoOperation($"SETM.Place", moveItems);
|
|
@@ -487,7 +636,52 @@ namespace Venus_MainPages.ViewModels
|
|
|
|
|
|
private void OnRobotHome()
|
|
|
{
|
|
|
- InvokeClient.Instance.Service.DoOperation($"SETM.RobotHome");
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"SETM.Home", "TMRobot");
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"SETM.Retract");
|
|
|
+
|
|
|
+ }
|
|
|
+ private void OnHome()
|
|
|
+ {
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"SETM.Home");
|
|
|
+ }
|
|
|
+ private void OnGoto()
|
|
|
+ {
|
|
|
+ var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), GotoSelectedModule.ToString(), true);
|
|
|
+ var selectedHand = (Hand)Enum.Parse(typeof(Hand), GoToSelectedBlade.ToString(), true);
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"SETM.Goto", moduleName, 0, selectedHand);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnStartCycle()
|
|
|
+ {
|
|
|
+ if (CycleEnable == false)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<string> stations = new List<string>();
|
|
|
+ stations.Add("VCE1");
|
|
|
+ stations.Add("VPA");
|
|
|
+ if (PMAIsCycle == true)
|
|
|
+ {
|
|
|
+ stations.Add("PMA");
|
|
|
+ }
|
|
|
+ if (PMBIsCycle == true)
|
|
|
+ {
|
|
|
+ stations.Add("PMB");
|
|
|
+ }
|
|
|
+ if (PMCIsCycle == true)
|
|
|
+ {
|
|
|
+ stations.Add("PMC");
|
|
|
+ }
|
|
|
+ stations.Add("VCE1");
|
|
|
+ InvokeClient.Instance.Service.DoOperation("System.SETMCycle", stations.ToArray(), CycleCount);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnStopCycle()
|
|
|
+ {
|
|
|
+
|
|
|
+ InvokeClient.Instance.Service.DoOperation("System.SEAbort");
|
|
|
+
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -495,9 +689,9 @@ namespace Venus_MainPages.ViewModels
|
|
|
private void Timer_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
TMModuleInfo = ModuleManager.ModuleInfos["TMRobot"];
|
|
|
- if (VCE1IsInstalled)
|
|
|
- {
|
|
|
-
|
|
|
+ if (VCEIsInstalled)
|
|
|
+ {
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (PMAIsInstalled == true)
|
|
@@ -517,12 +711,228 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
|
|
|
RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
|
|
|
- VCE1DoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.VCESlitDoorClosed");
|
|
|
+ VCEDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.VCESlitDoorClosed");
|
|
|
PMADoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.PMASlitDoorClosed");
|
|
|
PMBDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.PMBSlitDoorClosed");
|
|
|
PMCDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "SETM.PMCSlitDoorClosed");
|
|
|
VCEOutDoorIsOpen = !CommonFunction.GetValue<bool>(RtDataValues, "VCE1.VCEOutDoorClosed");
|
|
|
+ RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("SETM.RobotMoveAction");
|
|
|
+ RobotUpperWafer = TMModuleInfo.WaferManager.Wafers[0];
|
|
|
+ RobotLowerWafer = TMModuleInfo.WaferManager.Wafers[1];
|
|
|
+ PAWafer = ModuleManager.ModuleInfos["VPA"].WaferManager.Wafers[0];
|
|
|
+
|
|
|
+ }
|
|
|
+ private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
|
|
|
+ {
|
|
|
+ string RobotTarget;
|
|
|
+ if (oldValue == null || newValue == null)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ #region Rotating
|
|
|
+ if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Rotating))
|
|
|
+ {
|
|
|
+ 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 SERobotTAction = (SERobotTAction)Enum.Parse(typeof(SERobotTAction), module, true);
|
|
|
+ if (SERobotTAction != Robot1TAction)
|
|
|
+ {
|
|
|
+ Robot1TAction = SERobotTAction;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ var SERobotTAction = (SERobotTAction)Enum.Parse(typeof(SERobotTAction), module, true);
|
|
|
+ if (SERobotTAction != Robot2TAction)
|
|
|
+ {
|
|
|
+ Robot2TAction = SERobotTAction;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region VPA、VCE1 Pick、Place
|
|
|
+ else 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 SERobotTAction = (SERobotTAction)Enum.Parse(typeof(SERobotTAction), module, true);
|
|
|
+ if (SERobotTAction != Robot1TAction)
|
|
|
+ {
|
|
|
+ Robot1TAction = SERobotTAction;
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+
|
|
|
+ if (module == "VCE1")
|
|
|
+ {
|
|
|
+ Robot1XAction = SERobotXAction.ToVCE;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Robot1XAction = SERobotXAction.Extend;
|
|
|
+ }
|
|
|
+ while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus == 0))
|
|
|
+ {
|
|
|
+ await Task.Delay(100);
|
|
|
+ }
|
|
|
+ Robot1XAction = SERobotXAction.Retract;
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ var SERobotTAction = (SERobotTAction)Enum.Parse(typeof(SERobotTAction), module, true);
|
|
|
+ if (SERobotTAction != Robot2TAction)
|
|
|
+ {
|
|
|
+ Robot2TAction = SERobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+ if (module == "VCE1")
|
|
|
+ {
|
|
|
+ Robot2XAction = SERobotXAction.ToVCE2;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Robot2XAction = SERobotXAction.Extend2;
|
|
|
+ }
|
|
|
+ while ((newValue.Action == RobotAction.Placing && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus != 0) || (newValue.Action == RobotAction.Picking && ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus == 0))
|
|
|
+ {
|
|
|
+ await Task.Delay(100);
|
|
|
+ }
|
|
|
+ Robot2XAction = SERobotXAction.Retract2;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region PM pick、PM place
|
|
|
+ else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Extending)
|
|
|
+ {
|
|
|
+ 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 SERobotTAction = (SERobotTAction)Enum.Parse(typeof(SERobotTAction), module, true);
|
|
|
+ if (SERobotTAction != Robot1TAction)
|
|
|
+ {
|
|
|
+ Robot1TAction = SERobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+
|
|
|
+ Robot1XAction = SERobotXAction.Extend;
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ var SERobotTAction = (SERobotTAction)Enum.Parse(typeof(SERobotTAction), module, true);
|
|
|
+ if (SERobotTAction != Robot2TAction)
|
|
|
+ {
|
|
|
+ Robot2TAction = SERobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+
|
|
|
+ Robot2XAction = SERobotXAction.Extend2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Retracting)
|
|
|
+ {
|
|
|
+ var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
|
|
|
+ if (TMRobotMoveActionBladeTarget != null)
|
|
|
+ {
|
|
|
+ RobotTarget = TMRobotMoveActionBladeTarget.ToString();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var values = RobotTarget.Split('.');
|
|
|
+ var arm = values[0];
|
|
|
+ if (arm == "ArmA")
|
|
|
+ {
|
|
|
+ Robot1XAction = SERobotXAction.Retract;
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ Robot2XAction = SERobotXAction.Retract2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+ #region Home
|
|
|
+ else if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Homing)
|
|
|
+ {
|
|
|
+ if (Robot1XAction == SERobotXAction.Extend)
|
|
|
+ {
|
|
|
+ Robot1XAction = SERobotXAction.Retract;
|
|
|
+ }
|
|
|
+ if (Robot2XAction == SERobotXAction.Extend2)
|
|
|
+ {
|
|
|
+ Robot2XAction = SERobotXAction.Retract2;
|
|
|
+ }
|
|
|
+ await Task.Delay(2000);
|
|
|
+ if (Robot1TAction != SERobotTAction.T_Origin)
|
|
|
+ {
|
|
|
+ Robot1TAction = SERobotTAction.T_Origin;
|
|
|
+ }
|
|
|
+ if (Robot2TAction != SERobotTAction.T_Origin)
|
|
|
+ {
|
|
|
+ Robot2TAction = SERobotTAction.T_Origin;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
#endregion
|
|
|
}
|
|
|
|