From 586d3879a895a4d978a24ad51d5d4ef766d1a64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 5 Dec 2023 12:39:59 +0800 Subject: [PATCH] =?UTF-8?q?DB3000=20=E4=BF=AE=E5=A4=8D=207=20=E5=92=8C8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainDetailControl/MainDetailControlAction.cs | 4 ++-- .../ManualControl/InitAction.cs | 5 +++++ DataBlockHelper/DBHelpers/Db3000Helper.cs | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index eb7c99d..4ed0f2c 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -284,8 +284,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple4, mixSingle[3]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple5, mixSingle[4]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple6, mixSingle[5]); - SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple7, false); - SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple8, false); + SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple7, mixSingle[6]); + SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple8, mixSingle[7]); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs index 7e21ed9..851c7ae 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs @@ -24,6 +24,7 @@ using Mesnac.Core.Service; using System; using System.Collections.Generic; using System.Data; +using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; @@ -410,9 +411,13 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl Time(6, mixok6 ? 1 : 0); bool mixok7 = PlcConnect.Instance.ReadBool("DB3000.0.6").Content; + + Trace.WriteLine("7号信号:" + mixok7); + Time(7, mixok7 ? 1 : 0); bool mixok8 = PlcConnect.Instance.ReadBool("DB3000.0.7").Content; + Trace.WriteLine("8号信号:" + mixok8); Time(8, mixok8 ? 1 : 0); } diff --git a/DataBlockHelper/DBHelpers/Db3000Helper.cs b/DataBlockHelper/DBHelpers/Db3000Helper.cs index 9c26809..dba2232 100644 --- a/DataBlockHelper/DBHelpers/Db3000Helper.cs +++ b/DataBlockHelper/DBHelpers/Db3000Helper.cs @@ -13,7 +13,7 @@ namespace DataBlockHelper.DBHelpers { var context = operateResult.Content; - for (var i = 0; i < 6; i++) + for (var i = 0; i < 8; i++) { var bo = context.GetBoolByIndex(i); ls.Add(bo); @@ -21,7 +21,7 @@ namespace DataBlockHelper.DBHelpers } else { - for (var i = 0; i < 6; i++) + for (var i = 0; i < 8; i++) { ls.Add(false); }