From fa6c67e67fcdbc6830f0d3c2841827f032243880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Sat, 9 Dec 2023 09:01:48 +0800 Subject: [PATCH] =?UTF-8?q?7=208=E5=8F=B7=E7=9A=84=E6=B9=BF=E6=B7=B7?= =?UTF-8?q?=E6=9C=BA=E5=99=A8=E6=98=BE=E7=A4=BA=E7=A7=B0=E9=87=8F=E4=BD=8D?= =?UTF-8?q?=E6=95=B0=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/PlcReadTempEntity.cs | 2 +- .../MainDetailControlAction.cs | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs index df65f10..470f2b0 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs @@ -74,7 +74,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public int ValueWeight1 { get; set; } public int ValueWeight2 { get; set; } public int ValueWeight3 { get; set; } - public int ValueWeight4 { get; set; } + public string ValueWeight4 { get; set; } public float topPressure_V1_Set { get; set; } public float topPressure_V2_Set { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index 9c5c60d..5d8e6e6 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -1440,25 +1440,27 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl //yang 4特殊处理下 采用2107 - if (!PlcReadTemp.DM2DSF01L_Set && !PlcReadTemp.DM2DSF01R_Set) - { - PlcReadTemp.ValueWeight4 = 0; - } - else - { + //if (!PlcReadTemp.DM2DSF01L_Set && !PlcReadTemp.DM2DSF01R_Set) + //{ + // PlcReadTemp.ValueWeight4 = "0"; + //} + //else + //{ - } - + //} if (PlcReadTemp.DM2DSF01L_Set) { - PlcReadTemp.ValueWeight4 = Convert.ToInt32(DB2107.Weter[6].FeedValue.ToString()); + + PlcReadTemp.ValueWeight4 = DB2107.Weter[6].FeedValue.ToString("0.#"); } else { - PlcReadTemp.ValueWeight4 = Convert.ToInt32(DB2107.Weter[7].FeedValue.ToString()); + + PlcReadTemp.ValueWeight4 = DB2107.Weter[7].FeedValue.ToString("0.#"); } + SetMCLabel(LabelE.ValueWeight1, PlcReadTemp.ValueWeight1); SetMCLabel(LabelE.ValueWeight2, PlcReadTemp.ValueWeight2); SetMCLabel(LabelE.ValueWeight3, PlcReadTemp.ValueWeight3);