From 8adb42119f21a00d8a6fbfb369ce7a3e206f20f9 Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 11 Jan 2024 18:01:42 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0input=E6=96=99=E7=9B=98?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E4=B8=8A=E6=96=99=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Commom/GlobalVar.cs | 10 +++++ Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs | 48 +++++++++++++++++---- Rs.SkyLine/FormMain.designer.cs | 12 +++--- 3 files changed, 55 insertions(+), 15 deletions(-) diff --git a/Rs.SkyLine/Commom/GlobalVar.cs b/Rs.SkyLine/Commom/GlobalVar.cs index b14ba91..ce77508 100644 --- a/Rs.SkyLine/Commom/GlobalVar.cs +++ b/Rs.SkyLine/Commom/GlobalVar.cs @@ -926,5 +926,15 @@ namespace Rs.Framework return SysConfigParam.GetValue(nameof(EnableVirtuleBarCode)); } } + /// + /// Input盘循环测试 + /// + public static bool InputTrayLoop + { + get + { + return SysConfigParam.GetValue(nameof(InputTrayLoop)); + } + } } } diff --git a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs index 317807f..4674b82 100644 --- a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs @@ -950,11 +950,25 @@ namespace Rs.MotionPlat.Flow } 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) { 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}号穴位上方"; MessageQueue.Instance.Insert(logInfo); } @@ -1519,9 +1533,18 @@ namespace Rs.MotionPlat.Flow } else if (curNozzle.ToType == TurnoverType.Passed) { - curNozzle.ToFloor = StockManager.Instance.GetStock(ETrayType.Ok).GetFloor(); - GlobalTray.OkTary.ChangeStatus(curNozzle.ToIndex + 1, ESlotStatus.Have); - TrayStatusManager.Fill(ETrayType.Ok, curNozzle.ToIndex + 1); + if (GlobalVar.InputTrayLoop) + { + 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) { @@ -1586,6 +1609,13 @@ namespace Rs.MotionPlat.Flow errCode = AxisControl.LoadY.MovePos(SysConfigParam.GetValue("LoadYStartPos"), GlobalVar.WholeSpeed); 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(); if (GlobalVar.VirtualAxis) { @@ -1608,17 +1638,17 @@ namespace Rs.MotionPlat.Flow case EDischargeFlowStep.等待任务结束到安全位: if(Ops.IsStop("LoadX", "LoadY") || GlobalVar.VirtualAxis) { - logInfo = GetClassName()+ $"任务结束已回到安全位"; - MessageQueue.Instance.Insert(logInfo); if (TestCenter.Instance.LoadResult()) { - logInfo = GetClassName()+ $"通知中控任务完成"; + logInfo = GetClassName() + $"通知中控任务完成"; MessageQueue.Instance.Insert(logInfo); LoadAndUnloadTask.Instance.Clear(); - logInfo = GetClassName()+$"任务完成,清除任务"; + logInfo = GetClassName() + $"任务完成,清除任务"; MessageQueue.Instance.Insert(logInfo); } MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting); + logInfo = GetClassName()+ $"任务结束已回到安全位"; + MessageQueue.Instance.Insert(logInfo); flowStep = EDischargeFlowStep.等待任务; } break; diff --git a/Rs.SkyLine/FormMain.designer.cs b/Rs.SkyLine/FormMain.designer.cs index c6c97d6..d0c9918 100644 --- a/Rs.SkyLine/FormMain.designer.cs +++ b/Rs.SkyLine/FormMain.designer.cs @@ -643,7 +643,7 @@ this.trayEmpty1.ShowText = true; this.trayEmpty1.SinglePoint = false; 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.TabIndex = 0; this.trayEmpty1.TopSpaceHeight = 20; @@ -671,7 +671,7 @@ this.trayInput.ShowText = true; this.trayInput.SinglePoint = false; 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.TabIndex = 0; this.trayInput.TopSpaceHeight = 20; @@ -699,7 +699,7 @@ this.trayOk.ShowText = true; this.trayOk.SinglePoint = false; 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.TabIndex = 0; this.trayOk.TopSpaceHeight = 20; @@ -728,7 +728,7 @@ this.trayNg.ShowText = true; this.trayNg.SinglePoint = false; 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.TabIndex = 0; this.trayNg.TopSpaceHeight = 20; @@ -757,7 +757,7 @@ this.trayMulti.ShowText = true; this.trayMulti.SinglePoint = false; 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.TabIndex = 0; this.trayMulti.TopSpaceHeight = 20; @@ -786,7 +786,7 @@ this.trayEmpty2.ShowText = true; this.trayEmpty2.SinglePoint = false; 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.TabIndex = 0; this.trayEmpty2.TopSpaceHeight = 20;