stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. Stationeers wiki
  3. IC10
  4. IC10: control a device by name

IC10

IC10: control a device by name

With lbn and sbn you address any number of devices by their name – no pin limit. How it works and what to watch out for.

Checked with 0.2.6428.27798 Updated Oct 20, 2026

An IC Housing has six pins, d0 to d5. For a small controller that is enough. But once ten vents, three sensors and a display join in, it gets tight. The solution: address devices by their name. That reaches every device on the data network – no pins needed.

This article sums up the essentials. The IC10 academy goes deeper, with exercises.

The two instructions

InstructionFormEffect
lbnlbn r? deviceHash nameHash logicType batchModereads a value from all matching devices
sbnsbn deviceHash nameHash logicType r?writes a value to all matching devices

Matching means: same device type (prefab hash) and same name.

The device hash

Every device has a fixed prefab hash. For the Active Vent it is -1129453144. You find the hash at the top of every device page in this wiki, with a copy button, or in the Hash lookup.

The name

You give the device its name in game with the Labeller. In the program HASH("…") turns it into a number. HASH is replaced when the script is saved, so it may appear wherever a number may appear – including after define. Names with spaces are fine:

define NAME HASH("Storage Vent")
Same name, several devices

Give all vents in a room the same name. A single sbn then switches all of them at once.

The batch mode when reading

When several devices match, the batch mode decides what lbn returns:

ModeNumberResultwhen no device matches
Average0averageNaN
Sum1sum0
Minimum2smallest value0
Maximum3largest value−infinity
Count4number of devices0

For readings, always use 0 (Average). With Sum a mistake only shows once a second device with the same name is built: two sensors at 400 K each suddenly read 800 K.

Average returns NaN when no device with that name is found – after a typo in the name, for example. NaN silently spreads through every calculation. So catch it right away:

lbn pressure SENSOR NSENSOR Pressure 0
bnan pressure start

What else you need to know

  • Batch instructions only work over the data cable network, not over the pins.
  • If the IC housing has no data network at all, the chip stops with an error.
  • If a device cannot read or write the logic type, the chip stops as well. Which values a device knows is listed on its page under “IC10 and logic”.
  • Every main loop needs a yield. Device values only change once per tick (0.5 s).
  • If the program runs past its last line, the chip stays stopped for good. That is why every loop ends with j start.

A complete example: holding room pressure

A Gas Sensor named “Storage Sensor” measures the pressure. If it drops below 95 kPa, all vents named “Storage Vent” blow air into the room until 101 kPa is reached.

# Hold room pressure: vents by name
define SENSOR -1252983604      # Gas Sensor (StructureGasSensor)
define VENT -1129453144        # Active Vent (StructureActiveVent)
define NSENSOR HASH("Storage Sensor")  # name of the sensor
define NVENT HASH("Storage Vent")      # name of the vents
define PMIN 95                 # kPa, switch on below
define PMAX 101                # kPa, switch off above
alias pressure r0
alias run r1
alias low r2
alias high r3

# --- 1. Once at start: set the direction ---
sbn VENT NVENT Mode 0          # 0 = outward (into the room)
start:
yield
# --- 2. Read pressure and switch ---
lbn pressure SENSOR NSENSOR Pressure 0
bnan pressure start            # no sensor with this name
slt low pressure PMIN
sgt high pressure PMAX
select run low 1 run           # too little pressure: on
select run high 0 run          # enough pressure: off
sbn VENT NVENT On run
j start

How to read it:

  1. The define lines keep all numbers in one place. For a different pressure you only change PMIN and PMAX.
  2. The alias lines give the registers readable names.
  3. Mode is written only once, before the loop. There is a reason: every write to Mode resets the active vent's target pressures, even when the same value is already set. In mode 0 that means PressureExternal = 101.325 kPa and PressureInternal = 0. If the line sat inside the loop, a target pressure of your own would be gone after one tick.
  4. slt and sgt set low and high to 1 or 0.
  5. The two select lines build a hysteresis: between 95 and 101 kPa the last state is kept. Without it the vents would keep switching on and off.
Added a vent later?

A vent you build after the chip has started does not get the Mode from section 1. Check its direction in game or restart the chip.

Every device page in this wiki also has a short example in the same style that addresses exactly that device by name.

Continue in the academy

Esc
↑ ↓ selectEnter open/ opens search anywhere