| | |
| | | timeStr, CommonUtil.StepControl.ToString())); |
| | | |
| | | HObject hImage = null; |
| | | string tempFileName = ""; |
| | | try |
| | | { |
| | | Thread.Sleep(50); |
| | |
| | | { |
| | | return; |
| | | } |
| | | string tempFileName = GetCurrentProductSN(detectID); |
| | | tempFileName = GetCurrentProductSN(detectID); |
| | | string productNo = GetProductNo(detectID); |
| | | |
| | | int times = 3; |
| | |
| | | { |
| | | ms = MeasureState.OK; |
| | | |
| | | if (opcConfig.IsSaveSizeOKImage) |
| | | if (opcConfig.IsSaveSizeOKImage || CommonUtil.DetectionOption == DetectionOption.doStandardBlock) |
| | | { |
| | | DateTime dt = DateTime.Now; |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | Type t = opcConfig.standardCompensationL.GetType(); |
| | | Type t = opcConfig.compensationL.GetType(); |
| | | FieldInfo fi = t.GetField(string.Format("station{0}", CommonUtil.mainForm.PlateID)); |
| | | compL = (double)fi.GetValue(opcConfig.standardCompensationL); |
| | | compL = (double)fi.GetValue(opcConfig.compensationL); |
| | | |
| | | t = opcConfig.standardCompensationW.GetType(); |
| | | t = opcConfig.compensationW.GetType(); |
| | | fi = t.GetField(string.Format("station{0}", CommonUtil.mainForm.PlateID)); |
| | | compW = (double)fi.GetValue(opcConfig.standardCompensationW); |
| | | compW = (double)fi.GetValue(opcConfig.compensationW); |
| | | |
| | | btyLength += compL; |
| | | btyWidth += compW; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | CommonUtil.WriteLog(LogType.Exc, string.Format("产品尺寸检测出现异常:{0}", ex.Message)); |
| | | fileName = VisionDetect.SaveImageAs(hImage, $"{CommonUtil.ProductSizeImageDir}_NA\\{tempFileName}"); |
| | | } |
| | | finally |
| | | { |