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

Day 363 of 365 · Expert · Month 12: Masterpieces

Master project

The master project: a gas depot with two tanks by all the rules of the year – specification, one subroutine per tank, interface to the central unit, fail-safety and acceptance tests.

Project 60 min Week 52

What you learn today

  • Your own big project following all the rules
  • Test cases
  • Documentation

The master project is no new topic, but the proof of the pudding: you build a system the way you learned to build systems this year. The specification is below, the acceptance tests check it. How you solve it is up to you – the sample solution is one way of many.

The specification

No.Requirement
A1every tank fills below 4000 kPa and only stops above 4500 kPa
A2above 5000 kPa the tank's vent valve opens, its pump stands still
A3the display “Depot” shows the fill level of the emptier tank in percent of 5000 kPa
A4“Depot_Status” reports 0 fine, 1 overpressure, 2 fault; “Depot_Puls” counts
A5if an analyzer is missing: its pump off, valve closed, status 2, flashing light “Depot_Alarm”, display −1 – the other tank keeps working

The setup

DevicePrefabName
two pipe analyzersStructurePipeAnalysizer“Depot_A”, “Depot_B”
two fill pumpsStructureVolumePump“Depot_A”, “Depot_B”
two vent valvesStructureDigitalValve“Depot_A”, “Depot_B”
LED displayStructureConsoleLED5“Depot”
flashing lightStructureFlashingLight“Depot_Alarm”
two Logic MemoriesStructureLogicMemory“Depot_Status”, “Depot_Puls”

The naming scheme saves registers: all devices of a tank have the same name, they only differ in the prefab. A single name is enough for the subroutine.

By all the rules

  • Style: defines and aliases, sections, Kelvin or kPa with a comment, no pin.
  • Documentation: header with purpose, version, device list and interface. The acceptance test does not check it – but the next person who rebuilds the depot will.
  • Robustness: every sensor failure ends in a defined state without dragging the other tank along.
  • Test cases: normal case, edge case, failure – the five milestones below are your table.

Milestones

  1. Tank A fills with hysteresis, the heartbeat runs.
  2. Tank B works independently of tank A.
  3. Overpressure opens the valve, stops the pump and reports status 1.
  4. The display shows the emptier tank in percent.
  5. A missing analyzer leads into the safe state, the other tank keeps running.
Tip

The pump is its own memory: the subroutine reads On back, computes the hysteresis and writes the result into it again. That way a third tank only needs two lines.

Diagram

Pump output depending on tank pressure 10 0 Setting (L/tick) 4000 5000 tank pressure in kPa clamp: at most 10 (target − pressure) / 100 off
Every tank fills with hysteresis and vents above 5000 kPa. Analyzer, pump and valve of a tank share the same name.

Project task

Task

Build the gas depot according to the specification A1 to A5. The defines are already there, the rest is your solution.

Milestones

  1. Milestone 1: tank A fills with hysteresis
  2. Milestone 2: tank B is independent
  3. Milestone 3: overpressure
  4. Milestone 4: display shows the emptier tank
  5. Milestone 5: analyzer fails

Hints

Hint 1

A subroutine tank with the name in a register, called twice.

Hint 2

Collect the status with max: open valve gives 1, missing analyzer 2.

Hint 3

Fill level: stand to 100 before the calls, in the subroutine min stand stand tmp; with status 2 the display shows −1.

Quiz

1 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