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

Day 116 of 365 · Advanced · Month 4: Network in detail

Radio with the logic transmitter

An active logic transmitter holds a value, a passive one mirrors it – without a cable. Without power or link the receiver is not readable.

Lesson 14 min Week 17

What you learn today

  • Transfer values over distance
  • Sender and receiver
  • Limits of remote control

The outpost is far away from the base. Running a data cable out there is tedious. The logic transmitter (StructureLogicTransmitter) transfers values without a cable.

Two modes

A logic transmitter has two modes that you switch on the device:

Modevaluejob
ActiveTransmitterMode.Active = 1sender: holds a value of its own in Setting
PassiveTransmitterMode.Passive = 0receiver: is linked to an active sender with the screwdriver

That is what the game code says: an active sender adds itself to a list of all senders. On the passive receiver you pick one of them with the screwdriver. The code checks no distance limit while doing so.

Mirroring

The passive receiver mirrors its counterpart: every value you read on the receiver really comes from there. If a chip at the outpost reads the receiver, it gets the Setting of the sender at the base. If it writes something into it, it ends up at the sender:

sbn RADIO HASH("Funk Basis") Setting charge   # base: into the sender
l value radio Setting                         # outpost: read the receiver

Only the receiver needs power for this (50 W according to the game data). When reading and writing, the code checks only whether the receiver has power. The Setting of an active sender goes through even when the sender itself has no power.

Limits of remote control

A sender carries one value. For more values you need more sender pairs, or you pack several values into one number, which comes later in the course. The failures matter more:

  • Without power the receiver returns 0 and reports itself as not readable. An l or lbn on it then stops with IncorrectLogicType. Whatever you write into it without power, the game silently drops.
  • Without a linked sender the receiver is not readable either.
  • If you switch the mode on the device, the link is gone and Setting is 0. Linking with the screwdriver also sets the sender's Setting to 0.

That is why the receiver goes on a pin, and you check it before every read:

bdns radio no_radio                  # device gone?
bdnvl radio Setting no_radio         # not readable? (power, link)
l value radio Setting
Warning

A radio value can be stale without you noticing. If the chip at the base stops, the last Setting stays in the sender. For anything important, let the sender transmit a counter as well, which the receiver checks for change. That comes back with the watchdog.

Tip

Only control by radio what stays safe without radio too. The outpost must go into a safe state with its own chip when the link breaks.

Diagram

Devices on the data network with type and name IC housing IC10 StructureGasSensor „Lager“ StructureGasSensor „Werkstatt“ StructureWallHeater „Lagerheizung“ StructureWallHeater „Lagerheizung“ StructureWallHeater „Werkstattheizung“ lbn SENSOR HASH("Lager") reads only this sensor sbn HEATER HASH("Lagerheizung") switches both at once
The passive receiver shows the Setting of the active sender. Before the chip reads it, it checks with bdns and bdnvl.

Exercise

Task

At the outpost a passive logic transmitter hangs on d0. It mirrors the base's charge level in percent.

  • Check the receiver with bdns and bdnvl before reading.
  • Wall lights “Postenlicht” only on if the base has more than 30 %.
  • LED “Basisladung” shows the value, −999 without radio. Without radio the light is off.

Hints

Hint 1

Set charge to NOVALUE first – then the value is right when a check jumps.

Hint 2

bdns radio no_radio and bdnvl radio Setting no_radio before the l.

Hint 3

−999 is not greater than 30, so without radio the light stays off by itself.

Quiz

5 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