| | |
| | | ManualResetEvent set2 = new ManualResetEvent(false); |
| | | |
| | | |
| | | public event Action<string> StartPrinter; |
| | | |
| | | |
| | | [ProcessMethod("ImageCheck", "ImageCheckOperation", "通用图片检测操作", InvokeType.TestInvoke)] |
| | | public ResponseMessage ImageCheckOperation(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice) |
| | |
| | | Plc1.WriteSingleAddress(1526, mysqlhelper.GetS2Result(productList[0].SEQUENCE) ? 1 : 2, out _); |
| | | |
| | | LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"产品{string.Join(",", productList.Select(u => u.PID))}检测反馈{mysqlhelper.GetS2Result(productList[0].SEQUENCE)}"); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | ResponseMessage msg = new ResponseMessage(); |
| | | |
| | | Plc2 = invokeDevice as PLCBase; |
| | | string message = ""; |
| | | StartPrinter.Invoke(message); |
| | | string message = "nothing"; |
| | | StartPrint(message); |
| | | return msg; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | private void UpdateProductResultAsync(ProductModel p) |
| | | private void UpdateProductResultAsync(ProductModel p, string name) |
| | | { |
| | | UpdateProductResult(p, out bool isOK); |
| | | |
| | | _taskFactory.StartNew(() => |
| | | { |
| | | _csvHead = p.GetCSVHead(ref _specHeadList, ref _positionList); |
| | | CSVRecordAsync($"ProductRecord_{DateTime.Now.ToString("yyyyMMdd")}.csv", p.GetCSVData(_specHeadList, _positionList), _csvHead); |
| | | //CSVRecordAsync($"ProductRecord_{DateTime.Now.ToString("yyyyMMdd")}.csv", p.GetCSVData(_specHeadList, _positionList), _csvHead); |
| | | CSVRecordAsync(name, p.GetCSVData(_specHeadList, _positionList), _csvHead); |
| | | //_manager_P_Product.UpdateProductResult(p.ID, p.PID, p.SN, p.Result); |
| | | }); |
| | | |
| | | //连续NG数据记录 |
| | | CheckContinuousNGAlarmAsync(p); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |