diff --git a/succbone/succd/http.go b/succbone/succd/http.go index f1503e7..9a43281 100644 --- a/succbone/succd/http.go +++ b/succbone/succd/http.go @@ -62,6 +62,17 @@ type apiData struct { // DPOn means the diffusion pump is turned on. DPOn bool } + // Temperature state. + Temperatures struct { + DPBottom float32 + DPTop float32 + DPInlet float32 + SEM float32 + } + // Humidity state. + Humidity struct { + SEM float32 + } // Pressure feedback into evacuation board. Feedback struct { // RoughReached is true when the system has reached a rough vacuum @@ -115,6 +126,11 @@ func (s *webServer) apiData(skipSystem bool) *apiData { ad.Pirani.MbarFloat = mbar ad.Pumps.RPOn = state.rpOn ad.Pumps.DPOn = state.dpOn + ad.Temperatures.DPBottom = state.tempDPBottom + ad.Temperatures.DPTop = state.tempDPTop + ad.Temperatures.DPInlet = state.tempDPInlet + ad.Temperatures.SEM = state.tempSEM + ad.Humidity.SEM = state.humiditySEM ad.Feedback.RoughReached = rough ad.Feedback.HighReached = high ad.LoopLoad = s.d.loopLoad() diff --git a/succbone/succd/index.html b/succbone/succd/index.html index abd5695..c598f0c 100644 --- a/succbone/succd/index.html +++ b/succbone/succd/index.html @@ -111,6 +111,22 @@ td > span { DP {{ if .Pumps.DPOn }}ON{{ else }}OFF{{ end }} + + Temperatures + SEM + {{ .Temperatures.SEM }} + DPBottom + {{ .Temperatures.DPBottom }} + DPTop + {{ .Temperatures.DPTop }} + DPInlet + {{ .Temperatures.DPInlet }} + + + Humidity + SEM + {{ .Humidity.SEM }} + Safety Pirani
Failsafe @@ -316,6 +332,11 @@ window.addEventListener("load", (_) => { let trough = document.querySelector("#trough"); let thigh = document.querySelector("#thigh"); let load = document.querySelector("#load"); + let tempSEM = document.querySelector("#temp-sem"); + let tempDPBottom = document.querySelector("#temp-dp-bottom"); + let tempDPTop = document.querySelector("#temp-dp-top"); + let tempDPInlet = document.querySelector("#temp-dp-inlet"); + let humiditySEM = document.querySelector('#humidity-sem'); // Buttons let pd = document.querySelector("#pd"); @@ -388,6 +409,12 @@ window.addEventListener("load", (_) => { dp.style = colors.default; } + tempSEM.innerHTML = data.Temperatures.SEM + " °C"; + tempDPBottom.innerHTML = data.Temperatures.DPBottom + " °C"; + tempDPTop.innerHTML = data.Temperatures.DPTop + " °C"; + tempDPInlet.innerHTML = data.Temperatures.DPInlet + " °C"; + humiditySEM.innerHTML = data.Humidity.SEM + " %"; + let t = []; if (data.Feedback.RoughReached) { trough.innerHTML = "OK"; @@ -413,7 +440,7 @@ window.addEventListener("load", (_) => { // Indicate all process values as unknown - [failsafe, highpressure, rp, dp, trough, thigh, volts, mbar].forEach((el) => { + [failsafe, highpressure, rp, dp, trough, thigh, volts, mbar, tempDPBottom, tempDPTop, tempDPInlet].forEach((el) => { if (!el.innerHTML.includes("??")) { el.innerHTML += "??"; } diff --git a/succbone/succd/main.go b/succbone/succd/main.go index 64663a8..a56f2cc 100644 --- a/succbone/succd/main.go +++ b/succbone/succd/main.go @@ -35,6 +35,12 @@ func main() { d.daemonState.piraniVolts3.limit = 3 d.daemonState.piraniVolts100.limit = 100 + d.tempDPBottom = 420.6 + d.tempDPTop = 69.0 + d.tempDPInlet = 42.0 + d.tempSEM = 42.5 + d.humiditySEM = 66.6 + d.aboveRough.threshold = float64(flagPressureThresholdRough) d.aboveRough.hysteresis = float64(flagPressureThresholdRoughHysteresis) d.aboveHigh.threshold = float64(flagPressureThresholdHigh) diff --git a/succbone/succd/process.go b/succbone/succd/process.go index de99e84..c886260 100644 --- a/succbone/succd/process.go +++ b/succbone/succd/process.go @@ -55,6 +55,13 @@ type daemonState struct { pumpdown momentaryOutput aboveRough thresholdOutput aboveHigh thresholdOutput + + tempDPBottom float32 + tempDPTop float32 + tempDPInlet float32 + + tempSEM float32 + humiditySEM float32 } func (d *daemonState) vacuumStatus() (rough, high bool) {