| | |
| | | } |
| | | |
| | | |
| | | public void PlcwritePrinter(int add,int value) |
| | | public void PlcwritePrinter(int add, int value) |
| | | { |
| | | Plc2.WriteSingleAddress(add,value,out _); |
| | | Plc2.WriteSingleAddress(add, value, out _); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"产品{pid}检测项{s.Code}赋值{s.GetMeasureValueStr()},结果{s.GetMeasureResultStr()}"); |
| | | } |
| | | else |
| | |
| | | { |
| | | 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()); |
| | |
| | | { |
| | | defects.Add("TBD"); |
| | | } |
| | | |
| | | |
| | | defects = defects.Distinct().ToList(); |
| | | |
| | | isOK = defects.Count <= 0; |
| | |
| | | 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)); |