The third part of l and s is the LogicType: the name of the value you want to read or write. The game knows more than 350 of them. Which ones a device has is listed in its Stationpedia entry under Logic.
The most important ones
| LogicType | Meaning | Unit |
|---|---|---|
On | switched on? | 0 / 1 |
Open | open (door, valve)? | 0 / 1 |
Lock | locked? | 0 / 1 |
Setting | set point / display value | depends on device |
Mode | operating mode | number, depends on device |
Temperature | temperature | Kelvin |
Pressure | pressure | kPa |
RatioOxygen, RatioCarbonDioxide … | gas share | 0 to 1 |
Charge, Ratio | charge / fill level | J or 0 to 1 |
Power | has power? | 0 / 1 |
The names are case-sensitive: Temperature works, temperature is an error. The checker in the IC10 coder underlines it right away.
Read or write?
A sensor only measures – you can read its Temperature, but not set it. If you try s d0 Temperature 300 anyway, the chip reports IncorrectLogicType. A display is the other way round: you write Setting, and exactly that number shows up on screen.
Shares are 0 to 1
RatioOxygen returns 0.21 for 21 % oxygen. For a percentage display, multiply by 100:
l r0 d0 RatioOxygen
mul r0 r0 100
s d1 Setting r0Diagram
Exercise
Task
A gas sensor is attached to d0, an LED display each to d1 and d2.
d1should show the pressure in kPa.d2should show the temperature in °C.
Hints
Hint 1
Pressure is called Pressure, the display takes its value through Setting.
Hint 2
For °C read the temperature first, then subtract 273.15.