From 1d212af857844913fd82aee0dcae728b38a48d3f 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, 18 Dec 2023 16:29:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BE=93=E9=80=81=E7=BA=BF=E5=8E=8B?= =?UTF-8?q?=E5=8A=9B=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml b/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml index 1c7b5b0..e6e1157 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml @@ -396,7 +396,7 @@ 95, 12 False - 输送钱压力设置 + 输送线压力设置 宋体, 12pt 420, 343 GroupBox6 From 1f5bb30a387a528ce4ba97fc5c66d3ec84e86030 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, 18 Dec 2023 16:32:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=9C=80=E6=94=B9=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Data/MCProject/nodeForm/DeliverPressureSetting.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml b/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml index e6e1157..77b3fb5 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/DeliverPressureSetting.xml @@ -38,11 +38,11 @@ None True True - 压力下限 + 主气源压力下限 宋体, 9pt 18, 336 MCLabel78 - 53, 12 + 89, 12 @@ -81,11 +81,11 @@ None True True - 压力上限 + 主气源压力上限 宋体, 9pt 18, 296 MCLabel79 - 53, 12 + 89, 12 From 33efbf0661afbf926fc4e77c9d3f3935d888c013 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, 18 Dec 2023 16:41:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=AF=BB=E5=8F=96M=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Test/TestAction.cs | 3 ++ DataBlockHelper/DBHelpers/MReadHelp.cs | 34 +++++++++++++++++++ DataBlockHelper/DataBlockHelper.csproj | 1 + 3 files changed, 38 insertions(+) create mode 100644 DataBlockHelper/DBHelpers/MReadHelp.cs diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs index e12339a..f179d0b 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs @@ -79,6 +79,9 @@ namespace Mesnac.Action.ChemicalWeighing.Test private void MCButton_Click(object sender, EventArgs e) { + + var list= MReadHelp.Read(); + DB120WriteHelp.AddABCDEF(new Uhd() { A = 60, diff --git a/DataBlockHelper/DBHelpers/MReadHelp.cs b/DataBlockHelper/DBHelpers/MReadHelp.cs new file mode 100644 index 0000000..f74a6f9 --- /dev/null +++ b/DataBlockHelper/DBHelpers/MReadHelp.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DataBlockHelper.DBHelpers +{ + public class MReadHelp + { + + + + public static List Read() + { + var p= PlcConnect.Instance; + string m = "M1003.4"; + List result = new List(); + result.Add(p.ReadBool("M1003.4").Content); + result.Add(p.ReadBool("M1004.4").Content); + + result.Add(p.ReadBool("M1006.4").Content); + result.Add(p.ReadBool("M1007.4").Content); + + + result.Add(p.ReadBool("M1009.4").Content); + result.Add(p.ReadBool("M1010.4").Content); + + return result; + } + + + } +} diff --git a/DataBlockHelper/DataBlockHelper.csproj b/DataBlockHelper/DataBlockHelper.csproj index 8071e18..64a8b65 100644 --- a/DataBlockHelper/DataBlockHelper.csproj +++ b/DataBlockHelper/DataBlockHelper.csproj @@ -72,6 +72,7 @@ + From 12c3e2c325ee9c43bd24a4b10c7ede74ad37d513 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, 18 Dec 2023 16:53:00 +0800 Subject: [PATCH 4/4] DB137Helper --- .../Test/TestAction.cs | 2 + DataBlockHelper/DBHelpers/DB137Helper.cs | 50 +++++++++++++++++++ DataBlockHelper/DataBlockHelper.csproj | 1 + 3 files changed, 53 insertions(+) create mode 100644 DataBlockHelper/DBHelpers/DB137Helper.cs diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs index f179d0b..075ac51 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs @@ -82,6 +82,8 @@ namespace Mesnac.Action.ChemicalWeighing.Test var list= MReadHelp.Read(); + new DB137Helper(); + DB120WriteHelp.AddABCDEF(new Uhd() { A = 60, diff --git a/DataBlockHelper/DBHelpers/DB137Helper.cs b/DataBlockHelper/DBHelpers/DB137Helper.cs new file mode 100644 index 0000000..4e149b7 --- /dev/null +++ b/DataBlockHelper/DBHelpers/DB137Helper.cs @@ -0,0 +1,50 @@ +using HslCommunication; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DataBlockHelper.DBHelpers +{ + public class DB137Helper : DBHelper + { + + public DB137Helper() { + OperateResult db = PlcConnect.Instance.Read("DB137.0.0", 14); + bytes = db.Content; + var trans = PlcConnect.Instance.ByteTransform; + var tyb = bytes.Skip(0).Take(1).First(); + HighLevel01 = tyb.GetBit(0); + HighLevel02 = tyb.GetBit(1); + HighLevel03 = tyb.GetBit(2); + + Excitation01 = tyb.GetBit(3); + Excitation02 = tyb.GetBit(4); + Excitation03= tyb.GetBit(5); + + SideBlowing01=tyb.GetBit(6); + SideBlowing02=tyb.GetBit(7); + + tyb = bytes.Skip(1).Take(1).First(); + SideBlowing03 = tyb.GetBit(0); + } + + + public bool HighLevel01 { get; set; } + public bool HighLevel02 { get; set; } + public bool HighLevel03 { get; set; } + + public bool Excitation01 { get; set; } + public bool Excitation02 { get; set; } + public bool Excitation03 { get; set; } + + + public bool SideBlowing01 { get; set; } + + public bool SideBlowing02 { get; set; } + + public bool SideBlowing03 { get; set; } + } +} diff --git a/DataBlockHelper/DataBlockHelper.csproj b/DataBlockHelper/DataBlockHelper.csproj index 64a8b65..0a0ec43 100644 --- a/DataBlockHelper/DataBlockHelper.csproj +++ b/DataBlockHelper/DataBlockHelper.csproj @@ -52,6 +52,7 @@ +