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

Day 89 of 365 · Beginner · Month 3: First systems

Exam preparation beginner

All instructions of the beginner level at a glance, the most important traps once more and a warm-up exercise before the exam.

Lesson 20 min Week 13

What you learn today

  • Repeat all instructions of the level
  • Go through the traps once more
  • Practice questions

The beginner exam is the day after tomorrow. Today you go through everything you need for it once more. Write down where you are unsure and look up the matching lesson.

The instructions of the level

FamilyInstructions
mathmove add sub mul div mod abs min max sgn lerp
roundinground trunc floor ceil
comparingslt sgt sle sge seq sne and the z forms, select
logicand or xor nor
NaNsnan snanz bnan
jumpsj beq bne blt bgt ble bge, z forms such as beqz
flowyield sleep
devicesl s lb sb lbn sbn ls lbs
orderdefine alias HASH("…")

The traps

  • Program end: if the chip runs past the last line, it stops for good. Every control needs j start.
  • No yield: the chip runs 128 instructions and continues in the middle of the loop during the next tick. No error, but all values are the same 128 times.
  • sleep on line 0: never put it at the very beginning.
  • Numbers: dot instead of comma, no 1e5. $FF and %1010 are allowed.
  • define with define: define B A gives NaN, without an error message.
  • Batch modes: Average returns NaN when no device matches, Sum adds up sensors with the same name. For readings always use Average.
  • Names: with lbn type and name must match. Device names ASCII only.
  • Bare LogicTypes: move r0 Temperature is an error, at number positions it is LogicType.Temperature.

How the exam works

The exam on day 91 draws 20 questions from a larger pool, you have 40 minutes and need 70 %. You do not have to write code, but you do have to read it. Work along line by line, as in lesson 85.

move r0 7
div r0 r0 2        # r0 = 3.5
floor r1 r0        # r1 = 3
sgt r2 r0 3        # r2 = 1
select r3 r2 10 20 # r3 = 10
Tip

Always work out Kelvin tasks via the difference: 20 °C is 293.15 K because 0 °C is 273.15 K. An error of 273 stands out at once if you expect it.

Warning

With round and numbers ending exactly in .5, do not rely on your expectation. Exam questions avoid this case, and your own scripts should too.

Exercise

Task

A warm-up calculation, without devices. r0 holds a temperature in Kelvin, r1 a pressure in kPa. Work out:

  • r2 = temperature in °C
  • r3 = 1 if the temperature is between 18 and 25 °C (limits included), otherwise 0
  • r4 = 1 if the pressure is below 90 or above 110 kPa or is NaN, otherwise 0
  • r5 = pressure limited to the range 0 to 100
  • r6 = Color.Red if r4 = 1, otherwise Color.Green

The program may stop at the end.

Hints

Hint 1

Band with sge and sle, combined with and.

Hint 2

Pressure warning: slt, sgt, or, then also snan and one more or.

Hint 3

Limit with max … 0 and min … 100, colour with select colour warn Color.Red Color.Green.

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