| | |
| | | var value = plcService.ReadValuePoint(_dataCaptureConfig.DbNumber, _dataCaptureConfig.Offset, PLCManger.GetTypeForString(_dataCaptureConfig.DataCaptureColumnType)); |
| | | stopwatch.Stop(); |
| | | Log4NetHelper.WriteInfoLog(PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), $" {DataCapturePointCode}工序测标记读取{DateTime.Now}*****01****{stopwatch.ElapsedMilliseconds}*****{value.ToString().ToUpper()}**"); |
| | | |
| | | WorkPieceLogMiddle wplog = null; |
| | | if (value.ToString().ToUpper().Equals("TRUE")) |
| | | var value_bool = value.ToString().ToUpper().Equals("TRUE"); |
| | | if (value_bool) |
| | | { |
| | | threadStatusMonitor.Threadlastmodifytime = DateTime.Now; |
| | | wplog = new WorkPieceLogMiddle(); |
| | |
| | | //监控上线 |
| | | MonitorHelper.MonitorTestForLine(_dataCaptureConfig, value, colConfig, wplog.WorkPieceID); |
| | | } |
| | | if (wplog != null) |
| | | { |
| | | var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(wplog.WorkPieceID); |
| | | if (isRight) |
| | | { |
| | | #region 业务处理 |
| | | |
| | | if (SystemValue.value_OP1003.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) |
| | | {//当上一标记位0,当前获取标记为1时, |
| | | //触发操作, 并给静态变量赋值为1 |
| | |
| | | } |
| | | SystemValue.value_OP1003 = value.ToString(); |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | | |
| | | } |
| | | SystemValue.lbl_Alert_OP1003 = $"abcdefg:{RandomHelper.GenerateRandomCode(4)}"; |
| | | if (!_dataCaptureConfig.DataCaptureFrequency.HasValue || _dataCaptureConfig.DataCaptureFrequency < 10) |
| | | { |
| | | Thread.Sleep(5000); |
| | | Thread.Sleep(700); |
| | | } |
| | | else |
| | | { |