This commit is contained in:
tfarcraw 2026-08-12 09:53:06 +08:00
parent 477ba82526
commit eda0be4ee8

View File

@ -2006,6 +2006,20 @@ namespace ViewModel
{
if (RunStatu == RunStatuEnum.Normal)
{
if (MyPLC != null && MyPLC.PLC != null && MyPLC.PLC.PlcStatus.StatusBackground == ColorStr.Green)
{
if (lockTime.AddSeconds(1) < DateTime.Now)
{
lockTime = DateTime.Now;
MyPLC.PLC.Write("Y2", true);
Door = "已锁";
break;
}
}
if (!fir)
{
MyPLC.Conneced();
@ -2034,20 +2048,7 @@ namespace ViewModel
LogicDispatch(LogicDispatchFlow);
if (MyPLC != null && MyPLC.PLC != null && MyPLC.PLC.PlcStatus.StatusBackground == ColorStr.Green)
{
if (lockTime.AddSeconds(1) < DateTime.Now)
{
lockTime = DateTime.Now;
MyPLC.PLC.Write("Y2", true);
Door = "已锁";
break;
}
}
}
}
@ -3219,16 +3220,7 @@ namespace ViewModel
/// <param name="per"></param>
public void Start(object per)
{
if (Door != "已锁")
{
ExcepStop("请关闭门锁后再启动");
return;
}
if (RunStatu == RunStatuEnum.Normal)
{
return;