using HybirdFrameworkDriver.ModbusTcpMaster;
using HybirdFrameworkServices.Plc;
namespace Service.Plc;
public abstract class PlcMgr
{
public static ModbusTcpMaster ModbusTcpMaster;
public static readonly HostToPlc HostToPlcData = new HostToPlc();
public static readonly PlcToHost PlcToHostData = new PlcToHost();
public static readonly PlcFault PlcFaultData = new PlcFault();
///
/// 写入口灯
/// 红灯:1020
/// 绿灯:1000
///
///
///
public static bool WriteEntranceLamp(byte value)
{
HostToPlcData.LightIn.Value = value;
return ModbusTcpMaster.WriteValue(HostToPlcData.LightIn);
}
}