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

Day 111 of 365 · Advanced · Month 4: Network in detail

Project: tolerance guard

Project of the week: a mixing tank should hold 21 % oxygen. sap checks the tolerance band, two pumps correct, a display reports the deviation.

Project 35 min Week 16

What you learn today

  • Keep mixed gas within a tolerance band
  • Report deviations
  • Set a relative tolerance

For the base's breathing air you mix oxygen and nitrogen in a tank. The share should be 21 %. No pump hits it exactly, a band of a few percent is fine. That is exactly what you learned sap for this week.

The setup

DevicePrefabName
pipe analyzer at the mixing tankStructurePipeAnalysizerMischtank
volume pump for oxygenStructureVolumePumpSauerstoffpumpe
volume pump for nitrogenStructureVolumePumpStickstoffpumpe
wall lightStructureWallLightMischung ok
flashing lightStructureFlashingLightMischalarm
LED displayStructureConsoleLED5Abweichung

The analyzer delivers the oxygen share as RatioOxygen, a number from 0 to 1.

Milestones

  1. Within the band: if the share lies within TOL (relative) around TARGET, both pumps are off, “Mischung ok” lights up, the alarm is off.
  2. Too little oxygen: the oxygen pump runs, the nitrogen pump does not, the alarm lights up.
  3. Too much oxygen: the nitrogen pump runs, the oxygen pump does not, the alarm lights up.
  4. Tolerance and display: with TOL 0.05, 22 % still counts as good, 22.5 % no longer. The display shows the deviation in percent of the target: (share − target) / target × 100.
  5. Failure: if the analyzer is missing, no pump runs, the alarm lights up, the display shows −999.

Setting the relative tolerance

sap allows a distance of TOL times the larger of the two values. At 22 % oxygen and TOL 0.05 that is 0.05 × 0.22 = 0.011. The distance to 0.21 is 0.01, so still within the band.

sap ok o2 TARGET TOL        # 1 within the band, 0 outside and on NaN
seqz tmp ok                 # 1 = action needed or failure
slt less o2 TARGET
and less less tmp

If you want a narrower band, you only make TOL smaller. For breathing air a few percent around 21 % are fine. For a fuel mixer you would regulate more tightly.

Warning

Do not build the pumps with sna. With NaN sna also returns 0 in the game, and the logic behind it behaves as if everything were within the band. Here that happens to be harmless. An explicit snan for alarm and display makes the failure visible.

Tip

The deviation in percent of the target is easier for people to read than the raw ratio: “+4.8 %” says more than “0.22”.

Diagram

Comparison and select as a switch temp = 313 sgt r1 temp 303 r1 = 1 select Color.Red Color.Green 4 if r1 ≠ 0 if r1 = 0
Within the band both pumps stay off. Below it the oxygen pump runs, above it the nitrogen pump.

Project task

Task

Build the tolerance guard with the devices and names from the table. TARGET 0.21, TOL 0.05. The milestones are listed above the editor.

Milestones

  1. Milestone 1: within the band
  2. Milestone 2: too little oxygen
  3. Milestone 3: too much oxygen
  4. Milestone 4: 5 % tolerance and display
  5. Milestone 5: analyzer missing

Hints

Hint 1

sap ok o2 TARGET TOL decides about the band – NaN gives 0.

Hint 2

seqz tmp ok is the need for action. The direction comes from slt and sgt, each with and tmp.

Hint 3

The alarm is simply tmp. The display: sub, div, mul 100, then select with missing.

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