schangxiang@126.com
2024-09-05 dc054fdab657fc1ed91be0c81cc5c1e8f76117f0
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/Special/DataCaptureHandler_OP1003.cs
@@ -89,8 +89,10 @@
                            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();
@@ -136,6 +138,13 @@
                                //监控上线
                                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
@@ -166,12 +175,15 @@
                            }
                            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
                        {