Files
VacuumPressureMembranePoreS…/Helpers/PlcConfiguration.cs

27 lines
762 B
C#
Raw Normal View History

2026-02-27 16:58:02 +08:00
namespace MembranePoreTester.Communication
{
public class PlcConfiguration
{
public string IpAddress { get; set; }
public int Port { get; set; }
public byte SlaveId { get; set; } = 1; // 从站地址默认1
public ushort PressureRegister { get; set; }
public ushort WetFlowRegister { get; set; }
public ushort DryFlowRegister { get; set; }
public double PressureFactor { get; set; } = 1.0;
public double WetFlowFactor { get; set; } = 1.0;
public double DryFlowFactor { get; set; } = 1.0;
}
public interface IPlcService
{
Task<float> ReadPressureAsync();
Task<float> ReadWetFlowAsync();
Task<float> ReadDryFlowAsync();
}
}