diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs index d3e9c4a..1258749 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs @@ -244,11 +244,12 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl DB2104Helper dB2104Helper = new DB2104Helper(); - var data = GetTable(); - ComboE.CALeftOrRight.DataSource = data.Copy(); - ComboE.HALeftOrRight.DataSource = data.Copy(); - ComboE.CBLeftOrRight.DataSource = data.Copy(); - ComboE.HBLeftOrRight.DataSource = data.Copy(); + var dataA = GetTableA(); + var dataB = GetTableB(); + ComboE.CALeftOrRight.DataSource = dataA.Copy(); + ComboE.HALeftOrRight.DataSource = dataA.Copy(); + ComboE.CBLeftOrRight.DataSource = dataB.Copy(); + ComboE.HBLeftOrRight.DataSource = dataB.Copy(); var ha = dB2104Helper.GetAHotWater; TextE.HADeviation.MCValue = ha.differ; @@ -269,23 +270,41 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl } - private DataTable GetTable() + private DataTable GetTableA() { - DataTable dataTable = new System.Data.DataTable(); + var dataTable = GetDefaultTable(); + DataRow dr = dataTable.NewRow(); + + dr[0] = "2"; + dr[1] = "1,2"; + dataTable.Rows.Add(dr); + dr = dataTable.NewRow(); + dr[0] = "1"; + dr[1] = "3,4"; + dataTable.Rows.Add(dr); + + return dataTable; + } + + private DataTable GetDefaultTable() + { + DataTable dataTable = new DataTable(); dataTable.Columns.Add("CmbValue", typeof(string)); dataTable.Columns.Add("CmbDisplay", typeof(string)); + return dataTable; + } + private DataTable GetTableB() + { + + var dataTable = GetDefaultTable(); DataRow dr = dataTable.NewRow(); - dr[0] = "0"; - dr[1] = "无"; + dr[0] = "2"; + dr[1] = "5,6"; dataTable.Rows.Add(dr); dr = dataTable.NewRow(); dr[0] = "1"; - dr[1] = "左"; - dataTable.Rows.Add(dr); - dr = dataTable.NewRow(); - dr[0] = "2"; - dr[1] = "右"; + dr[1] = "7,8"; dataTable.Rows.Add(dr); return dataTable; diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index d66c5d6..bec03f5 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -4,7 +4,6 @@ using Mesnac.Controls.Base; using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; using Mesnac.Controls.Feeding; -using Mesnac.Core.Service; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -30,6 +29,7 @@ using Mesnac.Action.ChemicalWeighing.ManualControl; using DevExpress.Pdf.Native; using DevExpress.Utils.Drawing.Helpers; using Mesnac.Action.ChemicalWeighing.InterfaceDocking; +using Mesnac.Action.ChemicalWeighing.Report; namespace Mesnac.Action.ChemicalWeighing.MainDetailControl { @@ -50,6 +50,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl int LineKindFlag = 0; + //读取报表 + ushort ReadFlag = 0; + //DataTable ParametersWithPCTable = new DataTable(); //所有Alarm点位 @@ -283,6 +286,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl ControlsHelper.SetMCLabel(LabelE.LineKind7, dict[7]); ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]); } + ReadFlag += 1; + if(ReadFlag >= 60) + { + ReadFlag = 0; + ReportReadDb.ReadFeededDry(); + } var reachSingle = RgvPlcUtil.GetRGVAllError(); var mixSingle = Db3000Helper.ReadDb(); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs index b3f936f..ffbb5ed 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/ReportReadDb.cs @@ -50,13 +50,8 @@ namespace Mesnac.Action.ChemicalWeighing.Report // 螺旋1启动向湿混机1 string logName = $"螺旋{deviceno}启动向湿混机{i + 1}"; LoggingService.Info(logName); - - - var value = Convert.ToInt32(Convert.ToDouble(feedValue)); - ManualLogControl(logName, value, 5, i + 1); - DB2105WriteHelper.WriteFalseFeededDry(i + 1); } }