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

Day 345 of 365 · Expert · Month 12: Masterpieces

Big project: splitting

Splitting a big project: distribute tasks sensibly over chips, define interfaces between them and keep a register and memory plan for every chip.

Lesson 22 min Week 50

What you learn today

  • Distribute tasks across chips
  • Interfaces
  • Register and memory plan

The base automation does not fit on one chip. 128 lines, 4096 characters and 128 instructions per tick are enough for one subsystem, not for five. So it gets split up. The only question is: how?

Distributing tasks

The workshop splits by responsibility, not by lines:

ChipTaskown devices
life support (LS)pressure, air, temperatureventilation, filter, heater
power (EN)batteries, generator, load sheddinggenerator, comfort loads
production (PR)work through ordersfabricator
logistics (LG)count stockstorage
central (Z)overview, alarms, distribute ordersdisplays, klaxon

Every sub-chip only controls its devices. The central unit never switches a heater itself, it asks life support to do it. If the central unit fails, the subsystems keep running. If a subsystem fails, the central unit notices and reports it.

Interfaces

Between the chips only defined values flow over defined paths – Logic Memories or the setting of a housing. For every interface: one writer, clear meaning, clear value range. A sub-chip that does not understand a request does the safe thing and reports what it understood.

Several small values fit into one single status word, just as in bit week:

move status sup                  # bit 0: supply
ins status exh 1 1               # bit 1: exhaust
ins status fault 2 1           # bit 2: sensor fault
mul tmp flush 2
add tmp tmp normal
ins status tmp 4 2           # bits 4-5: understood request

Register and memory plan

Every chip has a plan of which register holds what, and every interface a note of who writes it. In the code the register plan is the alias block, the memory plan is in the header comment. Whoever changes a chip later sees straight away what he must not touch.

Warning

Two chips switching the same device fight each other: one switches on, the other off in the same tick. Every device has exactly one chip that controls it.

Exercise

Task

Build the ventilation sub-chip according to the interface in the header. The request is in the setting of its own housing: 0 off, 1 normal (supply “Zuluft” on below 95 kPa, off above 100 kPa, sensor “Raum”), 2 flush (supply and exhaust “Abluft” on). Unknown values count as off. The status word in the Logic Memory “Lueft_Status”: bit 0 supply, bit 1 exhaust, bit 2 sensor fault, bits 4–5 the understood request.

Hints

Hint 1

l req db Setting, then seq normal req 1 and seq flush req 2 – everything else is automatically “off”.

Hint 2

Supply: hysteresis as always, then and sup sup normal and or sup sup flush.

Hint 3

Status with ins: bits 0, 1, 2 one bit each, the request as two bits from bit 4.

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