From d531a2699df8de5752e79baa7a99f1aaea510b84 Mon Sep 17 00:00:00 2001 From: nodyang Date: Sat, 14 Oct 2023 17:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=A0=87?= =?UTF-8?q?=E8=AF=86=20=E6=9D=A5=E6=B5=8B=E8=AF=95plc=20=E5=BE=97=E9=80=9A?= =?UTF-8?q?=E8=AE=AF=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainDetailControlAction.cs | 12 ++++++++++- .../Data/MCProject/nodeForm/MainDetail.xml | 20 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index f4d7f19..6de54d9 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -851,6 +851,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl bool DV2PCP13_AlarmR; #endregion + + private MCLabel MCWatchDog; public void Run(RuntimeParameter runtime) { @@ -1067,6 +1069,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl #endregion Controls = GetAllControls(); + + MCWatchDog =Controls.FirstOrDefault(x=>x.Name=="MCWatchDog") as MCLabel; + SetControl(); @@ -1680,7 +1685,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl /// private void NewThreadDb2107() { - WatchDog_Set = DB2107.NormalStatus.WatchDog >= 1 ? true : false; + + var normalStatusWatchDog = DB2107.NormalStatus.WatchDog; + WatchDog_Set = normalStatusWatchDog >= 1 ? true : false; + + MCWatchDog.MCValue = normalStatusWatchDog.ToString(); + EMStop_Set = DB2107.NormalStatus.EMStop; Vessel_1_HighLevel_Set = DB2107.Weight.Vessel_1.HighLevel; diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index 97bf0e7..2786ebd 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -1,6 +1,26 @@ + + + + Red + DarkGray + + + False + + + + Modify + True + True + MCLabel149 + Red + 23, 115 + MCWatchDog + 65, 12 +