From 14d60578cde48c0ea8debe4605ae4e29602bdd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Mon, 11 Dec 2023 16:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=8F=B0=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/PlcReadTempEntity.cs | 9 ++- .../MainDetailControlAction.cs | 61 +++++++++++++++---- 2 files changed, 56 insertions(+), 14 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs index 470f2b0..e40a240 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs @@ -71,9 +71,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public bool DMWETER7_Alarm { get; set; } public bool DMWETER8_Alarm { get; set; } - public int ValueWeight1 { get; set; } - public int ValueWeight2 { get; set; } - public int ValueWeight3 { get; set; } + public string ValueWeight1 { get; set; } + public string ValueWeight2 { get; set; } + public string ValueWeight3 { get; set; } public string ValueWeight4 { get; set; } public float topPressure_V1_Set { get; set; } @@ -139,10 +139,13 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public bool DM1MSF01_Set { get; set; } public bool DM1NSF01_Set { get; set; } public bool DM1OSF01_Set { get; set; } + + public bool DM2ASF01L_Set { get; set; } public bool DM2BSF01L_Set { get; set; } public bool DM2CSF01L_Set { get; set; } public bool DM2DSF01L_Set { get; set; } + public bool DM2ASF01R_Set { get; set; } public bool DM2BSF01R_Set { get; set; } public bool DM2CSF01R_Set { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index f800893..d6fbbf3 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -23,11 +23,7 @@ using System.Reflection; using DataBlockHelper; using System.Drawing; using Mesnac.Action.ChemicalWeighing.MinAn; -using HslCommunication.Core; using Mesnac.Action.ChemicalWeighing.FreeDb; -using Mesnac.Action.ChemicalWeighing.ManualControl; -using DevExpress.Pdf.Native; -using DevExpress.Utils.Drawing.Helpers; using Mesnac.Action.ChemicalWeighing.InterfaceDocking; using Mesnac.Action.ChemicalWeighing.Report; @@ -1069,7 +1065,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl if (DB2103.DM2ASF01.Running) { - if (DB2119.Spiral_A.Polarty) + if (DB2103.DM2ASF01.Polarity) { PlcReadTemp.DM2ASF01L_Set = true; PlcReadTemp.DM2ASF01R_Set = false; @@ -1088,9 +1084,11 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.DM2ASF01R_Set = false; } + + if (DB2103.DM2BSF01.Running) { - if (DB2119.Spiral_B.Polarty) + if (DB2103.DM2BSF01.Polarity) { PlcReadTemp.DM2BSF01L_Set = true; PlcReadTemp.DM2BSF01R_Set = false; @@ -1109,9 +1107,11 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.DM2BSF01R_Set = false; } + + if (DB2103.DM2CSF01.Running) { - if (DB2119.Spiral_C.Polarty) + if (DB2103.DM2CSF01.Polarity) { PlcReadTemp.DM2CSF01L_Set = true; PlcReadTemp.DM2CSF01R_Set = false; @@ -1130,6 +1130,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.DM2CSF01R_Set = false; } + + + + if (DB2103.DM2DSF01.Running) { if (DB2103.DM2DSF01.Polarity) @@ -1234,6 +1238,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl SetRSCREWBIG(RSCREE.DM1OSF01, PlcReadTemp.DM1OSF01_Set); SetLSCREWBIG(LSCREE.DM2ASF01L, PlcReadTemp.DM2ASF01L_Set); SetLSCREWBIG(LSCREE.DM2BSF01L, PlcReadTemp.DM2BSF01L_Set); + SetLSCREWBIG(LSCREE.DM2CSF01L, PlcReadTemp.DM2CSF01L_Set); SetLSCREWBIG(LSCREE.DM2DSF01L, PlcReadTemp.DM2DSF01L_Set); SetRSCREWBIG(RSCREE.DM2ASF01R, PlcReadTemp.DM2ASF01R_Set); @@ -1444,9 +1449,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.PM1KDF01_Set = DB2107.Valve.PM1KDF01; PlcReadTemp.PM1LDF01_Set = DB2107.Valve.PM1LDF01; - PlcReadTemp.ValueWeight1 = DB2119.Spiral_A.Value_Weight; - PlcReadTemp.ValueWeight2 = DB2119.Spiral_B.Value_Weight; - PlcReadTemp.ValueWeight3 = DB2119.Spiral_C.Value_Weight; + //PlcReadTemp.ValueWeight1 = DB2119.Spiral_A.Value_Weight; + //PlcReadTemp.ValueWeight2 = DB2119.Spiral_B.Value_Weight; + //PlcReadTemp.ValueWeight3 = DB2119.Spiral_C.Value_Weight; //yang 4特殊处理下 采用2107 @@ -1457,8 +1462,42 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl //} //else //{ - + //} + + //DM2ASF01L_Set + + if (PlcReadTemp.DM2ASF01L_Set) + { + PlcReadTemp.ValueWeight1 = DB2107.Weter[0].FeedValue.ToString("0.#"); + } + else + { + PlcReadTemp.ValueWeight1 = DB2107.Weter[1].FeedValue.ToString("0.#"); + } + + // + if (PlcReadTemp.DM2BSF01L_Set) + { + PlcReadTemp.ValueWeight2 = DB2107.Weter[2].FeedValue.ToString("0.#"); + } + else + { + PlcReadTemp.ValueWeight2 = DB2107.Weter[3].FeedValue.ToString("0.#"); + } + + + + if (PlcReadTemp.DM2CSF01L_Set) + { + PlcReadTemp.ValueWeight3 = DB2107.Weter[4].FeedValue.ToString("0.#"); + } + else + { + PlcReadTemp.ValueWeight3 = DB2107.Weter[5].FeedValue.ToString("0.#"); + } + + if (PlcReadTemp.DM2DSF01L_Set) {