Overview
Logic Compare (StructureLogicCompare) in Stationeers: device, hash -1489728908, 10 W. With build steps, 9 IC10 logic values and connection diagram.
The logic compare is the heart of a controller without a chip. It receives two values on its two data inputs and checks them against each other. The result – true or false – sits in its Setting, which is read only.
What it checks is set by Mode:
| Mode | Name | checks |
|---|---|---|
| 0 | Equals | equal |
| 1 | Greater | first input larger |
| 2 | Less | first input smaller |
| 3 | NotEquals | not equal |
Mode is readable and writable. 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).
A typical chain: a Logic Reader delivers the pressure, a Logic Memory the limit 95, the compare is set to Less, and a Logic Writer writes the result into On of a vent.
Two traps: Equals almost never hits with readings, because a sensor value rarely lands exactly on a number – use Greater or Less. And a single comparison has no hysteresis: the device behind it keeps switching back and forth at the limit. How a chip solves this with two limits is shown in 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 Compare address by name
define DEVICE -1489728908 # StructureLogicCompare
define NAME HASH("Logic Compare") # 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 = Equals, 1 = Greater, 2 = Less, 3 = NotEquals
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.