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

Day 349 of 365 · Expert · Month 12: Masterpieces

Project: base automation part 1

Project base automation, part 1: the plan for five chips with naming scheme and interfaces – and the core of the central unit with heartbeat, watchdog and overall state.

Project 50 min Week 50

What you learn today

  • Plan and split the base automation
  • define interfaces

This week you planned, split up, described interfaces and prepared tests. Now that turns into the plan for the base automation – and the first chip that implements it.

The plan

SubsystemCodeTask
life supportLSpressure, air, temperature
powerENbatteries, generator, load shedding
productionPRproduction orders
logisticsLGstock and requests
central unitZoverview, alarms, distributing orders

The interfaces

Every subsystem writes two Logic Memories, the central unit reads them:

MemoryWriterContent
“X_Status”subsystem X0 fine, 1 warning, 2 fault
“X_Puls”subsystem Xheartbeat, changes every tick
“X_Auftrag”central unitwhat the subsystem should do, different per system
“Z_Puls”central unitheartbeat of the central unit

The orders are added in the coming weeks: load shedding stage for EN, piece count for PR, stock and request from LG.

Part 1: the core of the central unit

Today you build the part of the central unit without which nothing else works: it is alive, it notices whether the subsystems are alive, and it sums everything up in one number. For the start life support and power are enough.

  • Heartbeat: “Z_Puls” counts up by one in every pass.
  • Watchdog: if “LS_Puls” or “EN_Puls” does not change for 4 passes, the system counts as faulty – no matter what its status says.
  • Failure: if a status or heartbeat memory is missing, the system counts as faulty as well.
  • Overall state: the display “Basis” shows the worst status, green, yellow or red.

Milestones

  1. The central unit sends its heartbeat.
  2. The overall state is the worst reported status.
  3. A frozen heartbeat turns its system into a fault.
  4. A missing memory turns its system into a fault.
Tip

The watchdog only trusts the status while the heartbeat is alive. A hung chip often reports “0, all good” forever – that is exactly why the heartbeat exists.

Warning

Here the timeout and every check are still written out for two systems. Once PR and LG join, the chip gets long. Keep an eye on the characters, part 2 needs room.

Project task

Task

Build the core of the central unit according to the rules above: heartbeat “Z_Puls”, status and watchdog for LS and EN, overall state on “Basis” with colour.

Milestones

  1. Milestone 1: heartbeat of the central unit
  2. Milestone 2: overall state
  3. Milestone 3: frozen heartbeat
  4. Milestone 4: missing memory

Hints

Hint 1

Watchdog as in the control room: seq, add, mul, move, then sge tmp age TIMEOUT and select s tmp STOERUNG s.

Hint 2

Missing memory: add tmp s p is NaN as soon as one of the two is missing – then snan and select.

Hint 3

Total: move total s for the first system, max total total s for the second.

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