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.
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
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