Adds pump plot
This commit is contained in:
parent
f808b88f93
commit
115ea2768e
1
main.py
1
main.py
|
|
@ -100,6 +100,7 @@ def format_PU_data(data):
|
||||||
"MV07_sp": np.round(data.get("MV07_sp", 0.0), 1),
|
"MV07_sp": np.round(data.get("MV07_sp", 0.0), 1),
|
||||||
"MV08": np.round(data.get("MV08", 0.0), 1),
|
"MV08": np.round(data.get("MV08", 0.0), 1),
|
||||||
"MV08_sp": np.round(data.get("MV08_sp", 0.0), 1),
|
"MV08_sp": np.round(data.get("MV08_sp", 0.0), 1),
|
||||||
|
"Pump_sp" : np.round(data.get("Pump_sp", 0.0), 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
<div id="MV04_sp-05-plot" class="small-plot"></div>
|
<div id="MV04_sp-05-plot" class="small-plot"></div>
|
||||||
<div id="MV06-plot" class="small-plot"></div>
|
<div id="MV06-plot" class="small-plot"></div>
|
||||||
<div id="MV08-plot" class="small-plot"></div>
|
<div id="MV08-plot" class="small-plot"></div>
|
||||||
|
<div id="pump-plot" class="small-plot"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -137,6 +138,13 @@
|
||||||
x: [[t], [t]],
|
x: [[t], [t]],
|
||||||
y: [[puData.MV08_sp], [puData.MV08]]
|
y: [[puData.MV08_sp], [puData.MV08]]
|
||||||
}, [0, 1], maxPoints);
|
}, [0, 1], maxPoints);
|
||||||
|
|
||||||
|
Plotly.extendTraces('pump-plot', {
|
||||||
|
x: [[t]],
|
||||||
|
y: [[puData.Pump_sp]]
|
||||||
|
}, [0], maxPoints);
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error updating plots:", e);
|
console.error("Error updating plots:", e);
|
||||||
}
|
}
|
||||||
|
|
@ -244,6 +252,12 @@
|
||||||
title: 'MV08: Setpoint vs Actual', xaxis: { type: 'date' }, yaxis: { range: [0, 100] }
|
title: 'MV08: Setpoint vs Actual', xaxis: { type: 'date' }, yaxis: { range: [0, 100] }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Plotly.newPlot('pump-plot', [
|
||||||
|
{ x: time0, y: [0], name: 'Pump_sp', mode: 'lines' },
|
||||||
|
], {
|
||||||
|
title: 'Pump: Setpoint ', xaxis: { type: 'date' }, yaxis: { range: [0, 100] }
|
||||||
|
});
|
||||||
|
|
||||||
setInterval(updatePlots, 500);
|
setInterval(updatePlots, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user