| | |
| | | |
| | | CommonUtil.mainForm.Invoke(new Action(() => CommonUtil.mainForm.AppendDetectionData(productNo))); |
| | | int detectID = CommonUtil.StepControl.GetDetectHeightID(); |
| | | string tempFileName = CommonUtil.mainForm.PlateID.ToString() + "_" + productNo.Trim().Replace("/", "").Replace("\"", "'") + "_" + DateTime.Now.ToString("HHmmssff") + "_" + detectID.ToString(); |
| | | |
| | | int slotNum = (CommonUtil.mainForm.PlateID + 1) % 5 + 1; |
| | | |
| | | string tempFileName = slotNum.ToString() + "_" + productNo.Trim().Replace("/", "").Replace("\"", "'") + "_" + DateTime.Now.ToString("HHmmssff") + "_" + detectID.ToString(); |
| | | if (productNo.Trim().Length == CommonUtil.ProductNoLength) |
| | | { |
| | | string productNoFileName = CommonUtil.ProductNoImageDir + @"\" + productNo + "_" + detectID.ToString(); |
| | |
| | | double compv = 0.0; |
| | | Type t = opcConfig.compensationZ.GetType(); |
| | | |
| | | int slotNum = (CommonUtil.mainForm.PlateID + 1) % 5 + 1; |
| | | |
| | | FieldInfo fi = t.GetField(string.Format("station{0}", slotNum)); |
| | | compv = (double)fi.GetValue(opcConfig.compensationZ); |
| | | |
| | |
| | | { |
| | | heightFileName = VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + $"_{heightResult.ToString()}\\{ tempFileName}"); |
| | | } |
| | | else |
| | | { |
| | | if (opcConfig.IsSaveHeightOKImage) |
| | | { |
| | | //DateTime dt = DateTime.Now; |
| | | |
| | | //if (dt.Second >= 10 && dt.Second <= 15) |
| | | { |
| | | VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"_OK\" + tempFileName); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | CommonUtil.WriteLog(LogType.Inf, string.Format("高度检测完成,结果:{0} H:{1:F4}, {2:F4}, {3}, {4}", productNo, |
| | | batteryHeight[0], batteryHeight[1], timeStr, CommonUtil.StepControl.ToString())); |
| | | } |