料仓取料方法增加单拍还是飞拍的参数

master
lhiven 10 months ago
parent f3660de4cf
commit 5ffecdc4f6

@ -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)
{

@ -25,6 +25,12 @@ namespace Rs.MotionPlat.Flow.SubFlow
,
}
public enum EStockScanBarcodeMode
{
Multi,
Single
}
/// <summary>
/// 料仓取料流程
/// </summary>
@ -60,7 +66,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// 料仓取料
/// </summary>
/// <param name="className"></param>
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,15 +101,15 @@ 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
{
ProductLocationResult result = OneGrabSixteenManager.Instance.GetResultBySlotIndex(waitTakeProductSlot.Index);
if (!GlobalVar.RunSpace)
{
//MessageQueue.Instance.Insert($"拍照偏移量 x:{result.OffsetX},y:{result.OffsetY}");
@ -188,9 +194,6 @@ namespace Rs.MotionPlat.Flow.SubFlow
curNozzle.Product = new TestProduct() { SN = VirtualBarCode.Code, FromSlotIndex = waitTakeProductSlot.Index, TestNum = 0, From = $"R{waitTakeProductSlot.Row + 1}C{waitTakeProductSlot.Column + 1}" };
}
else
{
ProductLocationResult vResult = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex);
if (vResult!=null || locaResult!=null)
{
string sn = string.Empty;
if(GlobalVar.EnableVirtualBarCode)
@ -199,13 +202,34 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
if (vResult != null)
if (scanBarCodeMode == EStockScanBarcodeMode.Multi)
{
ProductLocationResult vResult = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex);
sn = vResult.SN;
else if(locaResult != null)
}
else
{
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;

@ -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")]

@ -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);
}

@ -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)

Loading…
Cancel
Save