Overview
Logic Math (StructureLogicMath) in Stationeers: device, hash 1657691323, 10 W. With build steps, 9 IC10 logic values and connection diagram.
The logic math unit calculates with the values on its two data inputs and puts the result into its Setting, which is read only. Mode picks the operation:
| Mode | Name | Mode | Name |
|---|---|---|---|
| 0 | Add | 4 | Mod |
| 1 | Subtract | 5 | Atan2 |
| 2 | Multiply | 6 | Pow |
| 3 | Divide | 7 | Log |
There is also a data output and a power port of its own; according to the game data it draws 10 W. It is built from the Kit (Logic Processor).
Two practical examples:
- Kelvin to degrees Celsius:
Subtractwith the temperature on the first input and a Logic Memory holding 273.15 on the second. 293.15 K becomes 20. - Oxygen partial pressure:
MultiplywithPressureandRatioOxygenof the same sensor. 100 kPa × 0.21 gives 21 kPa.
For Subtract, Divide, Mod and Pow the order of the inputs matters. If Setting shows the wrong sign, the cables are usually swapped.
For functions of a single value, such as Abs, Round or Sqrt, there is the Math Unary. Once the chain gets longer than three or four units, a chip is easier to follow – see Logic without a chip: reader, writer, memory, compare, math.
IC10 and logic
9 logic values, 9 readable and 2 writable.
-
PowerR 1 -
ModeRW 3 -
ErrorR 4 -
SettingR 12 -
OnRW 28 -
RequiredPowerR 33 -
PrefabHashR 84 -
ReferenceIdR 217 -
NameHashR 268
Example: address by name
Reads Setting, shows the value on the IC housing and writes On. Name the device with the labeller first; devices with the same name are addressed together.
# Logic Math address by name
define DEVICE 1657691323 # StructureLogicMath
define NAME HASH("Logic Math") # name in game (labeller)
define TARGET 1 # On 1 = on
alias value r0
start:
yield
lbn value DEVICE NAME Setting 0 # 0 = average of all with this name
bnan value start # no device with this name
s db Setting value # show on the housing
sbn DEVICE NAME On TARGET # set value
j startAcademy: devices by name Academy: batch modes IC10 academy IC10 editor
Connections
- 1Data · input
- 2Data · input
- 3Data · output
- 4Power
Slots and modes
Modes: 0 = Add, 1 = Subtract, 2 = Multiply, 3 = Divide, 4 = Mod, 5 = Atan2, 6 = Pow, 7 = Log
Building and deconstruction
Grid: small grid (0.5 m) · mounting: on wall or floor
- 1
Total material
Deconstruction returns
Built with: Kit (Logic Processor)
Material, fire and recycling
Flammable according to game data: flash point 373.2 K (100 °C); Autoignition 573.2 K (300 °C); burn time 5 s
Raw values from the game code (5)
Field names as in the game code, untranslated. Useful for mods and exact limits.
LogicUnitProcessor.Input2Index | 1 |
LogicUnitProcessor.Input3Index | -1 |
LogicUnitBase.ConnectionType | FlatExhaustive |
LogicUnitBase.Input1Index | 0 |
LogicUnitBase.OutputIndex | 1 |
See also
- Logic without a chip: reader, writer, memory, compare, mathWith logic readers, writers, compare, math and memory units you build simple controls with no program at all. What each part does, what it costs and when the chip is the better choice.