diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index 31681bd..9e30b81 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -283,10 +283,11 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]); } ReadFlag += 1; - if(ReadFlag >= 10) + if(ReadFlag >= 30) { ReadFlag = 0; ReportReadDb.ReadFeededDry(); + } var reachSingle = RgvPlcUtil.GetRGVAllError(); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs index 2277add..206a36c 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs @@ -35,7 +35,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report /// public static void ReadFeededDry() { - LoggingService.Debug("读取加料信息" + DateTime.Now.ToString()); + DB2105Helper dB2105Helper = new DB2105Helper(); List list = dB2105Helper.FeededDryList(); @@ -58,7 +58,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report public static void ReadReport() { - LoggingService.InfoFormatted("开始读取报表"); + DB2107Helper dB2107Helper = new DB2107Helper(); NormalStatusEntity normal = dB2107Helper.NormalStatus; if (normal.RdyRpt_D1) diff --git a/DataBlockHelper/Entity/DB2119Entity/SprialTempEntity.cs b/DataBlockHelper/Entity/DB2119Entity/SprialTempEntity.cs index 8250f8c..6b13e02 100644 --- a/DataBlockHelper/Entity/DB2119Entity/SprialTempEntity.cs +++ b/DataBlockHelper/Entity/DB2119Entity/SprialTempEntity.cs @@ -12,6 +12,11 @@ namespace DataBlockHelper.Entity.DB2119Entity { // OperateResult read = PlcConnect.Instance.Read("DB2102." + startSet + ".0", 2); + if(null== bytes) + { + return; + } + byte[] content = bytes.Skip(startSet).Take(22).ToArray(); Value_Set = PlcConnect.Instance.ByteTransform.TransInt16(content, 0); diff --git a/DataBlockHelper/Entity/DB2119Entity/WaterTempEntity.cs b/DataBlockHelper/Entity/DB2119Entity/WaterTempEntity.cs index ca3ebcc..0f1e753 100644 --- a/DataBlockHelper/Entity/DB2119Entity/WaterTempEntity.cs +++ b/DataBlockHelper/Entity/DB2119Entity/WaterTempEntity.cs @@ -12,6 +12,10 @@ namespace DataBlockHelper.Entity.DB2119Entity { // OperateResult read = PlcConnect.Instance.Read("DB2102." + startSet + ".0", 2); + if(null == bytes) + { + return; + } byte[] content = bytes.Skip(startSet).Take(10).ToArray(); Value_Set = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);