|
|
|
@ -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,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;
|
|
|
|
|