|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
using log4net.Core;
|
|
|
|
|
using NPOI.HSSF.Record.Chart;
|
|
|
|
|
using NPOI.SS.Formula.Eval;
|
|
|
|
|
using Rs.Controls;
|
|
|
|
|
using Rs.Framework;
|
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
@ -432,16 +433,28 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
List<TurnoverTraySlot> untestSlots = TurnoverTrayManager.Instance.GetSlots(ETurnoverTraySlotType.WaitTest, ETurnoverTraySlotStatus.Have);
|
|
|
|
|
if (untestSlots != null && untestSlots.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
bool btnSkipClicked = false;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while (!exit)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = ETipButton.Skip;
|
|
|
|
|
//alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位产品未取出,请处理";
|
|
|
|
|
//alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.周转吸头在周转盘取料失败报警), untestSlots.Select(s => (s.Index>8?s.Index-8:s.Index)).ToJoinString(), untestSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头在周转盘取料失败报警).Transform(untestSlots.Select(s => (s.Index > 8 ? s.Index - 8 : s.Index)).ToJoinString(), untestSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
if (btnSkipClicked)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转盘测高有料报警).Transform(untestSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头在周转盘取料失败报警).Transform(untestSlots.Select(s => (s.Index > 8 ? s.Index - 8 : s.Index)).ToJoinString(), untestSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
|
|
|
|
|
//MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//msgBox = MsgBox.ShowDialog(AlarmConstID.周转吸头在周转盘取料失败报警, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//switch (msgBox.Button)
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
@ -488,6 +501,10 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
exit = true;
|
|
|
|
|
Step = ETurnoverFlowStep.到测试放料位上方;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
btnSkipClicked = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes:
|
|
|
|
@ -1266,18 +1283,29 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
//压一下之后如果还出现异常,则报警
|
|
|
|
|
if (Ops.IsOff($"测试{nozzle.NozzleIndex}号穴位光纤检测"))
|
|
|
|
|
{
|
|
|
|
|
bool btnSkipClicked = false;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while (!exit)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = ETipButton.Skip;
|
|
|
|
|
// alarmInfo = $"测试治具{nozzle.NozzleIndex}号穴位光纤异常,有可能叠料,请处理";
|
|
|
|
|
//alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警), nozzle.NozzleIndex) ;
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警).Transform(nozzle.NozzleIndex);
|
|
|
|
|
if (btnSkipClicked || !GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具测高有料报警).Transform(nozzle.NozzleIndex);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警).Transform(nozzle.NozzleIndex);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
MessageQueue.Instance.Warn(GetClassName() + alarmEntity.CN);
|
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.TextFixtureFiberAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//msgBox = MsgBox.ShowDialog(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TextFixtureFiberAlarm);
|
|
|
|
|
if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
//if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
// ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//switch (msgBox.Button)
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
@ -1297,36 +1325,9 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
nozzle.Clear();
|
|
|
|
|
exit = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
|
|
|
|
|
if (nozzle.NozzleIndex < 9)
|
|
|
|
|
{
|
|
|
|
|
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
}
|
|
|
|
|
//Start();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Skip:
|
|
|
|
|
//镭射头过来复检,有产品则继续报警
|
|
|
|
|
TestHeightResult heightReulst = LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex);
|
|
|
|
|
if (!heightReulst.HasProduct)
|
|
|
|
|
{
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
|
|
|
|
|
nozzle.Clear();
|
|
|
|
|
exit = true;
|
|
|
|
|
btnSkipClicked = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
@ -1345,6 +1346,37 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
// switch (btnRet)
|
|
|
|
|
// {
|
|
|
|
|
// case ETipButton.Skip:
|
|
|
|
|
// //镭射头过来复检,有产品则继续报警
|
|
|
|
|
// TestHeightResult heightReulst = LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex);
|
|
|
|
|
// if (!heightReulst.HasProduct)
|
|
|
|
|
// {
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
|
|
|
|
|
// nozzle.Clear();
|
|
|
|
|
// exit = true;
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case ETipButton.Yes://移动到安全位
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
|
|
|
|
|
// if (nozzle.NozzleIndex < 9)
|
|
|
|
|
// {
|
|
|
|
|
// LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}光钎异常");
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
// }
|
|
|
|
|
// //Start();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1352,11 +1384,11 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
if (nozzle.IsHasProduct)
|
|
|
|
|
{
|
|
|
|
|
bool bCheckOk = false;
|
|
|
|
|
for(int i=0;i<2;i++)
|
|
|
|
|
for(int i=0;i<3;i++)
|
|
|
|
|
{
|
|
|
|
|
if(i==1)
|
|
|
|
|
if(i>0)
|
|
|
|
|
{
|
|
|
|
|
MessageQueue.Instance.Insert(GetClassName() + "第二次真空检测,先关闭真空,再打开真空吸");
|
|
|
|
|
MessageQueue.Instance.Insert(GetClassName() + $"第{i+1}次真空检测,先关闭真空,再打开真空吸");
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close,true,nozzle.NozzleIndex);
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Open,true,nozzle.NozzleIndex);
|
|
|
|
@ -1384,18 +1416,29 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bool btnSkipClicked = false;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while (!exit)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = ETipButton.Skip;
|
|
|
|
|
// alarmInfo = $"测试治具{nozzle.NozzleIndex}号真空吸异常";
|
|
|
|
|
//alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.周转吸头放料到测试治具后测试治具真空吸报警), nozzle.NozzleIndex);
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具真空吸报警).Transform(nozzle.NozzleIndex);
|
|
|
|
|
if (btnSkipClicked ||!GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具测高有料报警).Transform(nozzle.NozzleIndex);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具真空吸报警).Transform(nozzle.NozzleIndex);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
MessageQueue.Instance.Warn(GetClassName() + alarmEntity.CN);
|
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.周转吸头放料到测试治具后测试治具真空吸报警, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
// msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.周转吸头放料到测试治具后测试治具真空吸报警);
|
|
|
|
|
if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
//if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//switch (msgBox.Button)
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
@ -1418,35 +1461,9 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
GlobalTray.TurnoverNozzle.ChangeStatus(nozzle.NozzleIndex, ESlotStatus.NotHave);
|
|
|
|
|
exit = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
|
|
|
|
|
if (nozzle.NozzleIndex < 9)
|
|
|
|
|
{
|
|
|
|
|
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
}
|
|
|
|
|
//Start();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Skip:
|
|
|
|
|
//镭射头过来复检,有产品则继续报警,
|
|
|
|
|
TestHeightResult heightResult = LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex);
|
|
|
|
|
if (!heightResult.HasProduct)
|
|
|
|
|
{
|
|
|
|
|
nozzle.Clear();
|
|
|
|
|
exit = true;
|
|
|
|
|
btnSkipClicked = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
@ -1465,6 +1482,36 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
// switch (btnRet)
|
|
|
|
|
// {
|
|
|
|
|
// case ETipButton.Skip:
|
|
|
|
|
// //镭射头过来复检,有产品则继续报警,
|
|
|
|
|
// TestHeightResult heightResult = LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex);
|
|
|
|
|
// if (!heightResult.HasProduct)
|
|
|
|
|
// {
|
|
|
|
|
// nozzle.Clear();
|
|
|
|
|
// exit = true;
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case ETipButton.Yes://移动到安全位
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, nozzle.NozzleIndex);
|
|
|
|
|
// if (nozzle.NozzleIndex < 9)
|
|
|
|
|
// {
|
|
|
|
|
// LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// LogHelper.Debug($"治具穴位{nozzle.NozzleIndex}真空异常");
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
// }
|
|
|
|
|
// //Start();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1818,14 +1865,25 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
//压一下之后如果还出现异常,则报警
|
|
|
|
|
if (Ops.IsOff($"测试{slot.Index}号穴位光纤检测"))
|
|
|
|
|
{
|
|
|
|
|
bool btnSkipClicked = false;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while (!exit)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警).Transform(slot.Index);
|
|
|
|
|
ETipButton btnRet = ETipButton.Skip;
|
|
|
|
|
if (btnSkipClicked || !GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具测高有料报警).Transform(slot.Index);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警).Transform(slot.Index);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
MessageQueue.Instance.Warn(GetClassName() + alarmEntity.CN);
|
|
|
|
|
if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
//if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Retry:
|
|
|
|
@ -1845,35 +1903,9 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
exit = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
if (slot.Index < 9)
|
|
|
|
|
{
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
}
|
|
|
|
|
//Start();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Skip:
|
|
|
|
|
//镭射头过来复检,有产品则继续报警
|
|
|
|
|
TestHeightResult heightReulst = LaserFlow.Instance.HasProduct(ETrayType.Test, slot.Index);
|
|
|
|
|
if (!heightReulst.HasProduct)
|
|
|
|
|
{
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
slot.ClearProduct();
|
|
|
|
|
GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
exit = true;
|
|
|
|
|
btnSkipClicked = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
@ -1890,6 +1922,36 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
// switch (btnRet)
|
|
|
|
|
// {
|
|
|
|
|
// case ETipButton.Skip:
|
|
|
|
|
// //镭射头过来复检,有产品则继续报警
|
|
|
|
|
// TestHeightResult heightReulst = LaserFlow.Instance.HasProduct(ETrayType.Test, slot.Index);
|
|
|
|
|
// if (!heightReulst.HasProduct)
|
|
|
|
|
// {
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
// slot.ClearProduct();
|
|
|
|
|
// GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
// exit = true;
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case ETipButton.Yes://移动到安全位
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
// if (slot.Index < 9)
|
|
|
|
|
// {
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
// }
|
|
|
|
|
// //Start();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1901,14 +1963,25 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MessageQueue.Instance.Insert($"测试{slot.Index}号穴位真空吸检测NG");
|
|
|
|
|
bool btnSkipClicked = false;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while (!exit)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具真空吸报警).Transform(slot.Index);
|
|
|
|
|
ETipButton btnRet = ETipButton.Skip;
|
|
|
|
|
if (btnSkipClicked || !GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具测高有料报警).Transform(slot.Index);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头放料到测试治具后测试治具光纤报警).Transform(slot.Index);
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
MessageQueue.Instance.Warn(GetClassName() + alarmEntity.CN);
|
|
|
|
|
if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
//if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Retry:
|
|
|
|
@ -1927,27 +2000,9 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
slot.ClearProduct();
|
|
|
|
|
exit = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
//Start();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Skip:
|
|
|
|
|
//镭射头过来复检,有产品则继续报警,
|
|
|
|
|
TestHeightResult heightResult = LaserFlow.Instance.HasProduct(ETrayType.Test, slot.Index);
|
|
|
|
|
if (!heightResult.HasProduct)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
slot.ClearProduct();
|
|
|
|
|
exit = true;
|
|
|
|
|
btnSkipClicked = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
@ -1957,6 +2012,28 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
// switch (btnRet)
|
|
|
|
|
// {
|
|
|
|
|
// case ETipButton.Skip:
|
|
|
|
|
// //镭射头过来复检,有产品则继续报警,
|
|
|
|
|
// TestHeightResult heightResult = LaserFlow.Instance.HasProduct(ETrayType.Test, slot.Index);
|
|
|
|
|
// if (!heightResult.HasProduct)
|
|
|
|
|
// {
|
|
|
|
|
// GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
// slot.ClearProduct();
|
|
|
|
|
// exit = true;
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case ETipButton.Yes://移动到安全位
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
// //Start();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2095,18 +2172,29 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
TurnoverDumpFlow.Instance.Wait();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
bool btnSkipClicked = false;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while (!exit)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = ETipButton.Skip;
|
|
|
|
|
//alarmInfo = GetClassName() + $"测试治具{testedSlots.Select(s => s.Index).ToJoinString()}号穴位取料失败";
|
|
|
|
|
//alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.周转吸头在测试治具取料失败报警), testedSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头在测试治具取料失败报警).Transform(testedSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
if (btnSkipClicked ||!GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具测高有料报警).Transform(testedSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.周转吸头在测试治具取料失败报警).Transform(testedSlots.Select(s => s.Index).ToJoinString());
|
|
|
|
|
btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
}
|
|
|
|
|
LogHelper.Debug(GetClassName() + alarmEntity.CN);
|
|
|
|
|
//TestCenterMessageBox.Show(AlarmConstID.周转吸头在测试治具取料失败报警, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.周转吸头在测试治具取料失败报警);
|
|
|
|
|
if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
//if (GlobalVar.ShowRetrayButtonInSocket)
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
|
|
|
|
|
//switch (msgBox.Button)
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
@ -2147,6 +2235,10 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
exit = true;
|
|
|
|
|
Step = ETurnoverFlowStep.上报中控任务完成;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
btnSkipClicked = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
|
logInfo = GetClassName() + $"选择了移动到安全位按钮";
|
|
|
|
@ -2166,59 +2258,59 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
//switch (msgBox.Button)
|
|
|
|
|
switch (btnRet)
|
|
|
|
|
{
|
|
|
|
|
case ETipButton.Skip:
|
|
|
|
|
retakeNum = 0;
|
|
|
|
|
logInfo = GetClassName() + $"选择了跳过按钮";
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
testedSlots = testedSlots = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
|
|
|
|
|
foreach (TestTraySlot slot in testedSlots)
|
|
|
|
|
{
|
|
|
|
|
TestHeightResult heightResult = LaserFlow.Instance.HasProduct(ETrayType.Test, slot.Index);
|
|
|
|
|
if (!heightResult.HasProduct)
|
|
|
|
|
{
|
|
|
|
|
logInfo = GetClassName() + $"镭射头检测{slot.Index}号穴位无产品";
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
TurnoverInfo ti = LoadAndUnloadTask.Instance.GetTestUnloadTask(slot.Index);
|
|
|
|
|
if (ti != null)
|
|
|
|
|
{
|
|
|
|
|
ti.Dealed = true;
|
|
|
|
|
}
|
|
|
|
|
slot.ClearProduct();
|
|
|
|
|
VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
testedSlots = testedSlots = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
|
|
|
|
|
if (testedSlots == null || testedSlots.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// ETipButton btnRet = AlarmMessageBox.ShowDialog(alarmEntity, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
|
|
|
|
|
// //switch (msgBox.Button)
|
|
|
|
|
// switch (btnRet)
|
|
|
|
|
// {
|
|
|
|
|
// case ETipButton.Skip:
|
|
|
|
|
// retakeNum = 0;
|
|
|
|
|
// logInfo = GetClassName() + $"选择了跳过按钮";
|
|
|
|
|
// MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
// testedSlots = testedSlots = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
|
|
|
|
|
// foreach (TestTraySlot slot in testedSlots)
|
|
|
|
|
// {
|
|
|
|
|
// TestHeightResult heightResult = LaserFlow.Instance.HasProduct(ETrayType.Test, slot.Index);
|
|
|
|
|
// if (!heightResult.HasProduct)
|
|
|
|
|
// {
|
|
|
|
|
// logInfo = GetClassName() + $"镭射头检测{slot.Index}号穴位无产品";
|
|
|
|
|
// MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
// TurnoverInfo ti = LoadAndUnloadTask.Instance.GetTestUnloadTask(slot.Index);
|
|
|
|
|
// if (ti != null)
|
|
|
|
|
// {
|
|
|
|
|
// ti.Dealed = true;
|
|
|
|
|
// }
|
|
|
|
|
// slot.ClearProduct();
|
|
|
|
|
// VacManager.TestTrayVacSuction(EVacOperator.Close, true, slot.Index);
|
|
|
|
|
// GlobalTray.TestTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// testedSlots = testedSlots = TestTrayManager.Instance.GetSlots(ETestTraySlotStatus.Have);
|
|
|
|
|
// if (testedSlots == null || testedSlots.Count == 0)
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
|
|
exit = true;
|
|
|
|
|
Step = ETurnoverFlowStep.上报中控任务完成;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ETipButton.Yes://移动到安全位
|
|
|
|
|
logInfo = GetClassName() + $"选择了移动到安全位按钮";
|
|
|
|
|
MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
if (testedSlots.Select(ts => (ts.Index >= 9 && ts.Index <= 16)).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
}
|
|
|
|
|
//Start();
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// exit = true;
|
|
|
|
|
// Step = ETurnoverFlowStep.上报中控任务完成;
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case ETipButton.Yes://移动到安全位
|
|
|
|
|
// logInfo = GetClassName() + $"选择了移动到安全位按钮";
|
|
|
|
|
// MessageQueue.Instance.Insert(logInfo);
|
|
|
|
|
// if (testedSlots.Select(ts => (ts.Index >= 9 && ts.Index <= 16)).Count() > 0)
|
|
|
|
|
// {
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.SocketFrom9ToSixteen);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
|
|
|
|
|
// }
|
|
|
|
|
// //Start();
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|