|
|
|
@ -54,6 +54,18 @@ public class PlcMgr
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static bool AirBlowerControl(ushort value)
|
|
|
|
|
{
|
|
|
|
|
if (PlcClient != null)
|
|
|
|
|
{
|
|
|
|
|
HostToPlcData.ExhaustFanControl.Value = value;
|
|
|
|
|
return PlcClient.WriteValue(HostToPlcData.ExhaustFanControl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否远程模式
|
|
|
|
|
/// </summary>
|
|
|
|
@ -63,19 +75,18 @@ public class PlcMgr
|
|
|
|
|
if ((DateTime.Now - DataValidityTime).Seconds <= DataTimeSeconds)
|
|
|
|
|
{
|
|
|
|
|
return PlcToHostData.RemoteLocalControlState.Value == 1010;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsAuto()
|
|
|
|
|
{
|
|
|
|
|
if ((DateTime.Now - DataValidityTime).Seconds <= DataTimeSeconds)
|
|
|
|
|
{
|
|
|
|
|
return PlcToHostData.ModeControl.Value == 1010;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -317,8 +328,10 @@ public class PlcMgr
|
|
|
|
|
writeHostToPlc.LightingControl.Value = 1000;
|
|
|
|
|
bResult = PlcClient.WriteValue(writeHostToPlc.LightIn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取当前灯光状态
|
|
|
|
|
/// </summary>
|
|
|
|
@ -329,6 +342,7 @@ public class PlcMgr
|
|
|
|
|
{
|
|
|
|
|
return PlcToHostData.LightStatus.Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return default;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -345,8 +359,7 @@ public class PlcMgr
|
|
|
|
|
writeHostToPlc.LightingControl.Value = 1010;
|
|
|
|
|
bResult = PlcClient.WriteValue(writeHostToPlc.LightIn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|