增加是否扫码的参数

master
lhiven 1 year ago
parent e8c3c75ef9
commit 9be92165bc

@ -198,7 +198,7 @@ namespace Rs.MotionPlat.Flow.Camera
/// 检测周转盘放料是否OK /// 检测周转盘放料是否OK
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static VisionResult TurnoverTrayDumpProductOK(HObject image,bool bNeedLocation=true) public static VisionResult TurnoverTrayDumpProductOK(HObject image,bool bNeedLocation=true,bool bNeedScanBarcode=true)
{ {
upCameraScanBarCodeModel = new ModelParameter("周转盘产品定位"); upCameraScanBarCodeModel = new ModelParameter("周转盘产品定位");
VisionResult vr = new VisionResult(); VisionResult vr = new VisionResult();
@ -243,6 +243,8 @@ namespace Rs.MotionPlat.Flow.Camera
{ {
vr.SearchModelOK = true; vr.SearchModelOK = true;
} }
if(bNeedScanBarcode)
{
//只有定位成功的才去扫二维码 //只有定位成功的才去扫二维码
if (vr.SearchModelOK && !GlobalVar.EnableScanBarCodeByDownCamera) if (vr.SearchModelOK && !GlobalVar.EnableScanBarCodeByDownCamera)
{ {
@ -253,7 +255,7 @@ namespace Rs.MotionPlat.Flow.Camera
} }
else else
{ {
if(!Directory.Exists($"d://images/{DateTime.Now.ToString("yyyyMMdd")}")) if (!Directory.Exists($"d://images/{DateTime.Now.ToString("yyyyMMdd")}"))
{ {
Directory.CreateDirectory($"d://images/{DateTime.Now.ToString("yyyyMMdd")}"); Directory.CreateDirectory($"d://images/{DateTime.Now.ToString("yyyyMMdd")}");
} }
@ -262,6 +264,7 @@ namespace Rs.MotionPlat.Flow.Camera
vr.SN = sn; vr.SN = sn;
} }
} }
}
return vr; return vr;
} }

Loading…
Cancel
Save