|
|
|
@ -3,7 +3,6 @@ using Rs.Controls;
|
|
|
|
using Rs.Framework;
|
|
|
|
using Rs.Framework;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Entitys.Trays;
|
|
|
|
using Rs.MotionPlat.Entitys.Trays;
|
|
|
|
using Rs.MotionPlat.Flow.RecheckFlow;
|
|
|
|
|
|
|
|
using Rs.MotionPlat.Flow.SafePosFlow;
|
|
|
|
using Rs.MotionPlat.Flow.SafePosFlow;
|
|
|
|
using Rs.MotionPlat.Flow.SubFlow;
|
|
|
|
using Rs.MotionPlat.Flow.SubFlow;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
@ -96,6 +95,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public class TurnoverFlow:BaseFlow
|
|
|
|
public class TurnoverFlow:BaseFlow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
public EFlowStatus FlowStatus { get; set; } = EFlowStatus.Idle;
|
|
|
|
private static TurnoverFlow instance;
|
|
|
|
private static TurnoverFlow instance;
|
|
|
|
public static TurnoverFlow Instance
|
|
|
|
public static TurnoverFlow Instance
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -153,6 +153,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
//{
|
|
|
|
//{
|
|
|
|
// slots.Add(slot.FromIndex + 1);
|
|
|
|
// slots.Add(slot.FromIndex + 1);
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
FlowStatus = EFlowStatus.Running;
|
|
|
|
retakeNum = 0;
|
|
|
|
retakeNum = 0;
|
|
|
|
logInfo = GetClassName()+$"接收到测试工位上料任务";
|
|
|
|
logInfo = GetClassName()+$"接收到测试工位上料任务";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
@ -165,6 +166,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
//{
|
|
|
|
//{
|
|
|
|
// slots.Add(slot.FromIndex + 1);
|
|
|
|
// slots.Add(slot.FromIndex + 1);
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
FlowStatus = EFlowStatus.Running;
|
|
|
|
retakeNum = 0;
|
|
|
|
retakeNum = 0;
|
|
|
|
logInfo = GetClassName() + $"接收到测试工位下料任务";
|
|
|
|
logInfo = GetClassName() + $"接收到测试工位下料任务";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
@ -243,44 +245,61 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ETurnoverFlowStep.取料异常报警:
|
|
|
|
case ETurnoverFlowStep.取料异常报警:
|
|
|
|
|
|
|
|
//查询周转盘中待测穴位中有料的穴位
|
|
|
|
List<TurnoverTraySlot> untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
|
|
|
|
List<TurnoverTraySlot> untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
|
|
|
|
alarmInfo = GetClassName()+$"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位异常";
|
|
|
|
if(untestSlots!=null&&untestSlots.Count>0)
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
|
|
|
|
{
|
|
|
|
MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
bool exit = false;
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
|
|
|
|
while (!exit)
|
|
|
|
switch (msgBox.Button)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位异常";
|
|
|
|
case ETipButton.Retry:
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
|
|
|
|
logInfo = $"选择了重试";
|
|
|
|
MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
|
|
|
|
retakeNum = 0;
|
|
|
|
switch (msgBox.Button)
|
|
|
|
Step = ETurnoverFlowStep.到周转盘取料位上方;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ETipButton.Skip:
|
|
|
|
|
|
|
|
logInfo = $"选择了跳过";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
|
|
|
if(GlobalVar.EnableExceptionHandlingNozzle)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//周转吸头过来取料
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = $"异常处理吸嘴未启用";
|
|
|
|
case ETipButton.Retry:
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
logInfo = $"选择了重试";
|
|
|
|
if (TurnoverTrayLasterRecheckFlow.Instance.Recheck())
|
|
|
|
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();
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion();
|
|
|
|
Step = ETurnoverFlowStep.到测试保压位上方;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case ETipButton.Yes:
|
|
|
|
|
|
|
|
logInfo = $"选择了移动到安全位";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ETurnoverFlowStep.等待运动到周转盘下方取料位1:
|
|
|
|
case ETurnoverFlowStep.等待运动到周转盘下方取料位1:
|
|
|
|
@ -446,13 +465,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
//{
|
|
|
|
//{
|
|
|
|
// GlobalTray.TurnoverTray.ChangeStatus(turnoverInfo.FromIndex + 1, ESlotStatus.NotHave);
|
|
|
|
// 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<TurnoverInfo> testLoadList = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks();
|
|
|
|
//List<TurnoverInfo> testLoadList = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks();
|
|
|
|
@ -467,7 +480,13 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
//MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
|
|
|
|
//MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
|
|
|
|
//MessageQueue.Instance.Insert("通知中控周转载盘产品已取走,可以继续排料");
|
|
|
|
//MessageQueue.Instance.Insert("通知中控周转载盘产品已取走,可以继续排料");
|
|
|
|
#endregion
|
|
|
|
#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.测试位上料丢料检测;
|
|
|
|
Step = ETurnoverFlowStep.测试位上料丢料检测;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
@ -478,39 +497,61 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
loseSlots.Clear();
|
|
|
|
if(TransitNozzleManager.Instance.GetHasProductNozzles().Count>0)
|
|
|
|
//检测是否丢料
|
|
|
|
|
|
|
|
foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case ETipButton.Skip:
|
|
|
|
bool exit = false;
|
|
|
|
MessageQueue.Instance.Insert(GetClassName()+$"点击了跳过按钮");
|
|
|
|
while (!exit)
|
|
|
|
TransitNozzleManager.Instance.GetHasProductNozzles().ForEach((n) => { n.IsHasProduct = false;n.SN = ""; });
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常丢料,请处理";
|
|
|
|
case ETipButton.Yes:
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
MessageQueue.Instance.Insert(GetClassName()+$"点击了移动到安全位按钮");
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion();
|
|
|
|
switch (msgBox.Button)
|
|
|
|
break;
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
case ETipButton.Skip:
|
|
|
|
break;
|
|
|
|
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
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = GetClassName() + $"已运动到测试放料位上方";
|
|
|
|
if (TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count() > 0)
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
{
|
|
|
|
Step = ETurnoverFlowStep.到测试放料位下方1;
|
|
|
|
Step = ETurnoverFlowStep.到周转盘取料位上方;
|
|
|
|
|
|
|
|
retakeNum++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Step = ETurnoverFlowStep.到测试保压位上方;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -629,13 +670,14 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
if(masticSlots.Count > 0)
|
|
|
|
if(masticSlots.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//粘料报警
|
|
|
|
//粘料报警
|
|
|
|
alarmInfo = $"周转{loseSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理";
|
|
|
|
alarmInfo = $"周转吸头{masticSlots.ToJoinString()}号吸嘴真空异常粘料,请手工处理";
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
|
|
|
|
switch (msgBox.Button)
|
|
|
|
switch (msgBox.Button)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case ETipButton.Skip:
|
|
|
|
case ETipButton.Skip:
|
|
|
|
MessageQueue.Instance.Insert(GetClassName() + $"点击了跳过按钮");
|
|
|
|
logInfo = GetClassName() + $"点击了跳过按钮";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
foreach (int nozzleIndex in masticSlots)
|
|
|
|
foreach (int nozzleIndex in masticSlots)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TransitNozzle nozzle = TransitNozzleManager.Instance.Nozzle(nozzleIndex);
|
|
|
|
TransitNozzle nozzle = TransitNozzleManager.Instance.Nozzle(nozzleIndex);
|
|
|
|
@ -668,38 +710,55 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle);
|
|
|
|
nozzle.Clear();
|
|
|
|
nozzle.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (TurnoverTrayManager.Instance.GetSlots( ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have).Count() > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Step = ETurnoverFlowStep.到周转盘取料位上方;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//在这里通知中控
|
|
|
|
bool exit = false;
|
|
|
|
Step = ETurnoverFlowStep.到测试保压位上方;
|
|
|
|
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
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//string msg = string.Join(",", ngList.ToArray());
|
|
|
|
Step = ETurnoverFlowStep.到测试保压位上方;
|
|
|
|
//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} 真空异常,请处理后点击确定");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -785,7 +844,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
List<TestTraySlot> willTestSlot = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
|
|
|
|
List<TestTraySlot> willTestSlot = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, willTestSlot.Select(s => s.Index).ToArray());
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, willTestSlot.Select(s => s.Index).ToArray());
|
|
|
|
loadOk = true;
|
|
|
|
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() + "通知中控测试位就绪,可以开始测试";
|
|
|
|
logInfo = GetClassName() + "通知中控测试位就绪,可以开始测试";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//Thread.Sleep(1000 * 30);
|
|
|
|
//Thread.Sleep(1000 * 30);
|
|
|
|
@ -1052,7 +1111,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
Step = ETurnoverFlowStep.到周转盘放料位上方;
|
|
|
|
Step = ETurnoverFlowStep.到周转盘放料位上方;
|
|
|
|
if(TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have).Count==0)
|
|
|
|
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";
|
|
|
|
logInfo = GetClassName() + "通知中控产品全部已从治具中取出,状态变成NotReady";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|