kingno
2025-06-09 305e2990bb2161177e87ab7711f9dfb205762bcd
src/Bro.M141.Process/M141Process_ImageCheck.cs
@@ -516,9 +516,9 @@
        }
        public void PlcwritePrinter(int add,int value)
        public void PlcwritePrinter(int add, int value)
        {
            Plc2.WriteSingleAddress(add,value,out _);
            Plc2.WriteSingleAddress(add, value, out _);
        }
@@ -583,8 +583,6 @@
                        }
                    }
                    LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"产品{pid}检测项{s.Code}赋值{s.GetMeasureValueStr()},结果{s.GetMeasureResultStr()}");
                }
                else
@@ -607,6 +605,15 @@
        {
            isOK = false;
            int num = 0;
            while (p.Details.Any(u => !u.IsDone) && num < 10)
            {
                num++;
                Thread.Sleep(500);
            }
            p.InitialDetailSpecs();
            var resultList = p.Details.SelectMany(u => u.ResultList).ToList();
            resultList.ForEach(u => u.SetResult());
@@ -622,6 +629,8 @@
            {
                defects.Add("TBD");
            }
            defects = defects.Distinct().ToList();
            isOK = defects.Count <= 0;
@@ -631,7 +640,7 @@
            UpdateResult(DateTime.Now, p.SN, defectClass.ClassName, "");
            //产品序号+1
            Interlocked.Increment(ref _productIndex);
            //Interlocked.Increment(ref _productIndex);
            List<ISpec> specList = new List<ISpec>();
            specList.AddRange(p.Details.SelectMany(u => u.SpecList).ToList().ConvertAll(u => (ISpec)u));