From 5179e3db776561a6bb5cda0922771b9a2408aa94 Mon Sep 17 00:00:00 2001 From: tfarcraw <123211521@163.com> Date: Fri, 7 Aug 2026 13:40:23 +0800 Subject: [PATCH] 1 --- ViewModel/MainWindowVM.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ViewModel/MainWindowVM.cs b/ViewModel/MainWindowVM.cs index eb9c9ba..0fd0c8f 100644 --- a/ViewModel/MainWindowVM.cs +++ b/ViewModel/MainWindowVM.cs @@ -2164,14 +2164,13 @@ namespace ViewModel } else { - - - + + + MyHand = AllGrouhandList.Where(w => w.State.StatusBackground == ColorStr.Blue).FirstOrDefault(); if (MyHand != null) { - MyPLC.PLC.Write("Y2", true); //锁门 - Door = "已锁"; + MyFlow.RunStep++; MyFlow.RunTime = DateTime.Now; } @@ -3205,6 +3204,11 @@ namespace ViewModel /// public void Start(object per) { + if (MyPLC != null && MyPLC.PLC != null && MyPLC.PLC.PlcStatus.StatusBackground == ColorStr.Green) + { + MyPLC.PLC.Write("Y2", true); //锁门 + Door = "已锁"; + } if (RunStatu == RunStatuEnum.Normal) { return;