This commit is contained in:
xyy
2026-02-27 16:58:02 +08:00
parent 82abc41dbc
commit 63c81b48a1
9 changed files with 237 additions and 3 deletions

View 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();
}
}