|
@@ -169,14 +169,16 @@ namespace Venus_MainPages.ViewModels
|
|
|
int arm1oldWaferStatus = 100;
|
|
|
int arm2oldWaferStatus = 100;
|
|
|
|
|
|
- private async void RobotMoveInfoChanged(RobotMoveInfo oldValue,RobotMoveInfo newValue)
|
|
|
+ private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
|
|
|
{
|
|
|
- if (oldValue == null ||newValue==null)
|
|
|
+ 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))
|
|
|
+
|
|
|
+ #region Rotating
|
|
|
+ if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && (newValue.Action == RobotAction.Rotating))
|
|
|
{
|
|
|
var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
|
|
|
if (TMRobotMoveActionBladeTarget != null)
|
|
@@ -190,37 +192,19 @@ namespace Venus_MainPages.ViewModels
|
|
|
var values = RobotTarget.Split('.');
|
|
|
var arm = values[0];
|
|
|
var module = values[1];
|
|
|
-
|
|
|
if (arm == "ArmA")
|
|
|
{
|
|
|
Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
- await Task.Delay(600);
|
|
|
- Robot1XAction = WaferRobotXAction.Extend;
|
|
|
- //await Task.Delay(3000);
|
|
|
- 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 = WaferRobotXAction.Retract;
|
|
|
}
|
|
|
else if (arm == "ArmB")
|
|
|
{
|
|
|
Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
- await Task.Delay(600);
|
|
|
- Robot2XAction = WaferRobotXAction.Extend;
|
|
|
- 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);
|
|
|
- }
|
|
|
- //await Task.Delay(3000);
|
|
|
- Robot2XAction = WaferRobotXAction.Retract;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
- #region pick 和 place pm
|
|
|
- if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
|
|
|
+ #region pick 和 place LL
|
|
|
+ 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)
|
|
@@ -234,21 +218,57 @@ namespace Venus_MainPages.ViewModels
|
|
|
var values = RobotTarget.Split('.');
|
|
|
var arm = values[0];
|
|
|
var module = values[1];
|
|
|
+
|
|
|
if (arm == "ArmA")
|
|
|
{
|
|
|
- Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
- await Task.Delay(1500);
|
|
|
+ var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ if (waferRobotTAction != Robot1TAction)
|
|
|
+ {
|
|
|
+ Robot1TAction = waferRobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //await Task.Delay(100);
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+
|
|
|
+ //Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ //await Task.Delay(600);
|
|
|
Robot1XAction = WaferRobotXAction.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 = WaferRobotXAction.Retract;
|
|
|
}
|
|
|
else if (arm == "ArmB")
|
|
|
{
|
|
|
- Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
- await Task.Delay(1500);
|
|
|
+ var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ if (waferRobotTAction != Robot2TAction)
|
|
|
+ {
|
|
|
+ Robot2TAction = waferRobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //await Task.Delay(100);
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+
|
|
|
+ //Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ //await Task.Delay(600);
|
|
|
Robot2XAction = WaferRobotXAction.Extend;
|
|
|
+ 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 = WaferRobotXAction.Retract;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region pick 和 place pm
|
|
|
+ else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Extending)
|
|
|
{
|
|
|
var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
|
|
|
if (TMRobotMoveActionBladeTarget != null)
|
|
@@ -261,20 +281,39 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
var values = RobotTarget.Split('.');
|
|
|
var arm = values[0];
|
|
|
+ var module = values[1];
|
|
|
if (arm == "ArmA")
|
|
|
{
|
|
|
- Robot1XAction = WaferRobotXAction.Retract;
|
|
|
+ var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ if (waferRobotTAction != Robot1TAction)
|
|
|
+ {
|
|
|
+ Robot1TAction = waferRobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // await Task.Delay(100);
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
+
|
|
|
+ Robot1XAction = WaferRobotXAction.Extend;
|
|
|
}
|
|
|
else if (arm == "ArmB")
|
|
|
{
|
|
|
- Robot2XAction = WaferRobotXAction.Retract;
|
|
|
- }
|
|
|
+ var waferRobotTAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ if (waferRobotTAction != Robot2TAction)
|
|
|
+ {
|
|
|
+ Robot2TAction = waferRobotTAction;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // await Task.Delay(100);
|
|
|
+ }
|
|
|
+ await Task.Delay(600);
|
|
|
|
|
|
+ Robot2XAction = WaferRobotXAction.Extend;
|
|
|
+ }
|
|
|
}
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region Rotating
|
|
|
- if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Rotating))
|
|
|
+ else if ((oldValue.Action == RobotAction.None || oldValue.ArmTarget != newValue.ArmTarget) && newValue.Action == RobotAction.Retracting)
|
|
|
{
|
|
|
var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
|
|
|
if (TMRobotMoveActionBladeTarget != null)
|
|
@@ -287,19 +326,18 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
var values = RobotTarget.Split('.');
|
|
|
var arm = values[0];
|
|
|
- var module = values[1];
|
|
|
if (arm == "ArmA")
|
|
|
{
|
|
|
- Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ Robot1XAction = WaferRobotXAction.Retract;
|
|
|
}
|
|
|
else if (arm == "ArmB")
|
|
|
{
|
|
|
- Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
|
|
|
+ Robot2XAction = WaferRobotXAction.Retract;
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
- arm1oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus;
|
|
|
- arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
private async void RobotActiont(string oldValue,string newValue)
|
|
|
{
|