| | |
| | | } |
| | | |
| | | public PLCBase Plc1; |
| | | PLCBase Plc2; |
| | | Thread ThHeartPlc; |
| | | public override void Open() |
| | | { |
| | | base.Open(); |
| | | |
| | | ML = DeviceCollection.FirstOrDefault(u => u is MachineLearningBase) as MachineLearningBase; |
| | | if (ML == null) |
| | | { |
| | |
| | | Thread.Sleep(3000); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 网络预热 |
| | |
| | | else |
| | | { |
| | | p.BasketCode = mysqlhelper.Getbasketcode(p.SEQUENCE); |
| | | if ("NoRead".Equals(p.BasketCode)) |
| | | { |
| | | LogAsync(DateTime.Now, EnumHelper.LogLevel.Error, $"{p.PID}_{p.SEQUENCE}获取框具码失败 赋值Noread"); |
| | | } |
| | | } |
| | | |
| | | mysqlhelper.NewProduct(p); |
| | |
| | | var errorSpec = _errorSpec.Copy(); |
| | | errorSpec.Code = "检测TBD"; |
| | | errorSpec.ActualValue = -999; |
| | | DetectResult ngResult = new DetectResult() { Specs = new List<ISpec>() { errorSpec }, PID = u.Key }; |
| | | DetectResult ngResult = new DetectResult() { Specs = new List<ISpec>() { errorSpec }, PID = u.Key ,Id=Guid.NewGuid().ToString()}; |
| | | ngResults.Add(ngResult); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | detectResults.AddRange(ngResults); |
| | | resultList.AddRange(detectResults); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | RunCustomizedMethod(products, triggerText, triggerSource, imgSet, measureBind.CustomizedMonitorId, resultList); |
| | | RunCustomizedMethod(products, triggerText, triggerSource, imgSet, measureBind.CustomizedCombineMethodId, resultList); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | CSVRecordAsync($"{positionName}_Record_{DateTime.Now.ToString("yyyyMMdd")}.csv", data, head); |
| | | |
| | | //UpdatePositionResultToDB(detail); |
| | | var seqData = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | //var seqData = p.SEQUENCE.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | |
| | | mysqlhelper.UpdateProduct(p); |
| | | if (positionSet.IsLastPosition) |