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