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;