This commit is contained in:
xyy
2026-03-19 20:40:54 +08:00
parent df022fc848
commit 9fd2f13b1c
13 changed files with 348 additions and 62 deletions

View File

@@ -11,6 +11,20 @@
public double PressureFactor { get; set; } = 1.0;
public double WetFlowFactor { get; set; } = 1.0;
public double DryFlowFactor { get; set; } = 1.0;
public ushort PressureRegisterStation1 { get; set; }
public ushort PressureRegisterStation2 { get; set; }
public ushort PressureRegisterStation3 { get; set; }
public ushort PressureModeRegister { get; set; }
public ushort PressCoil { get; set; }
public ushort StartCoil { get; set; }
public ushort EnableCoil { get; set; }
public ushort StopCoil { get; set; }
}
@@ -19,9 +33,13 @@
public interface IPlcService
{
Task<float> ReadPressureAsync();
Task<float> ReadPressureAsync(int stationId); // 按工位读取压力
Task<float> ReadWetFlowAsync();
Task<float> ReadDryFlowAsync();
Task WriteCoilAsync(ushort coilAddress, bool value); // 写线圈
Task WriteRegisterAsync(ushort registerAddress, ushort value); // 写寄存器
Task<bool> ReadCoilAsync(ushort coilAddress); // 新增:读取线圈状态
}
}