增加input料盘循环上料配置

master
lhiven 1 year ago
parent 4d15883447
commit 8adb42119f

@ -926,5 +926,15 @@ namespace Rs.Framework
return SysConfigParam.GetValue<bool>(nameof(EnableVirtuleBarCode)); return SysConfigParam.GetValue<bool>(nameof(EnableVirtuleBarCode));
} }
} }
/// <summary>
/// Input盘循环测试
/// </summary>
public static bool InputTrayLoop
{
get
{
return SysConfigParam.GetValue<bool>(nameof(InputTrayLoop));
}
}
} }
} }

@ -950,11 +950,25 @@ namespace Rs.MotionPlat.Flow
} }
else if (curNozzle.ToType == TurnoverType.Passed) else if (curNozzle.ToType == TurnoverType.Passed)
{ {
downSlot = GlobalTray.OkTary.GetSlot(ESlotStatus.NotHave); if(GlobalVar.InputTrayLoop)
{
downSlot = GlobalTray.InputTray.GetSlot(ESlotStatus.NotHave);
}
else
{
downSlot = GlobalTray.OkTary.GetSlot(ESlotStatus.NotHave);
}
if (downSlot != null) if (downSlot != null)
{ {
curNozzle.ToIndex = downSlot.Index - 1; curNozzle.ToIndex = downSlot.Index - 1;
curSlotPoint = TrayPointManager.GetSlotPoint( ETrayType.Ok, downSlot.Index); if(GlobalVar.InputTrayLoop)
{
curSlotPoint = TrayPointManager.GetSlotPoint(ETrayType.Input, downSlot.Index);
}
else
{
curSlotPoint = TrayPointManager.GetSlotPoint(ETrayType.Ok, downSlot.Index);
}
logInfo = GetClassName()+$"排料吸嘴{curNozzle.NozzleIndex}号到{curNozzle.ToType}盘{curNozzle.ToIndex+1}号穴位上方"; logInfo = GetClassName()+$"排料吸嘴{curNozzle.NozzleIndex}号到{curNozzle.ToType}盘{curNozzle.ToIndex+1}号穴位上方";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
} }
@ -1519,9 +1533,18 @@ namespace Rs.MotionPlat.Flow
} }
else if (curNozzle.ToType == TurnoverType.Passed) else if (curNozzle.ToType == TurnoverType.Passed)
{ {
curNozzle.ToFloor = StockManager.Instance.GetStock(ETrayType.Ok).GetFloor(); if (GlobalVar.InputTrayLoop)
GlobalTray.OkTary.ChangeStatus(curNozzle.ToIndex + 1, ESlotStatus.Have); {
TrayStatusManager.Fill(ETrayType.Ok, curNozzle.ToIndex + 1); curNozzle.ToFloor = StockManager.Instance.GetStock(ETrayType.Input).GetFloor();
GlobalTray.InputTray.ChangeStatus(curNozzle.ToIndex + 1, ESlotStatus.Have);
TrayStatusManager.Fill(ETrayType.Input, curNozzle.ToIndex + 1);
}
else
{
curNozzle.ToFloor = StockManager.Instance.GetStock(ETrayType.Ok).GetFloor();
GlobalTray.OkTary.ChangeStatus(curNozzle.ToIndex + 1, ESlotStatus.Have);
TrayStatusManager.Fill(ETrayType.Ok, curNozzle.ToIndex + 1);
}
} }
else if (curNozzle.ToType == TurnoverType.Failed) else if (curNozzle.ToType == TurnoverType.Failed)
{ {
@ -1586,6 +1609,13 @@ namespace Rs.MotionPlat.Flow
errCode = AxisControl.LoadY.MovePos(SysConfigParam.GetValue<double>("LoadYStartPos"), GlobalVar.WholeSpeed); errCode = AxisControl.LoadY.MovePos(SysConfigParam.GetValue<double>("LoadYStartPos"), GlobalVar.WholeSpeed);
if(errCode== ErrorCode.Ok || GlobalVar.VirtualAxis) if(errCode== ErrorCode.Ok || GlobalVar.VirtualAxis)
{ {
//if(curNozzle.ToType== TurnoverType.ToBeTested
// ||curNozzle.ToType== TurnoverType.Passed
// || curNozzle.ToType== TurnoverType.Failed
// || curNozzle.ToType== TurnoverType.Multifunction)
//{
//}
ZRHomeFlow.Instance.GoHome(); ZRHomeFlow.Instance.GoHome();
if (GlobalVar.VirtualAxis) if (GlobalVar.VirtualAxis)
{ {
@ -1608,17 +1638,17 @@ namespace Rs.MotionPlat.Flow
case EDischargeFlowStep.: case EDischargeFlowStep.:
if(Ops.IsStop("LoadX", "LoadY") || GlobalVar.VirtualAxis) if(Ops.IsStop("LoadX", "LoadY") || GlobalVar.VirtualAxis)
{ {
logInfo = GetClassName()+ $"任务结束已回到安全位";
MessageQueue.Instance.Insert(logInfo);
if (TestCenter.Instance.LoadResult()) if (TestCenter.Instance.LoadResult())
{ {
logInfo = GetClassName()+ $"通知中控任务完成"; logInfo = GetClassName() + $"通知中控任务完成";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
LoadAndUnloadTask.Instance.Clear(); LoadAndUnloadTask.Instance.Clear();
logInfo = GetClassName()+$"任务完成,清除任务"; logInfo = GetClassName() + $"任务完成,清除任务";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
} }
MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting); MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
logInfo = GetClassName()+ $"任务结束已回到安全位";
MessageQueue.Instance.Insert(logInfo);
flowStep = EDischargeFlowStep.; flowStep = EDischargeFlowStep.;
} }
break; break;

@ -643,7 +643,7 @@
this.trayEmpty1.ShowText = true; this.trayEmpty1.ShowText = true;
this.trayEmpty1.SinglePoint = false; this.trayEmpty1.SinglePoint = false;
this.trayEmpty1.Size = new System.Drawing.Size(121, 394); this.trayEmpty1.Size = new System.Drawing.Size(121, 394);
this.trayEmpty1.SortDir = Rs.Controls.ESortDir.RightToLeft; this.trayEmpty1.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.trayEmpty1.Status = null; this.trayEmpty1.Status = null;
this.trayEmpty1.TabIndex = 0; this.trayEmpty1.TabIndex = 0;
this.trayEmpty1.TopSpaceHeight = 20; this.trayEmpty1.TopSpaceHeight = 20;
@ -671,7 +671,7 @@
this.trayInput.ShowText = true; this.trayInput.ShowText = true;
this.trayInput.SinglePoint = false; this.trayInput.SinglePoint = false;
this.trayInput.Size = new System.Drawing.Size(121, 394); this.trayInput.Size = new System.Drawing.Size(121, 394);
this.trayInput.SortDir = Rs.Controls.ESortDir.RightToLeft; this.trayInput.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.trayInput.Status = null; this.trayInput.Status = null;
this.trayInput.TabIndex = 0; this.trayInput.TabIndex = 0;
this.trayInput.TopSpaceHeight = 20; this.trayInput.TopSpaceHeight = 20;
@ -699,7 +699,7 @@
this.trayOk.ShowText = true; this.trayOk.ShowText = true;
this.trayOk.SinglePoint = false; this.trayOk.SinglePoint = false;
this.trayOk.Size = new System.Drawing.Size(121, 394); this.trayOk.Size = new System.Drawing.Size(121, 394);
this.trayOk.SortDir = Rs.Controls.ESortDir.RightToLeft; this.trayOk.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.trayOk.Status = null; this.trayOk.Status = null;
this.trayOk.TabIndex = 0; this.trayOk.TabIndex = 0;
this.trayOk.TopSpaceHeight = 20; this.trayOk.TopSpaceHeight = 20;
@ -728,7 +728,7 @@
this.trayNg.ShowText = true; this.trayNg.ShowText = true;
this.trayNg.SinglePoint = false; this.trayNg.SinglePoint = false;
this.trayNg.Size = new System.Drawing.Size(121, 394); this.trayNg.Size = new System.Drawing.Size(121, 394);
this.trayNg.SortDir = Rs.Controls.ESortDir.RightToLeft; this.trayNg.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.trayNg.Status = null; this.trayNg.Status = null;
this.trayNg.TabIndex = 0; this.trayNg.TabIndex = 0;
this.trayNg.TopSpaceHeight = 20; this.trayNg.TopSpaceHeight = 20;
@ -757,7 +757,7 @@
this.trayMulti.ShowText = true; this.trayMulti.ShowText = true;
this.trayMulti.SinglePoint = false; this.trayMulti.SinglePoint = false;
this.trayMulti.Size = new System.Drawing.Size(121, 394); this.trayMulti.Size = new System.Drawing.Size(121, 394);
this.trayMulti.SortDir = Rs.Controls.ESortDir.RightToLeft; this.trayMulti.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.trayMulti.Status = null; this.trayMulti.Status = null;
this.trayMulti.TabIndex = 0; this.trayMulti.TabIndex = 0;
this.trayMulti.TopSpaceHeight = 20; this.trayMulti.TopSpaceHeight = 20;
@ -786,7 +786,7 @@
this.trayEmpty2.ShowText = true; this.trayEmpty2.ShowText = true;
this.trayEmpty2.SinglePoint = false; this.trayEmpty2.SinglePoint = false;
this.trayEmpty2.Size = new System.Drawing.Size(124, 394); this.trayEmpty2.Size = new System.Drawing.Size(124, 394);
this.trayEmpty2.SortDir = Rs.Controls.ESortDir.RightToLeft; this.trayEmpty2.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.trayEmpty2.Status = null; this.trayEmpty2.Status = null;
this.trayEmpty2.TabIndex = 0; this.trayEmpty2.TabIndex = 0;
this.trayEmpty2.TopSpaceHeight = 20; this.trayEmpty2.TopSpaceHeight = 20;

Loading…
Cancel
Save