diff --git a/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs index d15fff4..f10aff0 100644 --- a/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs +++ b/Rs.DeweyTester/Flow/NormalFlow/GrrFlow.cs @@ -298,7 +298,7 @@ namespace Rs.MotionPlat.Flow curTakeNozzle = NozzleManager.GetIdelNozzle(); if (curTakeNozzle != null) { - StockTakeFlow.Instance.Take(ETrayType.Grr, curTakeSlot.Index, curTakeNozzle.NozzleIndex, vProductResult); + StockTakeFlow.Instance.Take(ETrayType.Grr, curTakeSlot.Index, curTakeNozzle.NozzleIndex, EStockScanBarcodeMode.Single, vProductResult); takedNum++; if (NozzleManager.GetIdleNozzleCount() == 1 || takedNum == GlobalVar.GrrProductNum) { diff --git a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs index b7d8bcf..54b85e7 100644 --- a/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs +++ b/Rs.DeweyTester/Flow/SubFlow/StockTakeFlow.cs @@ -25,6 +25,12 @@ namespace Rs.MotionPlat.Flow.SubFlow 料仓取料真空吸检测, } + public enum EStockScanBarcodeMode + { + Multi, + Single + } + /// /// 料仓取料流程 /// @@ -60,7 +66,7 @@ namespace Rs.MotionPlat.Flow.SubFlow /// 料仓取料 /// /// - public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, ProductLocationResult locaResult=null,bool needStop=true) + public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, EStockScanBarcodeMode scanBarCodeMode= EStockScanBarcodeMode.Multi, ProductLocationResult locaResult=null,bool needStop=true) { if (finished) finished = false; @@ -95,16 +101,16 @@ namespace Rs.MotionPlat.Flow.SubFlow waitTakeProductSlot = GlobalTray.GrrTray.GetSlot(slotIndex); } targetPosition = NozzleManager.GetToTraySlot(trayType, waitTakeProductSlot.Index, curNozzle.NozzleIndex); - ProductLocationResult result = OneGrabSixteenManager.Instance.GetResultBySlotIndex(waitTakeProductSlot.Index); - if (locaResult != null) + if (scanBarCodeMode== EStockScanBarcodeMode.Single) { //MessageQueue.Instance.Insert($"拍照偏移量 x:{locaResult.OffsetX},y:{locaResult.OffsetY}"); targetPosition.X += locaResult.OffsetX; targetPosition.Y2 += locaResult.OffsetY; } - else if (result!=null || GlobalVar.RunSpace) + else { - if(!GlobalVar.RunSpace) + ProductLocationResult result = OneGrabSixteenManager.Instance.GetResultBySlotIndex(waitTakeProductSlot.Index); + if (!GlobalVar.RunSpace) { //MessageQueue.Instance.Insert($"拍照偏移量 x:{result.OffsetX},y:{result.OffsetY}"); targetPosition.X += result.OffsetX; @@ -189,23 +195,41 @@ namespace Rs.MotionPlat.Flow.SubFlow } else { - ProductLocationResult vResult = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex); - if (vResult!=null || locaResult!=null) + string sn = string.Empty; + if(GlobalVar.EnableVirtualBarCode) + { + sn = VirtualBarCode.Code; + } + else { - string sn = string.Empty; - if(GlobalVar.EnableVirtualBarCode) + if (scanBarCodeMode == EStockScanBarcodeMode.Multi) { - sn = VirtualBarCode.Code; + ProductLocationResult vResult = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex); + sn = vResult.SN; } else { - if (vResult != null) - sn = vResult.SN; - else if(locaResult != null) - sn = locaResult.SN; + sn = locaResult.SN; } - curNozzle.Product = new TestProduct() { SN = sn, TestNum = 0, FromSlotIndex = waitTakeProductSlot.Index,From = $"R{waitTakeProductSlot.Row + 1}C{waitTakeProductSlot.Column + 1}" }; } + curNozzle.Product = new TestProduct() { SN = sn, TestNum = 0, FromSlotIndex = waitTakeProductSlot.Index, From = $"R{waitTakeProductSlot.Row + 1}C{waitTakeProductSlot.Column + 1}" }; + //ProductLocationResult vResult = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex); + //if (vResult!=null || locaResult!=null) + //{ + // string sn = string.Empty; + // if(GlobalVar.EnableVirtualBarCode) + // { + // sn = VirtualBarCode.Code; + // } + // else + // { + // if (scanBarCodeMode== EStockScanBarcodeMode.Multi) + // sn = vResult.SN; + // else + // sn = locaResult.SN; + // } + + //} } curNozzle.Status = ENozzleStatus.ToTest; //curNozzle.Status = ENozzleStatus.ToUnload; diff --git a/Rs.DeweyTester/Properties/AssemblyInfo.cs b/Rs.DeweyTester/Properties/AssemblyInfo.cs index d520d23..2656602 100644 --- a/Rs.DeweyTester/Properties/AssemblyInfo.cs +++ b/Rs.DeweyTester/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ using System.Runtime.InteropServices; // //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: - [assembly: AssemblyVersion("1.20.24.09")] + [assembly: AssemblyVersion("1.20.24.10")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Rs.DeweyTester/SysConfig/SelectProductFrm.cs b/Rs.DeweyTester/SysConfig/SelectProductFrm.cs index 2674f11..334fb6c 100644 --- a/Rs.DeweyTester/SysConfig/SelectProductFrm.cs +++ b/Rs.DeweyTester/SysConfig/SelectProductFrm.cs @@ -89,7 +89,7 @@ namespace Rs.MotionPlat.SysConfig //ret.SN= fixtureret.SN; //ret.OffsetX = fixtureret.OffsetX; //ret.OffsetY = fixtureret.OffsetY; - StockTakeFlow.Instance.Take( ETrayType.Grr, i + 1, 1, fixtureret,false); + StockTakeFlow.Instance.Take( ETrayType.Grr, i + 1, 1, EStockScanBarcodeMode.Single, fixtureret,false); TraySlot slot = GlobalTray.RetestTray.GetSlot(Rs.Controls.ESlotStatus.NotHave); StockPlaceFlow.Instance.Place(ETrayType.ReTest, slot.Index, 1,false); } diff --git a/Rs.DeweyTester/TestFrm.cs b/Rs.DeweyTester/TestFrm.cs index 154c487..2165d98 100644 --- a/Rs.DeweyTester/TestFrm.cs +++ b/Rs.DeweyTester/TestFrm.cs @@ -267,7 +267,7 @@ namespace Rs.MotionPlat ProductLocationResult fixtureret = FixedGrabProductFlow.Instance.TakePicture(ETrayType.Grr, slot.Index, 1); if(fixtureret!=null && (fixtureret.Result== EOneGrabSixteenResult.Ok || fixtureret.Result== EOneGrabSixteenResult.LocationOkScanBarcodeFail)) { - StockTakeFlow.Instance.Take(ETrayType.Grr, slot.Index, 1,fixtureret,false); + StockTakeFlow.Instance.Take(ETrayType.Grr, slot.Index, 1, EStockScanBarcodeMode.Single, fixtureret,false); GlobalTray.GrrTray.ChangeStatus(slot.Index, ESlotStatus.NotHave); slot = GlobalTray.RetestTray.GetSlot(ESlotStatus.NotHave); if(slot!=null)