|
@@ -12,10 +12,12 @@ using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Threading;
|
|
|
+using Venus_Core;
|
|
|
using Venus_MainPages.Unity;
|
|
|
using Venus_MainPages.Views;
|
|
|
using Venus_Themes.CustomControls;
|
|
|
using Venus_Themes.Unity;
|
|
|
+using static Venus_Themes.UserControls.EFEM;
|
|
|
|
|
|
namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
@@ -73,10 +75,20 @@ namespace Venus_MainPages.ViewModels
|
|
|
private int m_CycledWafer;
|
|
|
private int m_CycleCountDisplay;
|
|
|
|
|
|
+ private RobotPosition m_CurrentRobotPosition;
|
|
|
+
|
|
|
+ private WaferInfo m_BladeAWafer;
|
|
|
+ private WaferInfo m_BladeBWafer;
|
|
|
+
|
|
|
+ private RecipeResult m_PMARecipeResult;
|
|
|
+ private RecipeResult m_PMBRecipeResult;
|
|
|
+ private RecipeResult m_PMCRecipeResult;
|
|
|
+ private RecipeResult m_PMDRecipeResult;
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
|
+
|
|
|
public bool TabIsChecked
|
|
|
{
|
|
|
get { return m_TabIsChecked; }
|
|
@@ -311,6 +323,51 @@ namespace Venus_MainPages.ViewModels
|
|
|
get { return m_CycleCountDisplay; }
|
|
|
set { SetProperty(ref m_CycleCountDisplay, value); }
|
|
|
}
|
|
|
+ public RobotMoveInfo m_EfemRobotMoveInfo;
|
|
|
+ public RobotMoveInfo EfemRobotMoveInfo
|
|
|
+ {
|
|
|
+ get { return m_EfemRobotMoveInfo; }
|
|
|
+ set
|
|
|
+ {
|
|
|
+ EFEMRobotMoveInfoChanged(m_EfemRobotMoveInfo, value);
|
|
|
+ m_EfemRobotMoveInfo = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public RobotPosition CurrentRobotPosition
|
|
|
+ {
|
|
|
+ get { return m_CurrentRobotPosition; }
|
|
|
+ set { SetProperty(ref m_CurrentRobotPosition, value); }
|
|
|
+ }
|
|
|
+ public WaferInfo BladeAWafer
|
|
|
+ {
|
|
|
+ get { return m_BladeAWafer; }
|
|
|
+ set { SetProperty(ref m_BladeAWafer, value); }
|
|
|
+ }
|
|
|
+ public WaferInfo BladeBWafer
|
|
|
+ {
|
|
|
+ get { return m_BladeBWafer; }
|
|
|
+ set { SetProperty(ref m_BladeBWafer, value); }
|
|
|
+ }
|
|
|
+ public RecipeResult PMARecipeResult
|
|
|
+ {
|
|
|
+ get { return m_PMARecipeResult; }
|
|
|
+ set { SetProperty(ref m_PMARecipeResult, value); }
|
|
|
+ }
|
|
|
+ public RecipeResult PMBRecipeResult
|
|
|
+ {
|
|
|
+ get { return m_PMBRecipeResult; }
|
|
|
+ set { SetProperty(ref m_PMBRecipeResult, value); }
|
|
|
+ }
|
|
|
+ public RecipeResult PMCRecipeResult
|
|
|
+ {
|
|
|
+ get { return m_PMCRecipeResult; }
|
|
|
+ set { SetProperty(ref m_PMCRecipeResult, value); }
|
|
|
+ }
|
|
|
+ public RecipeResult PMDRecipeResult
|
|
|
+ {
|
|
|
+ get { return m_PMDRecipeResult; }
|
|
|
+ set { SetProperty(ref m_PMDRecipeResult, value); }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 命令
|
|
@@ -553,6 +610,10 @@ namespace Venus_MainPages.ViewModels
|
|
|
LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];
|
|
|
EFEMModuleInfo = ModuleManager.ModuleInfos["EfemRobot"];
|
|
|
TMModuleInfo = ModuleManager.ModuleInfos["TMRobot"];
|
|
|
+ BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
|
|
|
+ BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
|
|
|
+
|
|
|
+ RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
|
|
|
|
|
|
if (LLAIsInstalled == true)
|
|
|
{
|
|
@@ -567,18 +628,25 @@ namespace Venus_MainPages.ViewModels
|
|
|
if (PMAIsInstalled == true)
|
|
|
{
|
|
|
PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
|
|
|
+ PMARecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMA.CurrentRecipeResult");
|
|
|
}
|
|
|
if (PMBIsInstalled == true)
|
|
|
{
|
|
|
PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
|
|
|
+ PMBRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMB.CurrentRecipeResult");
|
|
|
+
|
|
|
}
|
|
|
if (PMCIsInstalled == true)
|
|
|
{
|
|
|
PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
|
|
|
+ PMCRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMC.CurrentRecipeResult");
|
|
|
+
|
|
|
}
|
|
|
if (PMDIsInstalled == true)
|
|
|
{
|
|
|
PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
|
|
|
+ PMDRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMD.CurrentRecipeResult");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (TMIsInstalled == true)
|
|
@@ -594,8 +662,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
|
|
|
RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
|
|
|
-
|
|
|
- RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
|
|
|
+ EfemRobotMoveInfo=(RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
|
|
|
LP1WaferCount = LP1ModuleInfo.WaferManager.Wafers.Where(x=>x.WaferStatus!=0).Count();
|
|
|
LP2WaferCount = LP2ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
|
|
|
LP3WaferCount = LP3ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
|
|
@@ -701,7 +768,121 @@ namespace Venus_MainPages.ViewModels
|
|
|
arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
|
|
|
|
|
|
}
|
|
|
+ private async void EFEMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
|
|
|
+ {
|
|
|
+ string RobotTarget;
|
|
|
+ if (oldValue == null || newValue == null)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ #region pick 和 place LL
|
|
|
+ if (oldValue.Action == RobotAction.None && (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")
|
|
|
+ {
|
|
|
+ Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ await Task.Delay(1500);
|
|
|
+
|
|
|
+ //ChangePosition(Robot3TAction);
|
|
|
+ // await Task.Delay(2000);
|
|
|
+
|
|
|
+ Robot3XAction = WaferRobotXAction.Extend;
|
|
|
+ await Task.Delay(3000);
|
|
|
+ Robot3XAction = WaferRobotXAction.Retract;
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ await Task.Delay(1500);
|
|
|
+ //ChangePosition(Robot4TAction);
|
|
|
+ //await Task.Delay(2000);
|
|
|
+ Robot4XAction = WaferRobotXAction.Extend;
|
|
|
+ await Task.Delay(3000);
|
|
|
+ Robot4XAction = WaferRobotXAction.Retract;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
|
|
|
+ #region pick 和 place pm
|
|
|
+ if (oldValue.Action == RobotAction.None && 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")
|
|
|
+ {
|
|
|
+ Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ await Task.Delay(1500);
|
|
|
+ //ChangePosition(Robot3TAction);
|
|
|
+ //await Task.Delay(2000);
|
|
|
+ Robot3XAction = WaferRobotXAction.Extend;
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ await Task.Delay(1500);
|
|
|
+ //ChangePosition(Robot4TAction);
|
|
|
+ //await Task.Delay(2000);
|
|
|
+ Robot4XAction = WaferRobotXAction.Extend;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (oldValue.Action == RobotAction.None && 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")
|
|
|
+ {
|
|
|
+
|
|
|
+ Robot3XAction = WaferRobotXAction.Retract;
|
|
|
+ await Task.Delay(3000);
|
|
|
+ //ChangePosition(Robot3TAction);
|
|
|
+ //await Task.Delay(2000);
|
|
|
+ }
|
|
|
+ else if (arm == "ArmB")
|
|
|
+ {
|
|
|
+ Robot4XAction = WaferRobotXAction.Retract;
|
|
|
+ await Task.Delay(3000);
|
|
|
+ //ChangePosition(Robot3TAction);
|
|
|
+ //await Task.Delay(2000);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ }
|
|
|
private void addDataKeys()
|
|
|
{
|
|
|
m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
|
|
@@ -717,6 +898,25 @@ namespace Venus_MainPages.ViewModels
|
|
|
|
|
|
m_RtDataKeys.Add("Scheduler.CycledCount");
|
|
|
m_RtDataKeys.Add("Scheduler.CycledWafer");
|
|
|
+ m_RtDataKeys.Add("Scheduler.CycleSetPoint");
|
|
|
+
|
|
|
+ m_RtDataKeys.Add("LP1.IsLoaded");
|
|
|
+ m_RtDataKeys.Add("LP2.IsLoaded");
|
|
|
+ m_RtDataKeys.Add("LP3.IsLoaded");
|
|
|
+
|
|
|
+ m_RtDataKeys.Add("LP1.CassettePlaced");
|
|
|
+ m_RtDataKeys.Add("LP2.CassettePlaced");
|
|
|
+ m_RtDataKeys.Add("LP3.CassettePlaced");
|
|
|
+
|
|
|
+ m_RtDataKeys.Add("PMA.CurrentRecipeResult");
|
|
|
+ m_RtDataKeys.Add("PMB.CurrentRecipeResult");
|
|
|
+ m_RtDataKeys.Add("PMC.CurrentRecipeResult");
|
|
|
+ m_RtDataKeys.Add("PMD.CurrentRecipeResult");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -785,6 +985,21 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
|
|
|
}
|
|
|
+
|
|
|
+ private async void ChangePosition(WaferRobotTAction waferRobotTAction)
|
|
|
+ {
|
|
|
+ CurrentRobotPosition = RobotPosition.Origin;
|
|
|
+ await Task.Delay(1000);
|
|
|
+ if (waferRobotTAction == WaferRobotTAction.LP1)
|
|
|
+ {
|
|
|
+
|
|
|
+ CurrentRobotPosition = RobotPosition.Left;
|
|
|
+ }
|
|
|
+ else if (Robot3TAction == WaferRobotTAction.LP3)
|
|
|
+ {
|
|
|
+ CurrentRobotPosition = RobotPosition.Right;
|
|
|
+ }
|
|
|
+ }
|
|
|
#endregion
|
|
|
}
|
|
|
}
|