What you learn today
- Emergency shutdown
- Independent second threshold
- Alarm and lock
The solid fuel generator in the machine room runs all night. At three o'clock the cooling fails. A good chip notices before the cables melt – and makes sure nobody half asleep starts the generator again.
Two thresholds
| Threshold | Reaction |
|---|---|
| 60 °C | early warning: flashing light |
| 80 °C | emergency shutdown: generator off and locked, alarm |
The early warning gives you time. The emergency shutdown is the net below the rope.
Independent means: a second sensor
If the emergency shutdown hangs on the same sensor as the control loop, the protection fails along with the sensor. Hence a second gas sensor “Notfuehler”, and one is enough to trip. A missing sensor counts as hot:
slt tmp t1 TRIP # sensor 1 safely below 80 C?
slt hot t2 TRIP # sensor 2 safely below 80 C?
and tmp tmp hot # both safe?
seqz hot tmp # otherwise: hot
The trick: the question is “both safely below the threshold?”. NaN is never “safely below”, so a missing sensor trips.
Latch, lock, acknowledge
or off off hot holds the state even when it cools down again. Only the button “Quittieren” may release it – and only when both sensors are below the early warning. Lock = 1 locks the generator's buttons meanwhile. The speaker plays the matching announcement with SoundAlert = Sound.TemperatureHigh.
Lock locks a device's controls, but not the lock switch itself – anyone can flip that at the device. It protects against switching on by accident, not on purpose. That is why the chip also writes On every tick.
Bit instructions like and with NaN are tricky. Turn the button value into 0 or 1 first with sgtz button button – then a removed button acknowledges nothing.
Exercise
Task
Two gas sensors “Maschinenraum” and “Notfuehler” guard the solid fuel generator “Generator”.
- From 80 °C on one sensor (or a missing sensor): generator off,
Lock1, speaker “Alarm” on withSound.TemperatureHigh– latched - Button “Quittieren” releases, but only when both sensors are below 60 °C
- Flashing light “Hitze” on from 60 °C on one sensor or during the lockout
Hints
Hint 1
Trip: “both safely below TRIP?” with two slt and and, then seqz hot tmp and or off off hot.
Hint 2
Acknowledge: read the button, sgtz, “and” it with both “below WARNING”, then seqz tmp button and and off off tmp.
Hint 3
Generator: On = not off, Lock = off. Speaker: SoundAlert TONE and On off.
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