mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
添加冷机遥测数据展示
This commit is contained in:
@@ -503,20 +503,40 @@ void Station::readCoolingData(int deviceNo, string addr, int val)
|
||||
{
|
||||
auto& unit = mapCoolingUnit[deviceNo];
|
||||
|
||||
if (addr == "0x1001") { ; } //所属通道号 R uint16 1 0x1001
|
||||
else if (addr == "0x1002") { ; }// 所属冷机号 R uint16 1~10 0x1002
|
||||
else if (addr == "0x1003") { coolingStatus = unit.powerOn = val; }// 开关 R uint16 0:关机,1:开机 0x1003
|
||||
else if (addr == "0x1004") { unit.mode = val; }// 采样模式 R uint16 0-出水温度 1-电芯温度 0x1004
|
||||
else if (addr == "0x1005") { unit.cooling = val; }// 制冷状态 R uint16 0:关闭, 1:启动 0x1005
|
||||
else if (addr == "0x1006") { unit.heating = val; }// 制热状态 R uint16 0:关闭, 1:启动 0x1006
|
||||
else if (addr == "0x1007") { unit.highTemp = val; }// 高温告警 R uint16 0:正常,1:告警 0x1007
|
||||
else if (addr == "0x1008") { unit.lowTemp = val; }// 低温告警 R uint16 0:正常,1:告警 0x1008
|
||||
else if (addr == "0x1009") { unit.highPressure = val; }// 高压告警 R uint16 0:正常,1:告警 0x1009
|
||||
else if (addr == "0x100A") { unit.lowPressure = val; }// 低压告警 R uint16 0:正常,1:告警 0x100A
|
||||
if (addr == "0x1001") { ; } // 所属通道号 R uint16 1 0x1001
|
||||
else if (addr == "0x1002") { ; } // 所属冷机号 R uint16 1~10 0x1002
|
||||
else if (addr == "0x1003") { coolingStatus = unit.powerOn = val; } // 开关 R uint16 0:关机,1:开机 0x1003
|
||||
else if (addr == "0x1004") { unit.mode = val; } // 采样模式 R uint16 0-出水温度 1-电芯温度 0x1004
|
||||
else if (addr == "0x1005") { unit.cooling = val; } // 制冷状态 R uint16 0:关闭, 1:启动 0x1005
|
||||
else if (addr == "0x1006") { unit.heating = val; } // 制热状态 R uint16 0:关闭, 1:启动 0x1006
|
||||
else if (addr == "0x1007") { unit.highTempAlarm = val; } // 高温告警 R uint16 0:正常,1:告警 0x1007
|
||||
else if (addr == "0x1008") { unit.lowTempAlarm = val; } // 低温告警 R uint16 0:正常,1:告警 0x1008
|
||||
else if (addr == "0x1009") { unit.highPressureAlarm = val; } // 高压告警 R uint16 0:正常,1:告警 0x1009
|
||||
else if (addr == "0x100A") { unit.lowPressureAlarm = val; } // 低压告警 R uint16 0:正常,1:告警 0x100A
|
||||
else if (addr == "0x100B") { ; }// 进水温度传感器 R uint16 0:正常,1:告警 0x100B
|
||||
else if (addr == "0x100C") { ; }// 出水温度传感器 R uint16 0:正常,1:告警 0x100C
|
||||
else if (addr == "0x100D") { ; }// 进水压力传感器 R uint16 0:正常,1:告警 0x100D
|
||||
else if (addr == "0x100E") { ; }// 出水压力传感器 R uint16 0:正常,1:告警 0x100E
|
||||
|
||||
else if (addr == "0x0003") { unit.coolPoint = val; } // 制冷点 R int16 0.1℃ 0x0003
|
||||
else if (addr == "0x0004") { unit.coolDeviation = val; } // 制冷偏差 R int16 0.1℃ 0x0004
|
||||
else if (addr == "0x0005") { unit.highTempTH = val; } // 高温告警值 R int16 0.1℃ 0x0005
|
||||
else if (addr == "0x0006") { unit.lowTempTH = val; } // 低温告警值 R int16 0.1℃ 0x0006
|
||||
else if (addr == "0x0007") { unit.heatPoint = val; } // 制热点 R int16 0.1℃ 0x0007
|
||||
else if (addr == "0x0008") { unit.heatDeviation = val; } // 制热偏差 R int16 0.1℃ 0x0008
|
||||
else if (addr == "0x0009") { unit.cellTemp = val; } // 电芯温度 R int16 0.1℃ 0x0009
|
||||
else if (addr == "0x000A") { unit.ambientHumi = val; } // 环境湿度 R int16 0.1℃ 0x000A
|
||||
else if (addr == "0x000B") { unit.suctionTemp = val; } // 吸气温度 R int16 0.1℃ 0x000B
|
||||
else if (addr == "0x000C") { unit.dischTemp = val; } // 排气温度 R int16 0.1℃ 0x000C
|
||||
else if (addr == "0x000D") { unit.inletTemp = val; } // 进水温度/供液温度 R int16 0.1℃ 0x000D
|
||||
else if (addr == "0x000E") { unit.outletTemp = val; } // 出水温度/回液温度 R int16 0.1℃ 0x000E
|
||||
else if (addr == "0x000F") { unit.inletPressure = val; } // 进水压力/供液压力 R int16 0.1 0x000F
|
||||
else if (addr == "0x0010") { unit.outletPressure = val; } // 出水压力/回液压力 R int16 0.1 0x0010
|
||||
else if (addr == "0x0011") { unit.highPressure = val; } // 高压压力 R int16 0.1 0x0011
|
||||
else if (addr == "0x0012") { unit.lowPressure = val; } // 低压压力 R int16 0.1 0x0012
|
||||
else if (addr == "0x0013") { unit.pumpSpeed = val; } // 循环水泵转速 R int16 0x0013
|
||||
else if (addr == "0x0014") { unit.compFreq = val; } // 压缩机频率 R int16 0x0014
|
||||
else if (addr == "0x0015") { unit.fanSpeed = val; } // 室外风机转速 R int16 0x0015
|
||||
}
|
||||
|
||||
static void JSONReadArrayItem(njson& json, int i, int& v)
|
||||
|
||||
@@ -47,18 +47,40 @@ struct Fire40Unit
|
||||
|
||||
struct CoolingUnit
|
||||
{
|
||||
int powerOn {0}; //开关 R uint16 0:关机,1:开机 0x1003
|
||||
int mode {0}; //采样模式 R uint16 0-出水温度 1-电芯温度 0x1004
|
||||
int cooling {0}; //制冷状态 R uint16 0:关闭, 1:启动 0x1005
|
||||
int heating {0}; //制热状态 R uint16 0:关闭, 1:启动 0x1006
|
||||
int highTemp {0}; //高温告警 R uint16 0:正常,1:告警 0x1007
|
||||
int lowTemp {0}; //低温告警 R uint16 0:正常,1:告警 0x1008
|
||||
int highPressure {0}; //高压告警 R uint16 0:正常,1:告警 0x1009
|
||||
int lowPressure {0}; //低压告警 R uint16 0:正常,1:告警 0x100A
|
||||
int powerOn {0}; //开关 R uint16 0:关机,1:开机 0x1003
|
||||
int mode {0}; //采样模式 R uint16 0-出水温度 1-电芯温度 0x1004
|
||||
int cooling {0}; //制冷状态 R uint16 0:关闭, 1:启动 0x1005
|
||||
int heating {0}; //制热状态 R uint16 0:关闭, 1:启动 0x1006
|
||||
int highTempAlarm {0}; //高温告警 R uint16 0:正常,1:告警 0x1007
|
||||
int lowTempAlarm {0}; //低温告警 R uint16 0:正常,1:告警 0x1008
|
||||
int highPressureAlarm {0}; //高压告警 R uint16 0:正常,1:告警 0x1009
|
||||
int lowPressureAlarm {0}; //低压告警 R uint16 0:正常,1:告警 0x100A
|
||||
//进水温度传感器 R uint16 0:正常,1:告警 0x100B
|
||||
//出水温度传感器 R uint16 0:正常,1:告警 0x100C
|
||||
//进水压力传感器 R uint16 0:正常,1:告警 0x100D
|
||||
//出水压力传感器 R uint16 0:正常,1:告警 0x100E
|
||||
|
||||
// 遥测
|
||||
int coolPoint {0}; // 制冷点 R int16 0.1℃ 0x0003
|
||||
int coolDeviation {0}; // 制冷偏差 R int16 0.1℃ 0x0004
|
||||
int highTempTH {0}; // 高温告警值 R int16 0.1℃ 0x0005
|
||||
int lowTempTH {0}; // 低温告警值 R int16 0.1℃ 0x0006
|
||||
int heatPoint {0}; // 制热点 R int16 0.1℃ 0x0007
|
||||
int heatDeviation {0}; // 制热偏差 R int16 0.1℃ 0x0008
|
||||
int cellTemp {0}; // 电芯温度 R int16 0.1℃ 0x0009
|
||||
int ambientHumi {0}; // 环境湿度 R int16 0.1℃ 0x000A
|
||||
int suctionTemp {0}; // 吸气温度 R int16 0.1℃ 0x000B
|
||||
int dischTemp {0}; // 排气温度 R int16 0.1℃ 0x000C
|
||||
int inletTemp {0}; // 进水温度/供液温度 R int16 0.1℃ 0x000D
|
||||
int outletTemp {0}; // 出水温度/回液温度 R int16 0.1℃ 0x000E
|
||||
int inletPressure {0}; // 进水压力/供液压力 R int16 0.1 0x000F
|
||||
int outletPressure {0}; // 出水压力/回液压力 R int16 0.1 0x0010
|
||||
int highPressure {0}; // 高压压力 R int16 0.1 0x0011
|
||||
int lowPressure {0}; // 低压压力 R int16 0.1 0x0012
|
||||
int pumpSpeed {0}; // 循环水泵转速 R int16 0x0013
|
||||
int compFreq {0}; // 压缩机频率 R int16 0x0014
|
||||
int fanSpeed {0}; // 室外风机转速 R int16 0x0015
|
||||
|
||||
};
|
||||
|
||||
struct AircUnit
|
||||
|
||||
@@ -1863,10 +1863,29 @@ Errcode HttpEntity::queryEnvironment(const httplib::Request& req, njson& json, s
|
||||
nodearray.push_back({{"pos", "采样模式"}, {"status", unit.mode == 0 ? "出水温度" : "电芯温度"}});
|
||||
nodearray.push_back({{"pos", "制冷状态"}, {"status", unit.cooling == 0 ? "关闭" : "启动"}});
|
||||
nodearray.push_back({{"pos", "制热状态"}, {"status", unit.heating == 0 ? "关闭" : "启动"}});
|
||||
nodearray.push_back({{"pos", "高温告警"}, {"status", unit.highTemp == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "低温告警"}, {"status", unit.lowTemp == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "高压告警"}, {"status", unit.highPressure == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "低压告警"}, {"status", unit.lowPressure == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "高温告警"}, {"status", unit.highTempAlarm == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "低温告警"}, {"status", unit.lowTempAlarm == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "高压告警"}, {"status", unit.highPressureAlarm == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "低压告警"}, {"status", unit.lowPressureAlarm == 0 ? "正常" : "告警"}});
|
||||
nodearray.push_back({{"pos", "制冷点"}, {"status", std::format("{:.1f} ℃", unit.coolPoint * 0.1f)}});
|
||||
nodearray.push_back({{"pos", "制冷偏差"}, {"status", std::format("{:.1f} ℃", unit.coolDeviation*0.1f)}});
|
||||
nodearray.push_back({{"pos", "高温告警值"}, {"status", std::format("{:.1f} ℃", unit.highTempTH*0.1f)}});
|
||||
nodearray.push_back({{"pos", "低温告警值"}, {"status", std::format("{:.1f} ℃", unit.lowTempTH*0.1f)}});
|
||||
nodearray.push_back({{"pos", "制热点"}, {"status", std::format("{:.1f} ℃", unit.heatPoint*0.1f)}});
|
||||
nodearray.push_back({{"pos", "制热偏差"}, {"status", std::format("{:.1f} ℃", unit.heatDeviation*0.1f)}});
|
||||
nodearray.push_back({{"pos", "电芯温度"}, {"status", std::format("{:.1f} ℃", unit.cellTemp*0.1f)}});
|
||||
nodearray.push_back({{"pos", "环境湿度"}, {"status", std::format("{:.1f} ℃", unit.ambientHumi*0.1f)}});
|
||||
nodearray.push_back({{"pos", "吸气温度"}, {"status", std::format("{:.1f} ℃", unit.suctionTemp*0.1f)}});
|
||||
nodearray.push_back({{"pos", "排气温度"}, {"status", std::format("{:.1f} ℃", unit.dischTemp*0.1f)}});
|
||||
nodearray.push_back({{"pos", "进水温度"}, {"status", std::format("{:.1f} ℃", unit.inletTemp*0.1f)}});
|
||||
nodearray.push_back({{"pos", "出水温度"}, {"status", std::format("{:.1f} ℃", unit.outletTemp*0.1f)}});
|
||||
nodearray.push_back({{"pos", "进水压力"}, {"status", std::format("{:.1f}", unit.inletPressure*0.1f)}});
|
||||
nodearray.push_back({{"pos", "出水压力"}, {"status", std::format("{:.1f}", unit.outletPressure*0.1f)}});
|
||||
nodearray.push_back({{"pos", "高压压力"}, {"status", std::format("{:.1f}", unit.highPressure*0.1f)}});
|
||||
nodearray.push_back({{"pos", "低压压力"}, {"status", std::format("{:.1f}", unit.lowPressure*0.1f)}});
|
||||
nodearray.push_back({{"pos", "循环水泵转速"}, {"status", std::format("{}", unit.pumpSpeed)}});
|
||||
nodearray.push_back({{"pos", "压缩机频率"}, {"status", std::format("{}", unit.compFreq)}});
|
||||
nodearray.push_back({{"pos", "室外风机转速"}, {"status", std::format("{}", unit.fanSpeed)}});
|
||||
}
|
||||
jsondata["cooling"] = nodearray;
|
||||
}
|
||||
|
||||
@@ -178,6 +178,14 @@ export default {
|
||||
timer: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听父组件数据变化
|
||||
stationId(newVal) {
|
||||
if (newVal) {
|
||||
this.getEnvironment()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
// const div = document.getElementById('videosPage')
|
||||
|
||||
Reference in New Issue
Block a user