From 09ec22f10de312b2458faebebeaad33490d7b6f6 Mon Sep 17 00:00:00 2001 From: wangsr Date: Mon, 18 Dec 2023 18:26:01 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=A4=A7=E4=BB=93=E6=96=99?= =?UTF-8?q?=E4=BD=8D=E6=98=BE=E7=A4=BA=E7=BA=A0=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LjDeliver/DeliverInitAction.cs | 33 ++++++++++--------- .../LjDeliverPressureSetting/InitAction.cs | 2 +- .../Test/TestAction.cs | 6 ++-- .../{DB120Help.cs => DB120Helper.cs} | 4 +-- DataBlockHelper/DataBlockHelper.csproj | 2 +- 5 files changed, 25 insertions(+), 22 deletions(-) rename DataBlockHelper/DBHelpers/{DB120Help.cs => DB120Helper.cs} (98%) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs index ed6aee3..9c03793 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs @@ -37,6 +37,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver DB90Helper DB90 = new DB90Helper(); DB91Helper DB91 = new DB91Helper(); DB137Helper DB137 = new DB137Helper(); + DB120Helper DB120 = new DB120Helper(); byte[] b1; byte[] b90; //db1/90的byte数组 @@ -189,21 +190,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver PlcTemp.PR3DBT03_Set = DB1.PR3DBT03.ACT_VALUE; PlcTemp.PR3DBT04_Set = DB1.PR3DBT04.ACT_VALUE; - PlcTemp.Bottle1_Set = DB1.LS1ASI01.ACT_VALUE; - PlcTemp.Bottle2_Set = DB1.LS1BSI01.ACT_VALUE; - PlcTemp.Bottle3_Set = DB1.LS1CSI01.ACT_VALUE; - PlcTemp.Bottle4_Set = DB1.LS1DSI01.ACT_VALUE; - PlcTemp.Bottle5_Set = DB1.LS1ESI01.ACT_VALUE; - PlcTemp.Bottle6_Set = DB1.LS1FSI01.ACT_VALUE; - PlcTemp.Bottle7_Set = DB1.LS1GSI01.ACT_VALUE; - PlcTemp.Bottle8_Set = DB1.LS1HSI01.ACT_VALUE; - PlcTemp.Bottle9_Set = DB1.LS1ISI01.ACT_VALUE; - PlcTemp.Bottle10_Set = DB1.LS1JSI01.ACT_VALUE; - PlcTemp.Bottle11_Set = DB1.LS1KSI01.ACT_VALUE; - PlcTemp.Bottle12_Set = DB1.LS1LSI01.ACT_VALUE; - PlcTemp.Bottle13_Set = DB1.LS1MSI01.ACT_VALUE; - PlcTemp.Bottle14_Set = DB1.LS1NSI01.ACT_VALUE; - PlcTemp.Bottle15_Set = DB1.LS1OSI01.ACT_VALUE; } private void DB90GetData() @@ -444,6 +430,23 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver PlcTemp.Atank4_Set = MReadHelp.Read()[3]; PlcTemp.Atank5_Set = MReadHelp.Read()[4]; PlcTemp.Atank6_Set = MReadHelp.Read()[5]; + + + PlcTemp.Bottle1_Set = DB120.SiloA; + PlcTemp.Bottle2_Set = DB120.SiloB; + PlcTemp.Bottle3_Set = DB120.SiloC; + PlcTemp.Bottle4_Set = DB120.SiloD; + PlcTemp.Bottle5_Set = DB120.SiloE; + PlcTemp.Bottle6_Set = DB120.SiloF; + PlcTemp.Bottle7_Set = DB120.SiloG; + PlcTemp.Bottle8_Set = DB120.SiloH; + PlcTemp.Bottle9_Set = DB120.SiloI; + PlcTemp.Bottle10_Set = DB120.SiloJ; + PlcTemp.Bottle11_Set = DB120.SiloK; + PlcTemp.Bottle12_Set = DB120.SiloL; + PlcTemp.Bottle13_Set = DB120.SiloM; + PlcTemp.Bottle14_Set = DB120.SiloN; + PlcTemp.Bottle15_Set = DB120.SiloO; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverPressureSetting/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverPressureSetting/InitAction.cs index 3ae395c..f37a9f9 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverPressureSetting/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverPressureSetting/InitAction.cs @@ -85,7 +85,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting private void SetValue() { - DB120Help dB120Help = new DB120Help(); + DB120Helper dB120Help = new DB120Helper(); var hd = dB120Help.GetUhd; slioEntity.TxtA.MCValue = hd.A.ToString(); slioEntity.TxtB.MCValue = hd.B.ToString(); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs index bb11e7c..728ec8e 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs @@ -80,10 +80,10 @@ namespace Mesnac.Action.ChemicalWeighing.Test private void MCButton_Click(object sender, EventArgs e) { - var s= new DB120Help().SiloO; + var s= new DB120Helper().SiloO; - s = new DB120Help().SiloJ; + s = new DB120Helper().SiloJ; DB120WriteHelp.AddABCDEF(new Uhd() { @@ -108,7 +108,7 @@ namespace Mesnac.Action.ChemicalWeighing.Test }); - DB120Help help1 = new DB120Help(); + DB120Helper help1 = new DB120Helper(); var user = help1.GetUhd; diff --git a/DataBlockHelper/DBHelpers/DB120Help.cs b/DataBlockHelper/DBHelpers/DB120Helper.cs similarity index 98% rename from DataBlockHelper/DBHelpers/DB120Help.cs rename to DataBlockHelper/DBHelpers/DB120Helper.cs index bf4cad9..7e8c1bb 100644 --- a/DataBlockHelper/DBHelpers/DB120Help.cs +++ b/DataBlockHelper/DBHelpers/DB120Helper.cs @@ -8,10 +8,10 @@ using System.Threading.Tasks; namespace DataBlockHelper.DBHelpers { - public class DB120Help: DBHelper + public class DB120Helper: DBHelper { - public DB120Help() { + public DB120Helper() { OperateResult db120 = PlcConnect.Instance.Read("DB120.0.0", 154); bytes = db120.Content; diff --git a/DataBlockHelper/DataBlockHelper.csproj b/DataBlockHelper/DataBlockHelper.csproj index 2875ee0..52db52a 100644 --- a/DataBlockHelper/DataBlockHelper.csproj +++ b/DataBlockHelper/DataBlockHelper.csproj @@ -50,7 +50,7 @@ - +