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

Day 355 of 365 · Expert · Month 12: Masterpieces

Masterpiece: integration

Masterpiece integration: the central unit reads the status of all four subsystems, shows them on an overview and raises the alarm on every new fault until someone acknowledges.

Lesson 25 min Week 51

What you learn today

  • The centre connects all subsystems
  • Alarms
  • Overview

Four subsystems are running, each on its own. Now comes the piece that turns them into a base: the central unit. It controls not a single device of the subsystems. It reads, sums up and raises alarms.

The overview

Every subsystem gets a display on the central unit's panel: “Z_LS”, “Z_EN”, “Z_PR”, “Z_LG”, plus “Z_Basis” for the overall state. The colours are those from day 339 – green, yellow, red –, the number is the status. A missing status memory counts as a fault.

For that the central unit calls the same subroutine four times. It gets the name of the status memory, the name of the display and a bit number. The bit number is the system's place in the fault word.

Alarms

Every system in fault sets its bit:

sge tmp s STOERUNG
ins faults tmp bit 1              # the system's bit in the fault word

The central unit finds new faults like the alarm centre on day 340: set now, not before. They keep the klaxon “Z_Alarm” on until the button “Z_Quittung” is pressed:

not tmp alt
and tmp faults tmp                # newly faulty: yes now, no before
move alt faults
or pending pending tmp

A warning (status 1) colours the panel yellow, but does not sound. A fault that has already been acknowledged only sounds again once it disappears and occurs anew.

What the central unit does not do

It does not intervene. If power drops into stage 2, the central unit does not switch off any light – power did that itself long ago. The central unit reports it to the person. Tomorrow adds what it may request: orders to production. That too is a request over the interface, not a grab into someone else's device.

Warning

The colour subroutine is called from within the system subroutine. jal overwrites ra in doing so. Without the copy in keep the return would no longer find its way into the main part, but land behind the inner call – in an endless loop.

Diagram

Calling and returning from a subroutine Main loop 2 l r0 d0 Temperature 3 jal celsius 4 s d2 Setting r1 5 l r0 d1 Temperature 6 jal celsius 7 s d3 Setting r1 8 j start celsius: sub r1 r0 273.15 j ra ra = 4 back to line ra
One subroutine per subsystem, inside it a second one for the colour. Before the inner call the outer one saves its ra.

Exercise

Task

Build the central unit with overview and alarm: heartbeat “Z_Puls”, four statuses “LS_Status”, “EN_Status”, “PR_Status”, “LG_Status” on the displays “Z_LS”, “Z_EN”, “Z_PR”, “Z_LG” (number and colour), the worst status on “Z_Basis”. Every new fault keeps the klaxon “Z_Alarm” on until “Z_Quittung” is pressed.

Hints

Hint 1

Four times: move name …, move disp …, move bit N, jal system.

Hint 2

In the subroutine: read the status, NaN to 2, max worst …, the bit with ins faults tmp bit 1, then save ra and jal colourpick.

Hint 3

Alarm: not, and, move alt faults, or pending pending tmp; the button sets pending to 0.

Quiz

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

Complete the day

  • Passed the simulator exercise
  • 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