stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 321

Day 321 of 365 · Expert · Month 11: Optimisation and debugging

Project: fail-safe plant

Project: a fail-safe cold room with three sensors, emergency mode below two valid readings and a clean restart with a checked setpoint.

Project 45 min Week 46

What you learn today

  • Redundant sensors
  • Emergency mode
  • Clean restart

The cold room holds the supplies for the next Martian winter. If the cooling fails for one night, everything is lost. This week you build the control that expects everything you have learned: sensors fail, setpoints are nonsense, chips get reinserted.

The setup

DevicePrefabName
three gas sensorsStructureGasSensor“Kuehl_A”, “Kuehl_B”, “Kuehl_C”
wall coolerStructureWallCooler“Kuehlhaus”
Logic Memory for the setpointStructureLogicMemory“Kuehl_Soll”
LED display temperatureStructureConsoleLED5“Kuehlhaus”
LED display modeStructureConsoleLED5“Kuehl_Modus”
flashing lightStructureFlashingLight“Kuehl_Stoerung”

The rules

  • Measure: the chip only averages the valid sensors. A failed sensor does not count.
  • Cool: setpoint in °C from “Kuehl_Soll”. The cooler switches on 2 K above the setpoint and off 2 K below it.
  • Report: if a sensor is missing, “Kuehl_Stoerung” flashes. The control keeps running with the others.
  • Emergency mode: below two valid sensors the cooler runs all the time, “Kuehl_Modus” shows 1 instead of 0.
  • Restart: before the loop the setpoint is checked (−5 to 10 °C, otherwise 4 °C) and written back, and the cooler starts on. Better briefly too cold than not cooled at all.
  • Display: “Kuehlhaus” shows the mean in °C, −999 without a valid sensor.

Milestones

  1. Cooling with hysteresis around the setpoint.
  2. One sensor fails: report, but normal operation.
  3. Two sensors fail: emergency mode.
  4. Clean restart with a checked setpoint.
Tip

For the mean of the valid sensors you count them with snanz and only add their values: select tmp tmp tb 0 turns a failed sensor into a 0 that does not distort the sum. You divide by the number of valid ones.

Warning

With zero valid sensors the mean is 0 / 0 = NaN. Here that is even intended: all comparisons with NaN are 0, the emergency mode takes over. But the display has to catch it.

Project task

Task

Build the fail-safe cold room control according to the rules above.

Milestones

  1. Milestone 1: cooling with hysteresis
  2. Milestone 2: one sensor fails
  3. Milestone 3: emergency mode
  4. Milestone 4: clean restart

Hints

Hint 1

Start part before start:: check the setpoint as on day 319, write it back, convert to Kelvin, cooler on.

Hint 2

Mean: snanz per sensor, select … 0 for the sum, div mean sum n.

Hint 3

Emergency mode: slt ok n 2, then or on on ok – and ok straight to “Kuehl_Modus”.

Quiz

2 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed all milestones of the project
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere