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

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

Understanding the data network

What belongs to a data network, why devices behind a transformer are invisible to the chip and how to detect network faults in code.

Lesson 11 min Week 6

What you learn today

  • What belongs to a data network
  • Devices on separate networks
  • Cables, bridges and failure patterns

You named the heater in the new wing properly, the name is right, the prefab is right – and sbn still switches nothing. Then the culprit is usually not the code but the cable.

What a data network is

All cables connected to each other form one network. Normal, heavy and super-heavy cable all carry power and data. A device belongs to a network when its data port hangs on one of those cables.

  • Some devices have one shared port for power and data: wall light, LED display, volume pump.
  • Others have separate ports: the IC housing has a data port and a power port, the station battery one data port and two power ports.
  • Gas sensor, lever and button only have a data port.

Devices do not join networks

A device with two cable ports does not turn two networks into one. That mainly concerns transformer, area power control and batteries: they pass power from one network to the other, but they remain two networks. On the small transformer only the input carries data, the output only power.

For the chip that means: everything behind a transformer is a different network – and therefore invisible.

What the chip sees then

SituationPinlbn with Averagesbnlb … Count
device on its own networkcan be assignedvaluewritescounted
device on another networkcannot be assignedNaNwrites nothingnot counted
housing without data cable–error DeviceListNull, chip stopserrorerror

Failure patterns in the game

  • A piece of cable was removed or has burnt out: the network falls apart into two halves. Suddenly devices are missing that were there yesterday.
  • A new device sits behind a transformer: it never appears on the chip's network.
  • Two networks that look the same: cables run side by side but are not connected.

Checking in code

With lb and Count you ask how many devices of a type the chip sees. If you know how many there should be, you spot a network fault right away:

define SENSOR HASH("StructureGasSensor")  # Gas Sensor
define EXPECTED 3          # sensors on the network
alias count r0
alias fault r1
lb count SENSOR Temperature Count
slt fault count EXPECTED    # 1 = one is missing
Warning

Count with lbn ignores the name and counts all devices of the type. For counting, use lb.

Tip

For “device does not react”: first follow the cable from the device to the housing, then check the name, the code last.

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 chip only reaches devices on the same data network – through pins and through lbn, lb, sbn, sb.

Exercise

Task

A network check: three gas sensors should be on the network. There is also an LED display “Sensoren” and a flashing light “Netzfehler”.

  • The display shows how many gas sensors the chip sees (lb with Count).
  • If it sees fewer than 3, the light flashes.

Hints

Hint 1

lb count SENSOR Temperature Count counts the sensors.

Hint 2

slt fault count EXPECTED is 1 when one is missing.

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