This commit is contained in:
xyy
2026-05-15 21:10:42 +08:00
parent 10f5cbfd53
commit d85ee68e25
4 changed files with 204 additions and 232 deletions

View File

@@ -2,14 +2,25 @@
"PlcConnection": {
"IpAddress": "127.0.0.1",
"Port": 502,
"TimeoutMs": 5000
"TimeoutMs": 5000,
"SlaveId": 1
},
"PlcRegisterAddresses": {
// 物理量寄存器(保持寄存器)
"Temperature": 1376, // 温度可能为0.1℃单位)
"Pressure": 1322, // 压力可能为0.1kPa单位)
"Resistance": 1422, // 铂丝电阻可能为0.001Ω单位)
// 设备计算结果寄存器浮点数占用2个寄存器
"ThermalConductivity": 40001,
"ThermalDiffusivity": 40003,
"TestTemperature": 40005,
"StartCommand": 40010,
"ResetCommand": 40011
// 控制命令线圈0x线圈
"StartCommand": 40010, // 启动测试(保持寄存器,非线圈,需特殊处理)
"ResetCommand": 40011,
// 新增线圈地址Modbus 0x 地址,注意与保持寄存器区分)
"PressureCalibrationCoil": 1300, // M1300 压力校准
"ResistanceZeroCoil": 1301, // M1301 电阻归零
"InletValveCoil": 5, // M5 进气
"OutletValveCoil": 6 // M6 排气
},
"TestParameters": {
"MeasurementCount": 10,