|
|
|
@ -77,6 +77,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
|
|
|
|
|
public event Action<List<MatchResult>> OnMatchResult;
|
|
|
|
|
public event Action<List<VisionResult>> OnUpCameraGrabResult;
|
|
|
|
|
public event Action<VisionResult,bool> OnShowGrabResult;
|
|
|
|
|
public static DischargeFlow Instance
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
@ -1475,6 +1476,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
{
|
|
|
|
|
if(vr.ScanBarCodeOK)
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(vr,true);
|
|
|
|
|
//复制二维码
|
|
|
|
|
LoadAndUnloadTask.Instance.CopyBarcodeToTask(vr.SlotIndex-1, vr.SN);
|
|
|
|
|
}
|
|
|
|
@ -1485,10 +1487,12 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
VisionResult vrsigle = UpCameraScanBarCodeFlow.Instance.WaitSingle();
|
|
|
|
|
if(vrsigle.ScanBarCodeOK)
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(vrsigle, true);
|
|
|
|
|
LoadAndUnloadTask.Instance.CopyBarcodeToTask(vr.SlotIndex - 1, vr.SN);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(vrsigle, true);
|
|
|
|
|
//复制二维码
|
|
|
|
|
LoadAndUnloadTask.Instance.CopyBarcodeToTask(vr.SlotIndex - 1, "");
|
|
|
|
|
}
|
|
|
|
@ -1501,8 +1505,12 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
//定位失败,或者超出指定范围
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(new VisionResult(),false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
OnUpCameraGrabResult?.Invoke(result);
|
|
|
|
|
//OnUpCameraGrabResult?.Invoke(result);
|
|
|
|
|
}
|
|
|
|
|
//判断周转盘第三行有没有产品,如果有产品则拍第三行
|
|
|
|
|
if (TurnoverTrayManager.Instance.HasProduct(ETrayRow.Three))
|
|
|
|
@ -1529,6 +1537,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
{
|
|
|
|
|
if (vr.ScanBarCodeOK)
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(vr, true);
|
|
|
|
|
//复制二维码
|
|
|
|
|
LoadAndUnloadTask.Instance.CopyBarcodeToTask(vr.SlotIndex- 1, vr.SN);
|
|
|
|
|
}
|
|
|
|
@ -1539,10 +1548,12 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
VisionResult vrsigle = UpCameraScanBarCodeFlow.Instance.WaitSingle();
|
|
|
|
|
if (vrsigle.ScanBarCodeOK)
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(vrsigle,true);
|
|
|
|
|
LoadAndUnloadTask.Instance.CopyBarcodeToTask(vr.SlotIndex - 1, vr.SN);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(vrsigle,true);
|
|
|
|
|
//复制二维码
|
|
|
|
|
LoadAndUnloadTask.Instance.CopyBarcodeToTask(vr.SlotIndex - 1, "");
|
|
|
|
|
}
|
|
|
|
@ -1555,8 +1566,12 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
//定位失败,或者超出指定范围
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
OnShowGrabResult?.Invoke(new VisionResult(),false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
OnUpCameraGrabResult?.Invoke(result);
|
|
|
|
|
//OnUpCameraGrabResult?.Invoke(result);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|