| | |
| | | //plcService.Close(); |
| | | //plcService.OpenService(); |
| | | } |
| | | string value_01 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】 |
| | | string value_01 = "";//注意:默认是FALSE 【Editby shaocx,2024-09-05】 |
| | | while (true) |
| | | { |
| | | threadStatusMonitor.ErrorMsg = ""; |
| | |
| | | //监控上线 |
| | | MonitorHelper.MonitorTestForLine(_dataCaptureConfig, value, colConfig, wplog.WorkPieceID); |
| | | } |
| | | if (wplog != null) |
| | | { |
| | | var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(wplog.WorkPieceID); |
| | | if (isRight) |
| | | { |
| | | #region 处理业务 |
| | | //if (wplog != null) |
| | | //{ |
| | | // var isRight = SystemBussinessHelper.ValidateIsRightWorkPieceID(wplog.WorkPieceID); |
| | | // if (isRight) |
| | | // { |
| | | #region 处理业务 |
| | | |
| | | if (value_01.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) |
| | | {//当上一标记位0,当前获取标记为1时, |
| | | //触发操作, 并给静态变量赋值为1 |
| | | //业务代码 |
| | | threadStatusMonitor.Threadlastmodifytime = DateTime.Now; |
| | | if (value_01.ToUpper().Equals("FALSE") && value.ToString().ToUpper().Equals("TRUE")) |
| | | {//当上一标记位0,当前获取标记为1时, |
| | | //触发操作, 并给静态变量赋值为1 |
| | | //业务代码 |
| | | threadStatusMonitor.Threadlastmodifytime = DateTime.Now; |
| | | |
| | | //特殊处理OP50 【Editby shaocx,2024-08-16】 |
| | | string sideValue = GetSideForOP50(plcService, wplog); |
| | | wplog.MonitoringPoint += sideValue; |
| | | //wplog.CreatedUserName = wplog.MonitoringPoint; |
| | | SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.MonitoringPoint, DataCapturePointCname); |
| | | //特殊处理OP50 【Editby shaocx,2024-08-16】 |
| | | string sideValue = GetSideForOP50(plcService, wplog); |
| | | wplog.MonitoringPoint += sideValue; |
| | | //wplog.CreatedUserName = wplog.MonitoringPoint; |
| | | SystemBussinessHelper.SetWorkPieceLogMiddleForCreatedUserName(ref wplog, wplog.MonitoringPoint, DataCapturePointCname); |
| | | |
| | | //读取二维码后更新数据库 |
| | | WorkPieceInfoManager.ReadQRcode(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), plcService, _dataCaptureConfig.IsFeedback); |
| | | //读取二维码后更新数据库 |
| | | WorkPieceInfoManager.ReadQRcode(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), plcService, _dataCaptureConfig.IsFeedback); |
| | | |
| | | threadStatusMonitor.Threadstatue = 1; |
| | | threadStatusMonitor.Threadstatue = 1; |
| | | |
| | | } |
| | | value_01 = value.ToString(); |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | | value_01 = value.ToString(); |
| | | |
| | | #endregion |
| | | // } |
| | | //} |
| | | } |
| | | threadStatusMonitor.Remarks = $"abcdefg:{RandomHelper.GenerateRandomCode(4)}"; |
| | | if (!_dataCaptureConfig.DataCaptureFrequency.HasValue || _dataCaptureConfig.DataCaptureFrequency < 10) |