优化周转盘取料失败后等治具不取料就报警的问题

master
lhiven 1 year ago
parent 408e02378f
commit aff4cc5d73

@ -279,6 +279,7 @@ namespace Rs.MotionPlat.Flow
Step = ETurnoverFlowStep.;
break;
case ETipButton.Skip:
retakeNum = 0;
logInfo = GetClassName() + $"选择了跳过";
MessageQueue.Instance.Insert(logInfo);
if (GlobalVar.EnableExceptionHandlingNozzle)
@ -1227,6 +1228,7 @@ namespace Rs.MotionPlat.Flow
//AxisControl.PressZ.IsArrived(out bool isArrived);
if (Ops.IsArrived(AxisAlias.PressZ) || GlobalVar.VirtualAxis)
{
retakeNum = 0;
logInfo = GetClassName() + $"测试完成已抬起到安全位 PressZ at:{Ops.GetCurPosition(AxisAlias.PressZ)}";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
@ -1313,6 +1315,7 @@ namespace Rs.MotionPlat.Flow
}
else
{
LogHelper.Debug($"失败次数已达上限{retakeNum},报警");
// undealTasks = LoadAndUnloadTask.Instance.GetTestToTurnoverTasks(ETaskDealStatus.Undeal);
//TurnoverDumpFlow.Instance.Dump(ETrayType.Test, undealTasks.Select(t => t.FromIndex + 1).ToList());
//TurnoverDumpFlow.Instance.Wait();
@ -1349,6 +1352,7 @@ namespace Rs.MotionPlat.Flow
Step = ETurnoverFlowStep.;
break;
case ETipButton.Skip:
retakeNum = 0;
logInfo = GetClassName() + $"选择了跳过按钮";
MessageQueue.Instance.Insert(logInfo);
testedSlots = testedSlots = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
@ -1940,6 +1944,7 @@ namespace Rs.MotionPlat.Flow
//TurnoverTrayManager.Instance.Slot(nozzle.ToIndex).AddProduct(nozzle.SN, nozzle.NozzleIndex, TurnoverType.Turnover, nozzle.NozzleIndex);
if (slot.HasVac() || GlobalVar.VirtualAxis || GlobalVar.RunSpace)
{
LogHelper.Debug( GetClassName()+ $"周转盘{slot.Index}穴位真空吸正常");
slot.AddProduct(nozzle);
GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.Have);
slot.VacException = false;
@ -1948,14 +1953,18 @@ namespace Rs.MotionPlat.Flow
else
{
//1 退到安全位
LogHelper.Debug(GetClassName()+ $"通知周转模组回到安全位");
TransitModuleSafePosFlow.Instance.GoSafePostion( EExceptionSafePos.Socket);
//2 排料轴上相机过来检测
LogHelper.Debug(GetClassName() + $"等待排料模组IDLE");
DischargeFlow.Instance.WaitCanMove();
LogHelper.Debug(GetClassName() + $"上相机到周转盘{slot.Index}号穴位定位检测");
VisionResult vr = UpCameraScanBarCodeFlow.Instance.ScanSingle(slot.Index, true,true,false);
//VisionResult vr = UpCameraScanBarCodeFlow.Instance.WaitSingle();
needGoSafePos = true;
if (!UpCameraScanBarCodeFlow.Instance.CheckResult(vr))//如果不在穴位中,就弹框报警
{
LogHelper.Debug(GetClassName() + "检测到产品不在穴位中");
bool exit = false;
while (!exit)
{
@ -2013,6 +2022,7 @@ namespace Rs.MotionPlat.Flow
}
else
{
LogHelper.Debug(GetClassName() + "检测到产品在穴位中");
slot.AddProduct(nozzle);
GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.Have);
slot.VacException = false;

Loading…
Cancel
Save