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

Day 47 of 365 · Beginner · Month 2: Order and data network

Alarms and sounds

Klaxon and warning light: pick sounds with Sound. names, alarm on limit violations and acknowledging by button – the horn goes quiet, the light stays.

Lesson 12 min Week 7

What you learn today

  • Drive speaker and warning light
  • Use Sound. names
  • Acknowledge an alarm

A display is only seen by whoever stands in front of it. If the pressure drops in the storage while you are out mining ice, you need something louder: the klaxon speaker.

The klaxon

LogicTypeMeaning
On1 = sound playing
SoundAlertwhich sound – read and write
Modethe same as SoundAlert
Volumeloudness, default 50 – by hand 1 to 100, by chip 1 to 200

You pick the sound with names from the Sound. namespace:

NameNumberNameNumber
Sound.Danger15Sound.PressureLow40
Sound.Warning16Sound.TemperatureHigh41
Sound.Alert17Sound.HighCarbonDioxide44
Sound.PowerLow23Sound.FireFireFire28

Set the sound once before the main loop, inside the loop you only switch On. There is a reason for that in the game code: every write of SoundAlert triggers the sound again, even with the same value.

sbn HORN HASH("Hupe") SoundAlert Sound.PressureLow

Warning light

You switch the flashing light (StructureFlashingLight) through On like any light. It stays on as long as the fault persists – even when the horn has gone quiet.

Acknowledging

An alarm that keeps honking for minutes while you are already on your way to the repair is annoying. With a button you acknowledge it: the horn goes quiet, the light stays on. When the fault disappears, the acknowledgement is forgotten. If it comes back, the horn sounds again.

For that a register remembers whether it was acknowledged:

slt alarm press LIMIT          # fault right now?
lbn button BUTTON HASH("Quittieren") Activate Average
or ack ack button              # remember the press
and ack ack alarm              # forget it once all is well
seqz tmp ack
and horn alarm tmp             # honk only when not acknowledged
sbn HORN HASH("Hupe") On horn
sbn LIGHT HASH("Warnlicht") On alarm

Activate is only 1 for about one tick. Because the or holds on to the press in ack, that one tick is enough.

Warning

A missing sensor is an alarm too. Hook the failure into the alarm condition with snan: snan tmp press and or alarm alarm tmp. Otherwise a removed sensor looks like “all fine”.

Tip

Less is more: a sound for every trifle, and soon nobody listens. Horn for real danger, light for warnings.

Exercise

Task

A pressure alarm with acknowledgement. On the network: gas sensor “Lager”, klaxon “Hupe”, flashing light “Warnlicht”, button “Quittieren”.

  • Before the loop: sound Sound.PressureLow through SoundAlert.
  • Alarm on pressure below 70 kPa or a missing sensor.
  • On alarm: warning light on, horn on – until someone presses the button. Then the horn goes quiet, the light stays.
  • Once the alarm is over, the acknowledgement is forgotten.

Hints

Hint 1

Before start:: sbn HORN HASH("Hupe") SoundAlert Sound.PressureLow.

Hint 2

Alarm: slt against LIMIT, plus snan and or.

Hint 3

Acknowledge: or ack ack button, and ack ack alarm, then seqz and and for the horn.

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