diff --git a/Rs.SkyLine/Commom/Enums.cs b/Rs.SkyLine/Commom/Enums.cs
index 3e13da2..e49daa9 100644
--- a/Rs.SkyLine/Commom/Enums.cs
+++ b/Rs.SkyLine/Commom/Enums.cs
@@ -6,10 +6,18 @@ using System.Threading.Tasks;
namespace Rs.MotionPlat.Commom
{
+
+ public enum EFlowStatus
+ {
+ Running,
+ Idle
+ }
+
+
///
/// 料盘类型
///
- public enum ETrayType
+ public enum ETrayType
{
Empty1=1,
Input,
diff --git a/Rs.SkyLine/Commom/Scheduling.cs b/Rs.SkyLine/Commom/Scheduling.cs
index 760fb2e..4c3817f 100644
--- a/Rs.SkyLine/Commom/Scheduling.cs
+++ b/Rs.SkyLine/Commom/Scheduling.cs
@@ -692,7 +692,13 @@ namespace Rs.MotionPlat.Commom
}
}
-
+ public struct TesterInfo
+ {
+ public ETesterState State { get; set; }
+
+ public HashSet ReadySites { get; set; }
+ }
+
///
/// 排料消息
diff --git a/Rs.SkyLine/Flow/MachineManage.cs b/Rs.SkyLine/Flow/MachineManage.cs
index 11cc62c..5599f3d 100644
--- a/Rs.SkyLine/Flow/MachineManage.cs
+++ b/Rs.SkyLine/Flow/MachineManage.cs
@@ -89,7 +89,7 @@ namespace Rs.MotionPlat.Flow
///
/// 测试机状态
///
- private ETesterState testerState = ETesterState.NotReady;
+ private TesterInfo testerInfo;
///
/// 物料分配模式(正常或空跑)
@@ -107,13 +107,13 @@ namespace Rs.MotionPlat.Flow
RunStatus= status;
}
- public void SetTesterState(ETesterState _testerState)
+ public void SetTesterState(TesterInfo _testerInfo)
{
- testerState= _testerState;
+ testerInfo = _testerInfo;
}
- public ETesterState GetTesterState() {
- return testerState;
+ public TesterInfo GetTesterInfo() {
+ return testerInfo;
}
///
diff --git a/Rs.SkyLine/Flow/NgFlow/LoadUnloadTurnoverTrayDumpNgFlow.cs b/Rs.SkyLine/Flow/NgFlow/LoadUnloadTurnoverTrayDumpNgFlow.cs
index c98b1af..2ac3117 100644
--- a/Rs.SkyLine/Flow/NgFlow/LoadUnloadTurnoverTrayDumpNgFlow.cs
+++ b/Rs.SkyLine/Flow/NgFlow/LoadUnloadTurnoverTrayDumpNgFlow.cs
@@ -1,4 +1,5 @@
-using System;
+using Rs.MotionPlat.Commom;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
diff --git a/Rs.SkyLine/Flow/NgFlow/StockTrayTakeNgFlow.cs b/Rs.SkyLine/Flow/NgFlow/StockTrayTakeNgFlow.cs
index e662c47..2875ed5 100644
--- a/Rs.SkyLine/Flow/NgFlow/StockTrayTakeNgFlow.cs
+++ b/Rs.SkyLine/Flow/NgFlow/StockTrayTakeNgFlow.cs
@@ -1,4 +1,5 @@
-using System;
+using Rs.MotionPlat.Commom;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -23,11 +24,7 @@ namespace Rs.MotionPlat.Flow
等待视觉结果
}
- public enum EFlowStatus
- {
- Running,
- Idle
- }
+
public class StockTrayTakeNgFlow:BaseFlow
{
private StockTrayTakeNgFlow() { }
diff --git a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs
index 28c3037..6919b2e 100644
--- a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs
+++ b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs
@@ -3,7 +3,6 @@ using Rs.Controls;
using Rs.Framework;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys.Trays;
-using Rs.MotionPlat.Flow.RecheckFlow;
using Rs.MotionPlat.Flow.SafePosFlow;
using Rs.MotionPlat.Flow.SubFlow;
using System;
@@ -96,6 +95,7 @@ namespace Rs.MotionPlat.Flow
///
public class TurnoverFlow:BaseFlow
{
+ public EFlowStatus FlowStatus { get; set; } = EFlowStatus.Idle;
private static TurnoverFlow instance;
public static TurnoverFlow Instance
{
@@ -153,6 +153,7 @@ namespace Rs.MotionPlat.Flow
//{
// slots.Add(slot.FromIndex + 1);
//}
+ FlowStatus = EFlowStatus.Running;
retakeNum = 0;
logInfo = GetClassName()+$"接收到测试工位上料任务";
MessageQueue.Instance.Insert(logInfo);
@@ -165,6 +166,7 @@ namespace Rs.MotionPlat.Flow
//{
// slots.Add(slot.FromIndex + 1);
//}
+ FlowStatus = EFlowStatus.Running;
retakeNum = 0;
logInfo = GetClassName() + $"接收到测试工位下料任务";
MessageQueue.Instance.Insert(logInfo);
@@ -243,44 +245,61 @@ namespace Rs.MotionPlat.Flow
}
break;
case ETurnoverFlowStep.取料异常报警:
+ //查询周转盘中待测穴位中有料的穴位
List untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
- alarmInfo = GetClassName()+$"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位异常";
- TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
- MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
- msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
- switch (msgBox.Button)
- {
- case ETipButton.Retry:
- logInfo = $"选择了重试";
- MessageQueue.Instance.Insert(logInfo);
- retakeNum = 0;
- Step = ETurnoverFlowStep.到周转盘取料位上方;
- break;
- case ETipButton.Skip:
- logInfo = $"选择了跳过";
- MessageQueue.Instance.Insert(logInfo);
- if(GlobalVar.EnableExceptionHandlingNozzle)
- {
- //周转吸头过来取料
- }
- else
+ if(untestSlots!=null&&untestSlots.Count>0)
+ {
+ bool exit = false;
+ while (!exit)
+ {
+ alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位异常";
+ TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
+ MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
+ msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
+ switch (msgBox.Button)
{
- logInfo = $"异常处理吸嘴未启用";
- MessageQueue.Instance.Insert(logInfo);
- if (TurnoverTrayLasterRecheckFlow.Instance.Recheck())
- {
+ case ETipButton.Retry:
+ logInfo = $"选择了重试";
+ MessageQueue.Instance.Insert(logInfo);
+ retakeNum = 0;
+ exit = true;
+ Step = ETurnoverFlowStep.到周转盘取料位上方;
+ break;
+ case ETipButton.Skip:
+ logInfo = $"选择了跳过";
+ MessageQueue.Instance.Insert(logInfo);
+ if (GlobalVar.EnableExceptionHandlingNozzle)
+ {
+ //周转吸头过来取料
+ }
+ else
+ {
+ untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
+ foreach (TurnoverTraySlot slot in untestSlots)
+ {
+ if (!LaserFlow.Instance.HasProduct(ETrayType.Turnover, slot.Index))
+ {
+ slot.ClearProduct();
+ GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
+ }
+ }
+ untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
+ if (untestSlots == null || untestSlots.Count == 0)
+ {
+ exit = true;
+ Step = ETurnoverFlowStep.到测试放料位上方;
+ }
+ }
+ break;
+ case ETipButton.Yes:
+ logInfo = $"选择了移动到安全位";
+ MessageQueue.Instance.Insert(logInfo);
TransitModuleSafePosFlow.Instance.GoSafePostion();
- Step = ETurnoverFlowStep.到测试保压位上方;
- }
+ break;
+ default:
+ break;
}
- break;
- case ETipButton.Yes:
- logInfo = $"选择了移动到安全位";
- MessageQueue.Instance.Insert(logInfo);
- TransitModuleSafePosFlow.Instance.GoSafePostion();
- break;
- default:
- break;
+ }
}
break;
case ETurnoverFlowStep.等待运动到周转盘下方取料位1:
@@ -446,13 +465,7 @@ namespace Rs.MotionPlat.Flow
//{
// GlobalTray.TurnoverTray.ChangeStatus(turnoverInfo.FromIndex + 1, ESlotStatus.NotHave);
//}
- if(TurnoverTrayManager.Instance.GetSlots( ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count()==0)
- {
- TestCenter.Instance.Send(LoadAndUnloadTask.Instance.GetTestLoadString());
- LoadAndUnloadTask.Instance.Clear(1);
- MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
- MessageQueue.Instance.Insert("通知中控周转载盘产品已取走,可以继续排料");
- }
+
//List testLoadList = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks();
@@ -467,7 +480,13 @@ namespace Rs.MotionPlat.Flow
//MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
//MessageQueue.Instance.Insert("通知中控周转载盘产品已取走,可以继续排料");
#endregion
-
+ if (TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count() == 0)
+ {
+ TestCenter.Instance.Send(LoadAndUnloadTask.Instance.GetTestLoadString());
+ LoadAndUnloadTask.Instance.Clear(1);
+ MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
+ MessageQueue.Instance.Insert("通知中控周转载盘产品已取走,可以继续排料");
+ }
Step = ETurnoverFlowStep.测试位上料丢料检测;
}
break;
@@ -478,39 +497,61 @@ namespace Rs.MotionPlat.Flow
}
else
{
- loseSlots.Clear();
- //检测是否丢料
- foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
+ if(TransitNozzleManager.Instance.GetHasProductNozzles().Count>0)
{
- if (!nozzle.HasVacSignal())
+ loseSlots.Clear();
+ //检测是否丢料
+ foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
{
- loseSlots.Add(nozzle.NozzleIndex);
+ if (!nozzle.HasVacSignal())
+ {
+ loseSlots.Add(nozzle.NozzleIndex);
+ }
}
- }
- if (loseSlots.Count > 0)
- {
- alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理";
- TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
- msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
- switch (msgBox.Button)
+ if (loseSlots.Count > 0)
{
- case ETipButton.Skip:
- MessageQueue.Instance.Insert(GetClassName()+$"点击了跳过按钮");
- TransitNozzleManager.Instance.GetHasProductNozzles().ForEach((n) => { n.IsHasProduct = false;n.SN = ""; });
- break;
- case ETipButton.Yes:
- MessageQueue.Instance.Insert(GetClassName()+$"点击了移动到安全位按钮");
- TransitModuleSafePosFlow.Instance.GoSafePostion();
- break;
- default:
- break;
+ bool exit = false;
+ while (!exit)
+ {
+ alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理";
+ TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
+ msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
+ switch (msgBox.Button)
+ {
+ case ETipButton.Skip:
+ logInfo = GetClassName() + $"点击了跳过按钮";
+ MessageQueue.Instance.Insert(logInfo);
+ exit = true;
+ TransitNozzleManager.Instance.GetHasProductNozzles().ForEach((n) => { n.IsHasProduct = false; n.SN = ""; });
+ break;
+ case ETipButton.Yes:
+ logInfo = GetClassName() + $"点击了移动到安全位按钮";
+ MessageQueue.Instance.Insert(logInfo);
+ TransitModuleSafePosFlow.Instance.GoSafePostion();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ logInfo = GetClassName() + $"已运动到测试放料位上方";
+ MessageQueue.Instance.Insert(logInfo);
+ Step = ETurnoverFlowStep.到测试放料位下方1;
}
}
else
{
- logInfo = GetClassName() + $"已运动到测试放料位上方";
- MessageQueue.Instance.Insert(logInfo);
- Step = ETurnoverFlowStep.到测试放料位下方1;
+ if (TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count() > 0)
+ {
+ Step = ETurnoverFlowStep.到周转盘取料位上方;
+ retakeNum++;
+ }
+ else
+ {
+ Step = ETurnoverFlowStep.到测试保压位上方;
+ }
}
}
@@ -629,13 +670,14 @@ namespace Rs.MotionPlat.Flow
if(masticSlots.Count > 0)
{
//粘料报警
- alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理";
+ alarmInfo = $"周转吸头{masticSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理";
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
switch (msgBox.Button)
{
case ETipButton.Skip:
- MessageQueue.Instance.Insert(GetClassName() + $"点击了跳过按钮");
+ logInfo = GetClassName() + $"点击了跳过按钮";
+ MessageQueue.Instance.Insert(logInfo);
foreach (int nozzleIndex in masticSlots)
{
TransitNozzle nozzle = TransitNozzleManager.Instance.Nozzle(nozzleIndex);
@@ -668,38 +710,55 @@ namespace Rs.MotionPlat.Flow
}
else
{
- if (GlobalVar.RunSpace || GlobalVar.VirtualAxis)
+ foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
{
- foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
+ if(Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位真空吸检测") || GlobalVar.RunSpace)
{
GlobalTray.TestTray.ChangeStatus(nozzle.NozzleIndex, ESlotStatus.Have);
- //TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle.SN, nozzle.FromIndex, TurnoverType.Turnover, nozzle.NozzleIndex);
TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle);
nozzle.Clear();
-
- }
- if (TurnoverTrayManager.Instance.GetSlots( ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count() > 0)
- {
- Step = ETurnoverFlowStep.到周转盘取料位上方;
}
else
{
- //在这里通知中控
- Step = ETurnoverFlowStep.到测试保压位上方;
+ bool exit = false;
+ while (!exit)
+ {
+ alarmInfo = $"测试治具{nozzle.NozzleIndex}号真空吸异常";
+ TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
+ msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
+ switch (msgBox.Button)
+ {
+ case ETipButton.Retry:
+ if (Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位真空吸检测"))
+ {
+ TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle);
+ exit = true;
+ }
+ break;
+ case ETipButton.Skip:
+ //镭射头过来复检,有产品则继续报警,
+ if(!LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex))
+ {
+ nozzle.Clear();
+ exit = true;
+ }
+ break;
+ case ETipButton.Yes://移动到安全位
+ TransitModuleSafePosFlow.Instance.GoSafePostion();
+ break;
+ }
+ }
+
+
}
}
+ if (TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count() > 0)
+ {
+ Step = ETurnoverFlowStep.到周转盘取料位上方;
+ }
else
{
- //string msg = string.Join(",", ngList.ToArray());
- //logInfo = $"测试 {string.Join(",", ngList.ToArray())} 号穴位放料真空异常,请手动处理完成后点击确定";
- MessageQueue.Instance.Warn(logInfo);
- TestCenterMessageBox.Show(AlarmConstID.TestDumpFailAlarm, logInfo, SchedulingMessageBox.ETipButton.Ok);
- SchedulingMessageBox msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TestDumpFailAlarm);
- if (msgBox.Button == SchedulingMessageBox.ETipButton.Ok)
- {
- Step = ETurnoverFlowStep.到测试保压位上方;
- }
- //Msg.ShowError($"测试穴位 {msg} 真空异常,请处理后点击确定");
+ Step = ETurnoverFlowStep.到测试保压位上方;
}
}
@@ -785,7 +844,7 @@ namespace Rs.MotionPlat.Flow
List willTestSlot = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
VacManager.TestTrayVacSuction(EVacOperator.Close, willTestSlot.Select(s => s.Index).ToArray());
loadOk = true;
- MachineManage.Instance.SetTesterState(ETesterState.Ready);
+ MachineManage.Instance.SetTesterState(new TesterInfo() { State = ETesterState.Ready, ReadySites = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have).Select(s => s.Index).ToHashSet() });
logInfo = GetClassName() + "通知中控测试位就绪,可以开始测试";
MessageQueue.Instance.Insert(logInfo);
//Thread.Sleep(1000 * 30);
@@ -1052,7 +1111,7 @@ namespace Rs.MotionPlat.Flow
Step = ETurnoverFlowStep.到周转盘放料位上方;
if(TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have).Count==0)
{
- MachineManage.Instance.SetTesterState(ETesterState.NotReady);
+ MachineManage.Instance.SetTesterState(new TesterInfo() { State = ETesterState.NotReady, ReadySites = null });
logInfo = GetClassName() + "通知中控产品全部已从治具中取出,状态变成NotReady";
}
diff --git a/Rs.SkyLine/Flow/RecheckFlow/TurnoverTrayLasterRecheckFlow.cs b/Rs.SkyLine/Flow/RecheckFlow/TurnoverTrayLasterRecheckFlow.cs
deleted file mode 100644
index 6c0a3c4..0000000
--- a/Rs.SkyLine/Flow/RecheckFlow/TurnoverTrayLasterRecheckFlow.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using Rs.Framework;
-using Rs.Motion;
-using Rs.MotionPlat.Commom;
-using Rs.MotionPlat.Entitys.Trays;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Rs.MotionPlat.Flow.RecheckFlow
-{
- enum ETurnoverTrayLasterRecheckFlowStep
- {
- 到测高位上方,
- 等待到测高位上方,
- 到测高位,
- 等待到测高位,
- 通知镭射头测高,
- 到安全位,
- 等待到安全位
- }
- ///
- /// 中转盘镭射头复检有无料
- ///
- public class TurnoverTrayLasterRecheckFlow
- {
- private ETurnoverTrayLasterRecheckFlowStep step = ETurnoverTrayLasterRecheckFlowStep.到测高位上方;
- private TurnoverTrayLasterRecheckFlow() { }
- private static TurnoverTrayLasterRecheckFlow instance;
- public static TurnoverTrayLasterRecheckFlow Instance
- {
- get
- {
- if (instance == null)
- instance = new TurnoverTrayLasterRecheckFlow();
- return instance;
- }
- }
- double targetPos = 0.0;
- ErrorCode errCode = ErrorCode.Ok;
- bool checkResult = true;
- string logInfo = string.Empty;
- private bool finished = false;
- ///
- /// 周转盘有无料复检
- ///
- public bool Recheck()
- {
- //获取还有多少个穴位需要复检
- List untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
- foreach (TurnoverTraySlot slot in untestSlots)
- {
- step = ETurnoverTrayLasterRecheckFlowStep.到测高位上方;
- finished = false;
- checkResult= false;
- while (true && !finished)
- {
- switch (step)
- {
- case ETurnoverTrayLasterRecheckFlowStep.到测高位上方:
- logInfo = $"{nameof(TurnoverTrayLasterRecheckFlow)}-到周转盘{slot.Index}号穴位测高位上方";
- MessageQueue.Instance.Insert(logInfo);
- step = ETurnoverTrayLasterRecheckFlowStep.等待到测高位上方;
- break;
- case ETurnoverTrayLasterRecheckFlowStep.等待到测高位上方:
- logInfo = $"{nameof(TurnoverTrayLasterRecheckFlow)}-已运动到周转盘{slot.Index}号穴位测高位上方";
- MessageQueue.Instance.Insert(logInfo);
- step = ETurnoverTrayLasterRecheckFlowStep.到测高位;
- break;
- case ETurnoverTrayLasterRecheckFlowStep.到测高位:
- logInfo = $"{nameof(TurnoverTrayLasterRecheckFlow)}-到周转盘{slot.Index}号穴位测高位";
- MessageQueue.Instance.Insert(logInfo);
- step = ETurnoverTrayLasterRecheckFlowStep.等待到测高位;
- break;
- case ETurnoverTrayLasterRecheckFlowStep.等待到测高位:
- logInfo = $"{nameof(TurnoverTrayLasterRecheckFlow)}-已运动到周转盘{slot.Index}号穴位测高位";
- MessageQueue.Instance.Insert(logInfo);
- step = ETurnoverTrayLasterRecheckFlowStep.通知镭射头测高;
- break;
- case ETurnoverTrayLasterRecheckFlowStep.通知镭射头测高:
- checkResult = true;
- if(checkResult)
- {
- slot.ClearProduct();
- }
- step = ETurnoverTrayLasterRecheckFlowStep.到安全位;
- break;
- case ETurnoverTrayLasterRecheckFlowStep.到安全位:
- logInfo = $"{nameof(TurnoverTrayLasterRecheckFlow)}-测高完成抬起";
- MessageQueue.Instance.Insert(logInfo);
- step = ETurnoverTrayLasterRecheckFlowStep.等待到安全位;
- break;
- case ETurnoverTrayLasterRecheckFlowStep.等待到安全位:
- logInfo = $"{nameof(TurnoverTrayLasterRecheckFlow)}-测高完成已抬起";
- MessageQueue.Instance.Insert(logInfo);
- finished = true;
- break;
- default:
- break;
- }
- }
- }
- return TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count == 0;
- }
- }
-}
diff --git a/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs b/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs
index 327f122..9fbf114 100644
--- a/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs
+++ b/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs
@@ -14,11 +14,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
{
到测高穴位上方,
等待运动到测高穴位上方,
- 到测高位,
- 等待运动到测高位,
- 开始测高,
- 测高完成到安全位,
- 等待测高完成到安全位
+ 开始测高
}
///
/// 镭射头到穴位上方
@@ -79,7 +75,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
{
logInfo = GetClassName() + $"已运动到{trayType}盘{slotIndex}号穴位的上方";
MessageQueue.Instance.Insert(logInfo);
- step = ELaserFlowStep.到测高位;
+ step = ELaserFlowStep.开始测高;
}
else
{
@@ -94,61 +90,15 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
}
break;
- case ELaserFlowStep.到测高位:
- if(Ops.Go(AxisAlias.TurnoverZ,GlobalVar.TurnoverCheckBaseHeight) || GlobalVar.VirtualAxis)
- {
- logInfo = GetClassName() + $"到{trayType}盘{slotIndex}号穴位的测高位";
- MessageQueue.Instance.Insert(logInfo);
- step = ELaserFlowStep.等待运动到测高位;
- }
- break;
- case ELaserFlowStep.等待运动到测高位:
- if (Ops.IsStop(AxisAlias.TurnoverZ) || GlobalVar.VirtualAxis)
- {
- if (Ops.IsArrived(AxisAlias.TurnoverZ) || GlobalVar.VirtualAxis)
- {
- logInfo = GetClassName() + $"已运动到{trayType}盘{slotIndex}号穴位的测高位";
- MessageQueue.Instance.Insert(logInfo);
- step = ELaserFlowStep.开始测高;
- }
- else
- {
- Msg.ShowQuestion($"{AxisAlias.TurnoverZ}轴没有运动到位");
- step = ELaserFlowStep.到测高位;
- }
- }
- break;
+
case ELaserFlowStep.开始测高:
-
double heightVal = DeviceFactory.checkHeightDev.Read();
logInfo = GetClassName() + $"开始测高:{heightVal}";
MessageQueue.Instance.Insert(logInfo);
- step = ELaserFlowStep.测高完成到安全位;
- break;
- case ELaserFlowStep.测高完成到安全位:
- if (Ops.Go(AxisAlias.TurnoverZ, 0) || GlobalVar.VirtualAxis)
- {
- logInfo = GetClassName() + $"测高完成到到{trayType}盘{slotIndex}号穴位的安全位";
- MessageQueue.Instance.Insert(logInfo);
- step = ELaserFlowStep.等待测高完成到安全位;
- }
- break;
- case ELaserFlowStep.等待测高完成到安全位:
- if (Ops.IsStop(AxisAlias.TurnoverZ) || GlobalVar.VirtualAxis)
- {
- if (Ops.IsArrived(AxisAlias.TurnoverZ) || GlobalVar.VirtualAxis)
- {
- logInfo = GetClassName() + $"测高完成已运动到{trayType}盘{slotIndex}号穴位安全位,测高结果:{hasProduct}";
- MessageQueue.Instance.Insert(logInfo);
- finished = true;
- }
- else
- {
- Msg.ShowQuestion($"{AxisAlias.TurnoverZ}轴没有运动到位");
- step = ELaserFlowStep.测高完成到安全位;
- }
- }
+ hasProduct = Math.Abs(heightVal - 0.5) < 0.5;
+ finished = true;
break;
+
}
}
return hasProduct;
diff --git a/Rs.SkyLine/Flow/TestCenter.cs b/Rs.SkyLine/Flow/TestCenter.cs
index bf7ab79..9662007 100644
--- a/Rs.SkyLine/Flow/TestCenter.cs
+++ b/Rs.SkyLine/Flow/TestCenter.cs
@@ -144,7 +144,7 @@ namespace Rs.MotionPlat.Flow
statusInto.Info = EAssignMode.Normal.ToString();
break;
case SchedulingStatusInfo.InfoType.TesterState:
- statusInto.Info = MachineManage.Instance.GetTesterState().ToString();
+ statusInto.Info = JsonConvert.SerializeObject(MachineManage.Instance.GetTesterInfo());//.ToString();
break;
default:
break;
diff --git a/Rs.SkyLine/Rs.SkyLine.csproj b/Rs.SkyLine/Rs.SkyLine.csproj
index eef1943..ed8fdb7 100644
--- a/Rs.SkyLine/Rs.SkyLine.csproj
+++ b/Rs.SkyLine/Rs.SkyLine.csproj
@@ -194,7 +194,6 @@
-