schangxiang@126.com
2024-08-26 19036333fec441fa79f7865691d85a9e545e29b8
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_01.cs
@@ -293,10 +293,15 @@
        {
            try
            {
                if (!(DataCapturePointCode.Contains("OP5001A") || DataCapturePointCode.Contains("OP5001B")))
                {
                    return "";
                }
                object value_M88 = plcService.ReadValuePointV2("M88", PLCManger.GetTypeForString("int"));
                int i_value_M88 = 0;
                var isRight = int.TryParse(value_M88.ToString(), out i_value_M88);
                Log4NetHelper.WriteInfoLog(PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), $"读取 {DataCapturePointCode}工序监控测量标记数据,获取OP50的哪个面,i_value_M88:{i_value_M88},工件号:{wplog.WorkPieceID}");
                Log4NetHelper.WriteInfoLog(LogType.MonitorOP50Side, $"读取 {DataCapturePointCode}工序监控测量标记数据,获取OP50的哪个面,i_value_M88:{i_value_M88},工件号:{wplog.WorkPieceID}");
                if (isRight)
                {
                    if (i_value_M88 == 64)
@@ -320,12 +325,12 @@
                        return "4";
                    }
                }
                Log4NetHelper.WriteErrorLog(PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), $"读取 {DataCapturePointCode}工序监控测量标记数据时,无效数值,获取OP50的哪个面,,i_value_M88:{i_value_M88},工件号:{wplog.WorkPieceID}", null);
                Log4NetHelper.WriteErrorLog(LogType.MonitorOP50Side, $"读取 {DataCapturePointCode}工序监控测量标记数据时,无效数值,获取OP50的哪个面,,i_value_M88:{i_value_M88},工件号:{wplog.WorkPieceID}", null);
                return "";
            }
            catch (Exception ex)
            {
                Log4NetHelper.WriteErrorLog(PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure), $"读取 {DataCapturePointCode}工序监控测量标记数据时异常,获取OP50的哪个面,工件号:{wplog.WorkPieceID}", ex);
                Log4NetHelper.WriteErrorLog(LogType.MonitorOP50Side, $"读取 {DataCapturePointCode}工序监控测量标记数据时异常,获取OP50的哪个面,工件号:{wplog.WorkPieceID}", ex);
                return "";
            }
        }