This commit is contained in:
27
Helpers/PlcConfiguration.cs
Normal file
27
Helpers/PlcConfiguration.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user