|
|
@ -189,7 +189,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
curSlotPoint = TrayPointManager.GetSlotPoint( ETrayType.Turnover, curTask.FromIndex + 1);
|
|
|
|
curSlotPoint = TrayPointManager.GetSlotPoint( ETrayType.Turnover, curTask.FromIndex + 1);
|
|
|
|
curNozzle.FromIndex = curTask.FromIndex;
|
|
|
|
curNozzle.FromIndex = curTask.FromIndex;
|
|
|
|
logInfo = GetClassName()+ $"排料{curNozzle.NozzleIndex}号吸嘴到周转盘{curNozzle.FromIndex + 1}号穴位取料";
|
|
|
|
logInfo = GetClassName()+ $"排料{curNozzle.NozzleIndex}号吸嘴到{curTask.FromType.ToString()}盘{curNozzle.FromIndex + 1}号穴位取料";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (curTask.FromType == TurnoverType.ToBeTested)
|
|
|
|
else if (curTask.FromType == TurnoverType.ToBeTested)
|
|
|
@ -199,12 +199,12 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
curSlotPoint = TrayPointManager.GetSlotPoint( ETrayType.Input, slot.Index);
|
|
|
|
curSlotPoint = TrayPointManager.GetSlotPoint( ETrayType.Input, slot.Index);
|
|
|
|
curNozzle.FromIndex= slot.Index-1;
|
|
|
|
curNozzle.FromIndex= slot.Index-1;
|
|
|
|
logInfo =GetClassName()+ $"排料{curNozzle.NozzleIndex}号吸嘴到Input盘{curNozzle.FromIndex+1}号穴位取料";
|
|
|
|
logInfo =GetClassName()+ $"排料{curNozzle.NozzleIndex}号吸嘴到{curTask.FromType.ToString()}盘{curNozzle.FromIndex+1}号穴位取料";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = GetClassName()+ $"检测到Input料盘无料,准备切换料盘";
|
|
|
|
logInfo = GetClassName()+ $"{curTask.FromType.ToString()}盘无料,准备切换料盘";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty1,
|
|
|
|
TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty1,
|
|
|
|
() =>
|
|
|
|
() =>
|
|
|
@ -271,7 +271,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = "x y r move isn't safe";
|
|
|
|
logInfo = "x y r move is unsafe";
|
|
|
|
Msg.ShowError(logInfo);
|
|
|
|
Msg.ShowError(logInfo);
|
|
|
|
MessageQueue.Instance.Warn(logInfo);
|
|
|
|
MessageQueue.Instance.Warn(logInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -293,6 +293,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
if (curTask.FromType == TurnoverType.Turnover)
|
|
|
|
if (curTask.FromType == TurnoverType.Turnover)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
targetPos = GetVacOffsetHeight(reFetchNum) + SysConfigParam.GetValue<double>($"TurnoverNozzle{curNozzle.NozzleIndex}TakeHeight");
|
|
|
|
targetPos = GetVacOffsetHeight(reFetchNum) + SysConfigParam.GetValue<double>($"TurnoverNozzle{curNozzle.NozzleIndex}TakeHeight");
|
|
|
|
|
|
|
|
//在周转盘取料,提前把真空吸打开
|
|
|
|
VacManager.DischargeVacSuction(EVacOperator.Open, false, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacSuction(EVacOperator.Open, false, curNozzle.NozzleIndex);
|
|
|
|
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, false, curNozzle.FromIndex + 1);
|
|
|
|
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, false, curNozzle.FromIndex + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -320,8 +321,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = GetClassName()+ $"NozzleZ{curNozzle.NozzleIndex} 不在原点,请手动回原后点击确定";
|
|
|
|
logInfo = GetClassName()+ $"NozzleZ{curNozzle.NozzleIndex} 不在原点,请手动回原后点击确定";
|
|
|
|
MessageQueue.Instance.Warn(logInfo);
|
|
|
|
MessageQueue.Instance.Warn(logInfo);
|
|
|
|
TestCenterMessageBox.Show(1111, logInfo, ETipButton.Ok);
|
|
|
|
MsgBox.ShowDialog(AlarmConstID.AxisNotAtHomeAlarm, logInfo, ETipButton.Ok);
|
|
|
|
TestCenterMessageBox.WaitResult(1111);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
@ -354,7 +354,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
//Ops.On($"周转盘{curTask.FromIndex + 1}号穴位真空破");
|
|
|
|
//Ops.On($"周转盘{curTask.FromIndex + 1}号穴位真空破");
|
|
|
|
//Thread.Sleep(GlobalVar.TurnoverTrayOpenVacBreakDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.TurnoverTrayOpenVacBreakDelaytime);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
VacManager.TurnoverTrayVacBreak( EVacOperator.Open,curNozzle.FromIndex + 1);
|
|
|
|
VacManager.TurnoverTrayVacBreak( EVacOperator.Open,true,curNozzle.FromIndex + 1);
|
|
|
|
/*关闭周转盘真空破*/
|
|
|
|
/*关闭周转盘真空破*/
|
|
|
|
//logInfo = GetClassName() + $"关闭周转盘{curTask.FromIndex + 1}号穴位真空破";
|
|
|
|
//logInfo = GetClassName() + $"关闭周转盘{curTask.FromIndex + 1}号穴位真空破";
|
|
|
|
//Ops.Off($"周转盘{curTask.FromIndex + 1}号穴位真空破");
|
|
|
|
//Ops.Off($"周转盘{curTask.FromIndex + 1}号穴位真空破");
|
|
|
@ -377,7 +377,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
|
|
|
|
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
logInfo = GetClassName()+ $"取{WitchTrayWitchSlot(curNozzle.FromType, curNozzle.FromIndex)}号穴位产品完成准备抬起";
|
|
|
|
logInfo = GetClassName()+ $"取{WitchTrayWitchSlot(curNozzle.FromType, curNozzle.FromIndex)}号穴位产品完成抬起";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
flowStep = EDischargeFlowStep.等待取料完成抬起;
|
|
|
|
flowStep = EDischargeFlowStep.等待取料完成抬起;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -393,7 +393,8 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
if (curTask.FromType == TurnoverType.Turnover)
|
|
|
|
if (curTask.FromType == TurnoverType.Turnover)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
VacManager.TurnoverTrayVacBreak(EVacOperator.Close, curNozzle.FromIndex + 1);
|
|
|
|
///周转盘取料抬起后把真空破关闭,这里关破真空不等待
|
|
|
|
|
|
|
|
VacManager.TurnoverTrayVacBreak(EVacOperator.Close,false, curNozzle.FromIndex + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
flowStep = EDischargeFlowStep.取料完成后真空检测;
|
|
|
|
flowStep = EDischargeFlowStep.取料完成后真空检测;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -408,7 +409,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
undoTaskNum = LoadAndUnloadTask.Instance.GetTaskNum(curTask.taskMode);
|
|
|
|
undoTaskNum = LoadAndUnloadTask.Instance.GetTaskNum(curTask.taskMode);
|
|
|
|
if (undoTaskNum > 0 && NozzleManager.GetNozzlesByStatus(ENozzleStatus.IDLE).Count > 0)
|
|
|
|
if (undoTaskNum > 0 && NozzleManager.GetNozzlesByStatus(ENozzleStatus.IDLE).Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo =GetClassName()+ $"检测到还有{undoTaskNum}条任务未执行,并且有空闲吸嘴,继续取料";
|
|
|
|
logInfo =GetClassName()+ $"还有{undoTaskNum}条任务未执行,并且有空闲吸嘴,继续取料";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
flowStep = EDischargeFlowStep.到取料位上方;
|
|
|
|
flowStep = EDischargeFlowStep.到取料位上方;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -443,9 +444,8 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
buttonText.Add(ETipButton.No, "结束上料|EndInput");
|
|
|
|
buttonText.Add(ETipButton.No, "结束上料|EndInput");
|
|
|
|
btnText |= ETipButton.No;
|
|
|
|
btnText |= ETipButton.No;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//alarmInfo = $"{curNozzle.NozzleIndex}排料吸嘴取料{reFetchNum}次失败";
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.TrayTakeFailAlarm, alarmInfo, btnText, buttonText);
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.TrayTakeFailAlarm, alarmInfo, btnText, buttonText);
|
|
|
|
SchedulingMessageBox box = MsgBox.ShowDialog(AlarmConstID.TrayTakeFailAlarm, alarmInfo, btnText, buttonText);// TestCenterMessageBox.WaitResult(AlarmConstID.TrayTakeFailAlarm);
|
|
|
|
SchedulingMessageBox box = TestCenterMessageBox.WaitResult(AlarmConstID.TrayTakeFailAlarm);
|
|
|
|
|
|
|
|
switch (box.Button)
|
|
|
|
switch (box.Button)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case ETipButton.Retry:
|
|
|
|
case ETipButton.Retry:
|
|
|
@ -580,17 +580,16 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
case EDischargeFlowStep.到下相机拍照起始位:
|
|
|
|
case EDischargeFlowStep.到下相机拍照起始位:
|
|
|
|
if (XYCanMove() || GlobalVar.VirtualAxis)
|
|
|
|
if (XYCanMove() || GlobalVar.VirtualAxis)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload).Count > 0)
|
|
|
|
logInfo = GetClassName() + $"到下相机拍照起始位";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
|
|
|
if(!GlobalVar.VirtualAxis)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ImageProcess.ClearAutoTrigger();
|
|
|
|
|
|
|
|
HikCamera.Instance.SetExposure("locationCamera", GlobalVar.FlyGrabExposureTime);
|
|
|
|
|
|
|
|
HikCamera.Instance.SetGain("locationCamera", GlobalVar.FlyGrabGain);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload).Count>0)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
logInfo = GetClassName() + $"到下相机拍照起始位";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
|
|
|
if(!GlobalVar.VirtualAxis)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ImageProcess.ClearAutoTrigger();
|
|
|
|
|
|
|
|
HikCamera.Instance.SetExposure("locationCamera", GlobalVar.FlyGrabExposureTime);
|
|
|
|
|
|
|
|
HikCamera.Instance.SetGain("locationCamera", GlobalVar.FlyGrabGain);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload)[0].ToType == TurnoverType.Turnover)
|
|
|
|
if (NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload)[0].ToType == TurnoverType.Turnover)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
needGrabNum = NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload).Count();
|
|
|
|
needGrabNum = NozzleManager.GetNozzlesByStatus(ENozzleStatus.ToUnload).Count();
|
|
|
@ -627,6 +626,8 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
logInfo = GetClassName() + $"检测到排料吸嘴没有需要下料的产品,任务结束回安全位";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
flowStep = EDischargeFlowStep.任务结束到安全位;
|
|
|
|
flowStep = EDischargeFlowStep.任务结束到安全位;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -667,7 +668,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//TestCenterMessageBox.Show(1,$"轴LoadX运动异常,ret={errCode}", ETipButton.Ok);
|
|
|
|
MsgBox.ShowAxisAlarmDialog(AxisControl.LoadX, errCode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -811,15 +812,15 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
reGrabCount = 0;
|
|
|
|
reGrabCount = 0;
|
|
|
|
alarmInfo = $"{string.Join(",", errCodeList)}号排料吸嘴拍照失败";
|
|
|
|
alarmInfo = $"{string.Join(",", errCodeList)}号排料吸嘴拍照失败";
|
|
|
|
//DialogResult dr = Msg.ShowQuestion(, System.Windows.Forms.MessageBoxButtons.RetryCancel);
|
|
|
|
//DialogResult dr = Msg.ShowQuestion(, System.Windows.Forms.MessageBoxButtons.RetryCancel);
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);
|
|
|
|
box = TestCenterMessageBox.WaitResult(AlarmConstID.DownCameraFlyFailAlarm);
|
|
|
|
box = MsgBox.ShowDialog(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);// TestCenterMessageBox.WaitResult(AlarmConstID.DownCameraFlyFailAlarm);
|
|
|
|
if (box.Button== ETipButton.Cancel)
|
|
|
|
if (box.Button== ETipButton.Cancel)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flowStep = EDischargeFlowStep.到放料位上方;
|
|
|
|
flowStep = EDischargeFlowStep.到放料位上方;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (box.Button == ETipButton.Retry)
|
|
|
|
else if (box.Button == ETipButton.Retry)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
Thread.Sleep(500);
|
|
|
|
flowStep = EDischargeFlowStep.到下相机拍照起始位;
|
|
|
|
flowStep = EDischargeFlowStep.到下相机拍照起始位;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -959,7 +960,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
curNozzle.ToIndex = downSlot.Index - 1;
|
|
|
|
curNozzle.ToIndex = downSlot.Index - 1;
|
|
|
|
curSlotPoint = TrayPointManager.GetSlotPoint(ETrayType.Multi, downSlot.Index);
|
|
|
|
curSlotPoint = TrayPointManager.GetSlotPoint(ETrayType.Multi, downSlot.Index);
|
|
|
|
logInfo = GetClassName() + $"排料吸嘴{curNozzle.NozzleIndex}号到{curNozzle.ToType}盘{curNozzle.ToIndex + 1}号穴位上方";
|
|
|
|
logInfo = GetClassName() + $"排料吸嘴{curNozzle.NozzleIndex}号到{curNozzle.ToType}盘{curNozzle.ToIndex + 1}号穴位上方,SN={curNozzle.SN}";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -989,7 +990,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
if (curSlotPoint!=null)
|
|
|
|
if (curSlotPoint!=null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nozzleDist = TrayPointManager.GetDistToNozzle1(curNozzle.NozzleIndex);
|
|
|
|
nozzleDist = TrayPointManager.GetDistToNozzle1(curNozzle.NozzleIndex);
|
|
|
|
if(mrs[curNozzle.NozzleIndex - 1].OffsetRow <5 && mrs[curNozzle.NozzleIndex - 1].OffsetCol<5)
|
|
|
|
if(mrs[curNozzle.NozzleIndex - 1].OffsetRow <3 && mrs[curNozzle.NozzleIndex - 1].OffsetCol<3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
targetX = mrs[curNozzle.NozzleIndex -1].OffsetCol + curSlotPoint.X + nozzleDist.X+ turnoverOffsetPoint.X;
|
|
|
|
targetX = mrs[curNozzle.NozzleIndex -1].OffsetCol + curSlotPoint.X + nozzleDist.X+ turnoverOffsetPoint.X;
|
|
|
|
targetY = mrs[curNozzle.NozzleIndex- 1].OffsetRow +curSlotPoint.Y + nozzleDist.Y + turnoverOffsetPoint.Y;
|
|
|
|
targetY = mrs[curNozzle.NozzleIndex- 1].OffsetRow +curSlotPoint.Y + nozzleDist.Y + turnoverOffsetPoint.Y;
|
|
|
@ -999,6 +1000,8 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
targetX = curSlotPoint.X + nozzleDist.X + turnoverOffsetPoint.X;
|
|
|
|
targetX = curSlotPoint.X + nozzleDist.X + turnoverOffsetPoint.X;
|
|
|
|
targetY = curSlotPoint.Y + nozzleDist.Y + turnoverOffsetPoint.Y;
|
|
|
|
targetY = curSlotPoint.Y + nozzleDist.Y + turnoverOffsetPoint.Y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
logInfo = $"运动到放料位上方 X:{targetX}Y:{targetY}";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
errCode = AxisControl.LoadX.MovePos(targetX, GlobalVar.WholeSpeed);
|
|
|
|
errCode = AxisControl.LoadX.MovePos(targetX, GlobalVar.WholeSpeed);
|
|
|
|
if (errCode == ErrorCode.Ok || GlobalVar.VirtualAxis )
|
|
|
|
if (errCode == ErrorCode.Ok || GlobalVar.VirtualAxis )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1034,7 +1037,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
alarmInfo = "x y r move isn't safe";
|
|
|
|
alarmInfo = "x y r move isn't safe";
|
|
|
|
MessageQueue.Instance.Warn(alarmInfo);
|
|
|
|
MessageQueue.Instance.Warn(alarmInfo);
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.MoveUnsafeAlarm, alarmInfo, ETipButton.Ok);
|
|
|
|
MsgBox.ShowDialog(AlarmConstID.MoveUnsafeAlarm, alarmInfo, ETipButton.Ok);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case EDischargeFlowStep.等待到放料位上方:
|
|
|
|
case EDischargeFlowStep.等待到放料位上方:
|
|
|
@ -1052,9 +1055,9 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
while (!exit)
|
|
|
|
while (!exit)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//弹框报警
|
|
|
|
//弹框报警
|
|
|
|
alarmInfo = $"检测到{curNozzle.NozzleIndex}吸嘴真空吸异常,可能丢料,请检查吸嘴的状态";
|
|
|
|
alarmInfo = $"{curNozzle.NozzleIndex}吸嘴真空吸异常,可能丢料,请检查吸嘴的状态";
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.DischargeNozzleLostProductAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.DischargeNozzleLostProductAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.DischargeNozzleLostProductAlarm);
|
|
|
|
msgBox = MsgBox.ShowDialog(AlarmConstID.DischargeNozzleLostProductAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.DischargeNozzleLostProductAlarm);
|
|
|
|
switch (msgBox.Button)
|
|
|
|
switch (msgBox.Button)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case ETipButton.Skip:
|
|
|
|
case ETipButton.Skip:
|
|
|
@ -1158,9 +1161,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
if (curNozzle.ToType == TurnoverType.Turnover)
|
|
|
|
if (curNozzle.ToType == TurnoverType.Turnover)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
targetPos = SysConfigParam.GetValue<double>($"TurnoverNozzle{curNozzle.NozzleIndex}TakeHeight");
|
|
|
|
targetPos = SysConfigParam.GetValue<double>($"TurnoverNozzle{curNozzle.NozzleIndex}TakeHeight");
|
|
|
|
/*打开周转盘真空吸*/
|
|
|
|
/*提前打开周转盘真空吸*/
|
|
|
|
logInfo = GetClassName() + $"打开周转盘{curNozzle.ToIndex + 1}号穴位真空吸";
|
|
|
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
|
|
|
VacManager.TurnoverTrayVacSuction(EVacOperator.Open, false, curNozzle.ToIndex + 1);
|
|
|
|
VacManager.TurnoverTrayVacSuction(EVacOperator.Open, false, curNozzle.ToIndex + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1188,39 +1189,39 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
if (curNozzle.ToType == TurnoverType.Turnover)
|
|
|
|
if (curNozzle.ToType == TurnoverType.Turnover)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*关闭排料吸嘴真空吸*/
|
|
|
|
/*关闭排料吸嘴真空吸*/
|
|
|
|
logInfo = GetClassName() + $"关闭{curNozzle.NozzleIndex}号排料吸嘴真空吸";
|
|
|
|
//logInfo = GetClassName() + $"关闭{curNozzle.NozzleIndex}号排料吸嘴真空吸";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空吸电磁阀");//关闭真空
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空吸电磁阀");//关闭真空
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacSuctionDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacSuctionDelaytime);
|
|
|
|
VacManager.DischargeVacSuction(EVacOperator.Close, true, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacSuction(EVacOperator.Close, false, curNozzle.NozzleIndex);
|
|
|
|
/*打开排料吸嘴真空破*/
|
|
|
|
/*打开排料吸嘴真空破*/
|
|
|
|
logInfo = GetClassName() + $"打开{curNozzle.NozzleIndex}号排料吸嘴真空破";
|
|
|
|
//logInfo = GetClassName() + $"打开{curNozzle.NozzleIndex}号排料吸嘴真空破";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//Ops.On($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Ops.On($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleOpenVacBreakDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleOpenVacBreakDelaytime);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Open, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Open, true,curNozzle.NozzleIndex);
|
|
|
|
flowStep = EDischargeFlowStep.到放料关破真空位;
|
|
|
|
flowStep = EDischargeFlowStep.到放料关破真空位;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*关闭排料吸嘴真空吸*/
|
|
|
|
/*关闭排料吸嘴真空吸*/
|
|
|
|
logInfo = GetClassName() + $"关闭{curNozzle.NozzleIndex}号排料吸嘴真空吸";
|
|
|
|
//logInfo = GetClassName() + $"关闭{curNozzle.NozzleIndex}号排料吸嘴真空吸";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空吸电磁阀");
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空吸电磁阀");
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacSuctionDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacSuctionDelaytime);
|
|
|
|
VacManager.DischargeVacSuction(EVacOperator.Close,true, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacSuction(EVacOperator.Close,false, curNozzle.NozzleIndex);
|
|
|
|
/*打开排料吸嘴真空破*/
|
|
|
|
/*打开排料吸嘴真空破*/
|
|
|
|
logInfo = GetClassName() + $"打开{curNozzle.NozzleIndex}号排料吸嘴真空破";
|
|
|
|
//logInfo = GetClassName() + $"打开{curNozzle.NozzleIndex}号排料吸嘴真空破";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//Ops.On($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Ops.On($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleOpenVacBreakDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleOpenVacBreakDelaytime);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Open, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Open,true, curNozzle.NozzleIndex);
|
|
|
|
/*关闭排料吸嘴真空破*/
|
|
|
|
/*关闭排料吸嘴真空破*/
|
|
|
|
logInfo = GetClassName() + $"关闭{curNozzle.NozzleIndex}号排料吸嘴真空破";
|
|
|
|
//logInfo = GetClassName() + $"关闭{curNozzle.NozzleIndex}号排料吸嘴真空破";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//MessageQueue.Instance.Insert(logInfo);
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacBreakDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacBreakDelaytime);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Close, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Close,false, curNozzle.NozzleIndex);
|
|
|
|
flowStep = EDischargeFlowStep.放料完成抬起;
|
|
|
|
flowStep = EDischargeFlowStep.放料完成抬起;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1245,7 +1246,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
/*关闭排料吸嘴真空破*/
|
|
|
|
/*关闭排料吸嘴真空破*/
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Ops.Off($"{curNozzle.NozzleIndex}号吸嘴真空破电磁阀");
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacBreakDelaytime);
|
|
|
|
//Thread.Sleep(GlobalVar.LoadNozzleCloseVacBreakDelaytime);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Close, curNozzle.NozzleIndex);
|
|
|
|
VacManager.DischargeVacBreak(EVacOperator.Close,false,curNozzle.NozzleIndex);
|
|
|
|
logInfo = GetClassName() + $"关闭排料{curNozzle.NozzleIndex}号吸嘴真空破";
|
|
|
|
logInfo = GetClassName() + $"关闭排料{curNozzle.NozzleIndex}号吸嘴真空破";
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
flowStep = EDischargeFlowStep.放料完成抬起;
|
|
|
|
flowStep = EDischargeFlowStep.放料完成抬起;
|
|
|
@ -1287,8 +1288,8 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
//粘料报警,提示用户粘料,移动到安全位,或者点击跳过
|
|
|
|
//粘料报警,提示用户粘料,移动到安全位,或者点击跳过
|
|
|
|
alarmInfo = $"排料{curNozzle.NozzleIndex}号吸嘴可能粘料,请查看吸嘴状态后处理";
|
|
|
|
alarmInfo = $"排料{curNozzle.NozzleIndex}号吸嘴可能粘料,请查看吸嘴状态后处理";
|
|
|
|
MessageQueue.Instance.Warn(GetClassName()+ alarmInfo);
|
|
|
|
MessageQueue.Instance.Warn(GetClassName()+ alarmInfo);
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzleTackinessAlarm);
|
|
|
|
msgBox = MsgBox.ShowDialog(AlarmConstID.NozzleTackinessAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.NozzleTackinessAlarm);
|
|
|
|
switch (msgBox.Button)
|
|
|
|
switch (msgBox.Button)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case ETipButton.Skip:
|
|
|
|
case ETipButton.Skip:
|
|
|
@ -1350,8 +1351,8 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
alarmInfo = $"周转盘{curNozzle.ToIndex + 1}号穴位真空吸异常";
|
|
|
|
alarmInfo = $"周转盘{curNozzle.ToIndex + 1}号穴位真空吸异常";
|
|
|
|
MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
|
|
|
|
MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
|
|
|
|
TestCenterMessageBox.Show(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);
|
|
|
|
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverDumpFailAlarm);
|
|
|
|
msgBox = MsgBox.ShowDialog(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverDumpFailAlarm);
|
|
|
|
if (msgBox != null)
|
|
|
|
if (msgBox != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch (msgBox.Button)
|
|
|
|
switch (msgBox.Button)
|
|
|
@ -1598,7 +1599,6 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case EDischargeFlowStep.任务结束到安全位:
|
|
|
|
case EDischargeFlowStep.任务结束到安全位:
|
|
|
|
|
|
|
|
|
|
|
|
errCode = AxisControl.LoadX.MovePos(SysConfigParam.GetValue<double>("LoadXStartPos"), GlobalVar.WholeSpeed);
|
|
|
|
errCode = AxisControl.LoadX.MovePos(SysConfigParam.GetValue<double>("LoadXStartPos"), GlobalVar.WholeSpeed);
|
|
|
|
if(errCode== ErrorCode.Ok || GlobalVar.VirtualAxis)
|
|
|
|
if(errCode== ErrorCode.Ok || GlobalVar.VirtualAxis)
|
|
|
|
{
|
|
|
|
{
|
|
|
|