diff --git a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs index 31400d7..08c33ff 100644 --- a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs @@ -1401,7 +1401,14 @@ namespace Rs.MotionPlat.Flow case ETipButton.Yes://移动到安全位 logInfo = GetClassName() + $"选择了移动到安全位按钮"; MessageQueue.Instance.Insert(logInfo); - TransitModuleSafePosFlow.Instance.GoSafePostion( EExceptionSafePos.Socket); + if (testedSlots.Select(ts => (ts.Index >= 9 && ts.Index <= 16)).Count() > 0) + { + TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen); + } + else + { + TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket); + } break; default: break; @@ -1992,55 +1999,63 @@ namespace Rs.MotionPlat.Flow bool exit = false; while (!exit) { - //alarmInfo = $"周转盘{slot.Index}号穴位真空吸异常,请选择处理"; - alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.周转吸头放料到周转盘后周转盘真空吸报警), slot.Index); - msgBox = MsgBox.ShowDialog(AlarmConstID.周转吸头放料到周转盘后周转盘真空吸报警, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); - switch (msgBox.Button) + try { - case ETipButton.Retry: - logInfo = GetClassName() + "选择了重试"; - MessageQueue.Instance.Insert(logInfo); - vr = UpCameraScanBarCodeFlow.Instance.ScanSingle(slot.Index, true,true,false); - //vr = UpCameraScanBarCodeFlow.Instance.WaitSingle(); - if(UpCameraScanBarCodeFlow.Instance.CheckResult(vr)) - { - slot.AddProduct(nozzle); - GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.Have); - slot.VacException = false; - nozzle.Clear(); - exit = true; - } - break; - case ETipButton.Skip: - logInfo = GetClassName() + "选择了跳过"; - MessageQueue.Instance.Insert(logInfo); - if(GlobalVar.EnableExceptionHandlingNozzle)//启用大力吸嘴 - { - DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); - WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, slot.Index); - nozzle.Clear(); - VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, slot.Index); - exit = true; - } - else - { - //检测穴位中还是否有料 - if (!UpCameraCheckFlow.Instance.CheckTurnoverTrayHasProduct(null, slot.Index, true).HasProduct) + //alarmInfo = $"周转盘{slot.Index}号穴位真空吸异常,请选择处理"; + alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.周转吸头放料到周转盘后周转盘真空吸报警), slot.Index); + LogHelper.Debug(alarmInfo); + msgBox = MsgBox.ShowDialog(AlarmConstID.周转吸头放料到周转盘后周转盘真空吸报警, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); + switch (msgBox.Button) + { + case ETipButton.Retry: + logInfo = GetClassName() + "选择了重试"; + MessageQueue.Instance.Insert(logInfo); + vr = UpCameraScanBarCodeFlow.Instance.ScanSingle(slot.Index, true, true, false); + //vr = UpCameraScanBarCodeFlow.Instance.WaitSingle(); + if (UpCameraScanBarCodeFlow.Instance.CheckResult(vr)) { + slot.AddProduct(nozzle); + GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.Have); + slot.VacException = false; + nozzle.Clear(); + exit = true; + } + break; + case ETipButton.Skip: + logInfo = GetClassName() + "选择了跳过"; + MessageQueue.Instance.Insert(logInfo); + if (GlobalVar.EnableExceptionHandlingNozzle)//启用大力吸嘴 + { + DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); + WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, slot.Index); nozzle.Clear(); VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, slot.Index); exit = true; } - } - - break; - case ETipButton.Yes: - logInfo = GetClassName() + "选择了移动到安全位"; - MessageQueue.Instance.Insert(logInfo); - DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); - break; - default: - break; + else + { + //检测穴位中还是否有料 + if (!UpCameraCheckFlow.Instance.CheckTurnoverTrayHasProduct(null, slot.Index, true).HasProduct) + { + nozzle.Clear(); + VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, slot.Index); + exit = true; + } + } + + break; + case ETipButton.Yes: + logInfo = GetClassName() + "选择了移动到安全位"; + MessageQueue.Instance.Insert(logInfo); + DischargeModuleGoSafePosFlow.Instance.GoSafePostion(); + break; + default: + break; + } + } + catch (Exception ex) + { + Msg.ShowError(ex.Message); } } } diff --git a/Rs.SkyLine/Flow/SafePosFlow/TransitModuleSafePosFlow.cs b/Rs.SkyLine/Flow/SafePosFlow/TransitModuleSafePosFlow.cs index 73d38e4..5cfd300 100644 --- a/Rs.SkyLine/Flow/SafePosFlow/TransitModuleSafePosFlow.cs +++ b/Rs.SkyLine/Flow/SafePosFlow/TransitModuleSafePosFlow.cs @@ -64,7 +64,7 @@ namespace Rs.MotionPlat.Flow.SafePosFlow case EExceptionSafePos.SocketFrom9ToSixteen: //targetPosX = SysConfigParam.GetValue("TurnoverTakeX"); targetPosX = TrayPointManager.GetExceptiontTrayPoint(2).X; - targetPosY = SysConfigParam.GetValue("PressDumpY"); + targetPosY = SysConfigParam.GetValue("PressY"); break; case EExceptionSafePos.TransitNozzle: targetPosX = GlobalVar.TransitNozzleExceptionSafePosX;