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

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

Control desk: dial, lever, button

Dial, lever and button make the base operable for fellow players. The chip reads them together, guards them and shows back what it really works with.

Lesson 16 min Week 17

What you learn today

  • Dial as a setpoint
  • Collect several controls
  • Show feedback

A control desk makes your base operable for fellow players. They turn the dial, flip a lever, press a button, and the chip carries it out. Three parts are enough for almost everything.

The controls

PartPrefabvaluebehaviour
dialStructureLogicDialSettingposition 0 to upper limit, whole numbers
leverStructureLogicSwitchOpen0 or 1, stays put
buttonStructureLogicButtonActivateshort pulse, about 0.55 s

The dial as a setpoint

The dial has an adjustable upper limit. It sits in Mode and, according to the game code, goes up to 1000. With the screwdriver you change it in steps of ten, with the extra key held in steps of one. The position itself sits in Setting, and Ratio is Setting / Mode.

For a target temperature you set the upper limit to 30. Then the position is directly the temperature in °C:

lbn target DIAL HASH("Solltemp") Setting Average
add target target CELSIUSOFFSET  # position in C, now in K

For a valve or a pump Ratio is handier: 0 to 1, no matter how finely the dial is divided.

Collecting several controls

Read all controls at the start of the pass, guard them and afterwards only work with the registers:

lbn target DIAL HASH("Solltemp") Setting Average
lbn enabled LEVER HASH("Heizung") Open Average
lbn button BUTTON HASH("Boost") Activate Average

Every element gets a safe substitute: no lever means “off”, no dial means the default value, no button means “not pressed”.

Showing feedback

A desk without feedback invites people to keep turning. Show the value the chip really works with, that is after the fallback, boost and limits:

sbn DISPLAY HASH("Pult Soll") Setting target
sbn LAMP HASH("Pult Bereit") On enabled
Warning

A dial with upper limit 0 only knows the position 0, and Ratio is even NaN then, because 0 is divided by 0. If nobody set the upper limit, your chip always sees 0 °C. So limit the setpoint from below.

Tip

If the chip itself writes a Setting onto a dial, the game limits it to 0 up to the upper limit and cuts off the decimals. The dial then visibly turns along.

Diagram

Reading with l, writing with s Gas sensor (d0) Temperature 293.15 IC10 r0 = 293.15 Wall light (d1) On 1 l r0 d0 Temperature device → register s d1 On 1 value → device
Three controls, one chip: read, guard, process, show feedback.

Exercise

Task

Control desk for the hall: dial “Solltemp” (position = °C), lever “Heizung”, button “Boost”, LED “Pult Soll”, wall light “Pult Bereit”. Gas sensor and wall heater are called “Halle”.

  • Setpoint from the dial, 20 °C without a dial. A button press (edge) adds 3 °C for 20 ticks. Then limit to 10 to 30 °C.
  • The display shows this setpoint, the light follows the lever (off without lever).
  • Heater: hysteresis ±1 K around the setpoint, only while the lever is on. Sensor failure: off.

Hints

Hint 1

Dial: snan and select with FALLBACK. Lever: sgtz. Button: edge as on day 79.

Hint 2

Boost: set the remaining time to BOOSTTIME on the edge, count it down, add BOOST while it runs.

Hint 3

Limit and display first, then convert to Kelvin and enable the hysteresis with and heat heat enabled.

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