优化周转模组在周转盘取料失败后提示错误和破真空时吸嘴错我

master
lhiven 1 year ago
parent fd37f833db
commit 020cc61049

@ -249,7 +249,7 @@ namespace Rs.MotionPlat.Flow
else else
{ {
undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal); undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal);
TurnoverDumpFlow.Instance.Dump(ETrayType.Turnover, undealTasks.Select(t => t.FromIndex + 1).ToList()); TurnoverDumpFlow.Instance.Dump(ETrayType.Turnover, undealTasks.Select(t => ((t.FromIndex + 1) > 8 ? (t.FromIndex + 1) - 8 : (t.FromIndex + 1))).ToList());
TurnoverDumpFlow.Instance.Wait(); TurnoverDumpFlow.Instance.Wait();
Step = ETurnoverFlowStep.; Step = ETurnoverFlowStep.;
} }
@ -265,7 +265,7 @@ namespace Rs.MotionPlat.Flow
while (!exit) while (!exit)
{ {
//alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位产品未取出,请处理"; //alarmInfo = GetClassName() + $"周转盘{string.Join(",", untestSlots.Select(s => s.Index))}号穴位产品未取出,请处理";
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), untestSlots.Select(s => s.Index).ToJoinString(), untestSlots.Select(s => s.Index).ToJoinString()); alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), untestSlots.Select(s => (s.Index>8?s.Index-8:s.Index)).ToJoinString(), untestSlots.Select(s => s.Index).ToJoinString());
//TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), //TestCenterMessageBox.Show(AlarmConstID.TurnoverTakeFailAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),
//MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText()); //MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm); msgBox = MsgBox.ShowDialog(AlarmConstID., alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(),MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());// TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverTakeFailAlarm);
@ -287,7 +287,7 @@ namespace Rs.MotionPlat.Flow
{ {
WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, slot.Index); WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, slot.Index);
slot.ClearProduct(); slot.ClearProduct();
VacManager.TurnoverTrayVacSuction(EVacOperator.Close,true, slot.Index); VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, slot.Index > 8 ? slot.Index - 8 : slot.Index);
GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.NotHave); GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
} }
exit = true; exit = true;
@ -490,7 +490,7 @@ namespace Rs.MotionPlat.Flow
undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal); undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal);
if(undealTasks.Count > 0 ) if(undealTasks.Count > 0 )
{ {
TurnoverDumpFlow.Instance.Dump(ETrayType.Turnover, undealTasks.Select(t => t.FromIndex + 1).ToList()); TurnoverDumpFlow.Instance.Dump(ETrayType.Turnover, undealTasks.Select(t => ((t.FromIndex + 1) > 8 ? (t.FromIndex + 1 - 8) : (t.FromIndex + 1))).ToList());
TurnoverDumpFlow.Instance.Wait(); TurnoverDumpFlow.Instance.Wait();
} }
Step = ETurnoverFlowStep.; Step = ETurnoverFlowStep.;

@ -526,15 +526,20 @@ namespace Rs.MotionPlat.Flow
public int Send(string content,Encoding encode,bool writeLog=true) public int Send(string content,Encoding encode,bool writeLog=true)
{ {
while (true) // while (true)
{ {
int len = client.Send(content, encode); int len = client.Send(content, encode);
if (len > 0 && writeLog)
if (len > 0)
{
if(writeLog)
{ {
LogHelper.Debug(" <<< " + content); LogHelper.Debug(" <<< " + content);
}
return len; return len;
} }
Thread.Sleep(1000); return len;
//Thread.Sleep(1000);
} }
} }

Loading…
Cancel
Save