| | |
| | | |
| | | if (heightResult != MeasureState.OK) |
| | | { |
| | | |
| | | if (CommonUtil.DetectionOption == DetectionOption.doStandardBlock) |
| | | { |
| | | VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"\" + tempFileName); |
| | | } |
| | | else |
| | | { |
| | | heightFileName = VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + $"_{heightResult.ToString()}\\{ tempFileName}"); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (opcConfig.IsSaveHeightOKImage || CommonUtil.DetectionOption == DetectionOption.doStandardBlock) |
| | | { |
| | | //DateTime dt = DateTime.Now; |
| | | |
| | | //if (dt.Second >= 10 && dt.Second <= 15) |
| | | if (CommonUtil.DetectionOption == DetectionOption.doStandardBlock) |
| | | { |
| | | VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"\" + tempFileName); |
| | | } |
| | | else |
| | | { |
| | | VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"_OK\" + tempFileName); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | ms = MeasureState.OK; |
| | | |
| | | if (opcConfig.IsSaveSizeOKImage || CommonUtil.DetectionOption == DetectionOption.doStandardBlock) |
| | | if (opcConfig.IsSaveSizeOKImage) |
| | | { |
| | | DateTime dt = DateTime.Now; |
| | | |
| | |
| | | if (lengthMeasureState == MeasureState.OK && widthMeasureState == MeasureState.OK) |
| | | { |
| | | ms = MeasureState.OK; |
| | | //VisionDetect.SaveImageAs(hImage, CommonUtil.ScreenshotsDir + @"\" + tempFileName); |
| | | VisionDetect.SaveImageAs(hImage, CommonUtil.ScreenshotsDir + @"\" + tempFileName); |
| | | VisionDetect.SaveImageAs(hImage, CommonUtil.ProductSizeImageDir + @"\" + tempFileName); |
| | | } |
| | | else |
| | | { |
| | | ms = MeasureState.NG; |
| | | fileName = VisionDetect.SaveImageAs(hImage, CommonUtil.ScreenshotsDir + @"_NG\" + tempFileName); |
| | | VisionDetect.SaveImageAs(hImage, CommonUtil.ProductSizeImageDir + @"\" + tempFileName); |
| | | } |
| | | } |
| | | |