|
@@ -3,6 +3,7 @@ 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 Prism.Commands;
|
|
|
using Prism.Mvvm;
|
|
@@ -12,6 +13,8 @@ using System.Collections.ObjectModel;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using System.Windows;
|
|
|
+using System.Windows.Controls;
|
|
|
using System.Windows.Threading;
|
|
|
using Venus_Core;
|
|
|
using Venus_MainPages.Unity;
|
|
@@ -19,6 +22,7 @@ using Venus_Themes.CustomControls;
|
|
|
|
|
|
namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
+
|
|
|
public enum TMModule
|
|
|
{
|
|
|
PMA, PMB, PMC, PMD, LLA, LLB
|
|
@@ -84,7 +88,16 @@ namespace Venus_MainPages.ViewModels
|
|
|
private string m_RobotTarget;
|
|
|
|
|
|
private string m_RobotArm;
|
|
|
-
|
|
|
+
|
|
|
+ private bool m_PMAIsInstalled;
|
|
|
+ private bool m_PMBIsInstalled;
|
|
|
+ private bool m_PMCIsInstalled;
|
|
|
+ private bool m_PMDIsInstalled;
|
|
|
+ private bool m_LLAIsInstalled;
|
|
|
+ private bool m_LLBIsInstalled;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -465,7 +478,36 @@ namespace Venus_MainPages.ViewModels
|
|
|
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); }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 命令
|
|
@@ -516,11 +558,20 @@ namespace Venus_MainPages.ViewModels
|
|
|
public DelegateCommand AbortCommand =>
|
|
|
_AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
|
|
|
|
|
|
+
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 构造函数
|
|
|
public TMViewModel()
|
|
|
{
|
|
|
+ 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");
|
|
|
|
|
|
addDataKeys();
|
|
|
|
|
@@ -535,19 +586,56 @@ namespace Venus_MainPages.ViewModels
|
|
|
RetractSoltItemsSource.Add(1);
|
|
|
//Robot1TAction = WaferRobotTAction.PMA;
|
|
|
//Robot2TAction = WaferRobotTAction.PMD;
|
|
|
+ VenusGlobalEvents.SlotRightClickChangedEvent += Instance_SlotRightClickChangedEvent;
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private void Instance_SlotRightClickChangedEvent(OpenSEMI.Ctrlib.Controls.Slot slot)
|
|
|
+ {
|
|
|
+ if (slot!=null)
|
|
|
+ {
|
|
|
+ ContextMenu cm = ContextMenuManager.Instance.GetSlotMenus(slot);
|
|
|
+ if (cm != null)
|
|
|
+ {
|
|
|
+ slot.ContextMenu = cm;
|
|
|
+ }
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void Timer_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
- LLAModuleInfo = ModuleManager.ModuleInfos["LLA"];
|
|
|
- LLBModuleInfo = ModuleManager.ModuleInfos["LLB"];
|
|
|
+ if (LLAIsInstalled == true)
|
|
|
+ {
|
|
|
+ LLAModuleInfo = ModuleManager.ModuleInfos["LLA"];
|
|
|
+ }
|
|
|
+ if (LLBIsInstalled == true)
|
|
|
+ {
|
|
|
+ LLBModuleInfo = ModuleManager.ModuleInfos["LLB"];
|
|
|
+ }
|
|
|
|
|
|
//LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers[0];
|
|
|
//LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers[3];
|
|
|
+ if (PMAIsInstalled == true)
|
|
|
+ {
|
|
|
+ PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
|
|
|
+ }
|
|
|
+ if (PMBIsInstalled == true)
|
|
|
+ {
|
|
|
+ PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
|
|
|
+ }
|
|
|
+ if (PMCIsInstalled == true)
|
|
|
+ {
|
|
|
+ PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
|
|
|
+ }
|
|
|
+ if (PMDIsInstalled == true)
|
|
|
+ {
|
|
|
+ PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
|
|
|
BladeAWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0];
|
|
|
BladeBWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1];
|
|
|
|
|
@@ -708,33 +796,37 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
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, 0, 0, selectedHand);
|
|
|
+ moveItems.Enqueue(moveItem);
|
|
|
if ((int)PickSelectedModule > 3)
|
|
|
- {
|
|
|
- InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPick}", moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
|
|
|
-
|
|
|
+ {
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPick}", moveItems);
|
|
|
}
|
|
|
else
|
|
|
- {
|
|
|
- InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPick}", moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
|
|
|
-
|
|
|
+ {
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPick}", 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(0,0,moduleName, PickSoltItemsSource[PickSoltSelectedIndex] - 1, selectedHand);
|
|
|
+ moveItems.Enqueue(moveItem);
|
|
|
if ((int)PlaceSelectedModule > 3)
|
|
|
{
|
|
|
- InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPlace}", moduleName, PlaceSoltItemsSource[PlaceSoltSelectedIndex]-1, selectedHand);
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.LLPlace}", moveItems);
|
|
|
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPlace}", moduleName, PlaceSoltItemsSource[PlaceSoltSelectedIndex] - 1, selectedHand);
|
|
|
-
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.PMPlace}", moveItems);
|
|
|
}
|
|
|
}
|
|
|
private void OnHome()
|