Stationeers

Stationeers

33 ratings
Slightly-Less-Simple Logic Units!
By Hardly
It's not quite as easy as getting steel or airlocks, but here's a few basic designs to get you started on your journey of logic unit shenanigans.
   
Award
Favorite
Favorited
Unfavorite
The Basics
Currently, we have four kinds of "logic units"
  • a processor, which does maths, comparisons and more
  • an input/ouput module, which can read or write specific attributes from data-connected objects
  • a memory module, which can store things and bridge calculated values between logic networks
  • a switch the can be a toggle, a momentary button, or a nice big lever, for manual binary input.

All the logic units are made in the electronics printer, and each one of them is configured by using the screwdriver to adjust dials by the different terminals once everything is connected together. The processor and i/o modules require a power connection also.

Most logic units have screws to choose where the inputs come from, and what operation to perform on the inputs. Logic readers (and writers) also have a screw to choose which particular piece of information you're interested in from complex objects (like batteries, solar panels, sensors, etc...), and logic writers have a screw to choose which object (or which type of objects for a batch writer) the signal should be sent to.

The labeller can (and should!) be used to rename the different units in your circuit, so that it's easy to tell what does what, and correctly configure your logic units.

Don't forget that the "wires" are actually cables - they can carry many many logic network signals at the same time (and power as well).
A Disclaimer
These are *not* optimised designs. Not in behaviour, not in space taken up, not in power consumed or the number of logic units.

They are intended to help you get a feel for the possibilites of logic units - and then you can start doing your own cool shiny things that will work waaaay better than these designs.
Terrible Solar Tracking
2022-08-01 EDIT: Been jamming the latest update, solar tracking has changed a lot it seems. Once you build an adjustable solar panel, all you need is the two I/O modules. Read "Solar Angle" from the sensor, pipe that straight to the writer, and send that to the "Vertical" of the solar panel (which now appears to take an angle, not a percentage).

[OUTDATED]
A primitive auto-solar-panel-tracking circuit, which works by reading the solar angle from a sensor, converting it to a perectange, and sending the needed tilt percentage back to the solar panel.
  • make sure your sensor points towards the sunrise (0 degrees at sunrise, 180 at sunset)
  • make sure the sensor gets sunlight all day
  • there's a significant tracking error caused by the simple equation I've used - the panel has limits at either end of its tilt range, so e.g. 0% isn't actually 0 degrees tilt.
    • this would be a good place to start if you want to improve the effectiveness of the tracking
  • if you want to control a whole heap of solar panels, replace the logic writer with a batch writer (another option when placing the logic I/O). A batch writer writes to all connected devices of the same type, so when turning the output selector screw, it will cycle through the different device types that area connected, instead of the individual devices.
[/outdated]
Hybrid Solar control (computer + logic units)
This is a technique if you feel more comfortable working with the logic computer - but would like to avoid the hassle of controlling each solar panel individually. You can use the computer to set the value on a logic memory chip, then a logic I/O batch writer to send that value to every connected solar panel, which should save you a lot of clicking on the computer!
Count-up Timer
This is a timer which counts up in half-seconds (the simulation tick time), and outputs "1" (to represent True) when it counts past the target set up on Memory #0. The timer is reset by pulling the manual switch - the timer wil start again when the switch is pushed back down.
  • converting the desired time into half-seconds is a bit annoying - setting the increment step size in Memory #1 to 0.5 would let you use seconds for the target count
  • If you use the timer's output instead of the manual switch to reset the timer, you could probably get it to restart everytime it hits the target time.
  • Replacing the manual switch with input from another source could let the timer auto start - for example, triggering a timed event after someone walks past a motion sensor.
NAND (and thus, all boolean operators)
UPDATE:skip ahead a few paragraphs for a much less clunky way of processing logic operations using math processors instead
A bit of an ugly circuit, but only really needs two units (two select processors), as the 0 & 1 reference memories can be for your entire logic network, so it requires 2 units for the gate.

Since we can make a NAND, we can make all other boolean operators ....
(refer to this for how[en.wikipedia.org])
  • NOT (!) can be implemented with 1 NAND (2 processors)
  • AND (&&) can be implemented with 2 NAND (4 processors)
  • OR (||) can be implemented with 3 NAND (6 processors)
  • NOR can be implemented with 4 NAND (8 processors)
  • XOR can be implemented with 4 NAND (8 processors)

Logical Maths
Of course .... you're probably better going about this using math operations instead. I couldn't get my head around this initially, but several people were kind enough to epxlain how on the super helpful discord[discordapp.com].

  • Need (a AND b)? Test (a+b) == 2
  • Need (a OR b)? Test (a + b) > 0
  • Need (a XOR b)? Test (a + b) == 1
and so forth. Generally speaking, these implementations will need fewer logic circuits to implement, and are more efficiently adaptible to take more than 2 inputs.
D Flip Flop (+edge-triggered version)
A simple latched memory circuit, that I think emulates a D flip flop (I'm too tired to be certain right now). Stored value continuously matches the input for as long as the handle is pulled out, push the handle back down to store that value.

This version has an edge-triggered gate that replaces the simple handle of the circuit above - when you pull the handle, it will update once, then reset the handle and hold the new value until you pull the handle again.
UPDATE:with the new momentary logic buttons, this edge-trigger add-on is much less useful, so you probably won't need it
Tick Tock Oscillator
This is a simple looping circuit, depending on the "false <= 0", "true > 0" property used by many of the pseudobinary logic units. It goes on for one tick (half a second), then off for one tick. You can read the value off from just about anywhere in the circuit.

As suggested by @liq3 on the Stationeers Discord, you can also do this with a "< .5" or "== 0" compare operation (instead of the "multiply by -1" math operation used here) - which has the additional benefit that the output toggles nicely between 0 and 1, instead of -1 and 1, and so a) is a more "correct" output, and b) might require less processing in the circuits further downstream.

There's probably heaps of other ways to build similar timers - a useful way to challenge your understanding of the logic units system would be to develop your own tick tock oscillator circuit, to fit the needs of your own automation design.
A logic light-switch (& other remote-control switches)
A nice simple logic light switch to control the lights in a room.

Another simple example of using a Logic Switch (the lever variant, in this case) to control another object in game. You could replace the writer with the batch writer I/O variant to write to every connected device of a certain type.
5-LED meter for light-up displays
A bit of a clunky circuit - I'm sure it could be compacted and optimised a lot, but I laid it out like this for clariity. I used the labeller to name all the chips, so it was much easier to identify all the signals. This circuits interprets any number scaled to between 0 - 5, and shows the value on a light up meter like you might have on a sound system or somesuch.

As a bonus showcase, when I did this circuit the new low-profile can-be-hidden-beneath-walls-and-gratings logic units was in beta .... so you can expect to be able to tidy away all your logic circuits very soon!
Displaying APC battery charge %
This circuit reads the "ratio" attribute of an APC (which is between 0 and 1), and multiplies it by 100 to display on a console LCD display. Depending on how your power system is configured, it my be best to draw power from the "downstream" side of the APC - but you'd need to be careful then not to mix the power and datalines, or you'll get a powerloop around the APC (i.e. a short circuit) and all your wires could set themselves on fire. Burning wires continues to be considered a sub-optimal circuit feature for most applications.
More soon!
15 Comments
Hardly  [author] 15 Jul, 2018 @ 3:16am 
I should also note here that much of this is probly waaaaaaay out of date. It may still be useful to you, but I think the circuits system has moved a long way, and has many more capabilities. As always, talk to the awesome people on the official Discord channel, you can find plenty of logic assistance there, as with any other part of the game.
vincent.gabriel 15 Jul, 2018 @ 2:46am 
I suppose you can do a D latch with just two circuits. It would be possible with a single one if you could have the select use its own output. instead of a writer and memory, any passthrough circuit should do, e.g. a min/max with both inputs identical.

dlatch(x,s) =
y = if s then x else max(y,y)

single circuit version:
y = if s then x else y
Urtek 26 Jan, 2018 @ 7:06am 
To complement Rehndor idea, you can indeed do booleans with less logic units:
AND : A * B ( MIN(A,B) works also )
OR : MAX(A,B)
XOR : A != B ( != means "not equal" )
NOT : 1 - A (this one uses an additional memory chip to store 1)
Rehndor 22 Jan, 2018 @ 3:14pm 
Cool write up, thanks for the work.

Just one improvement about the AND gate.

Test (a+b) == 2
While this is certainly correct, it needs a math processor to add a and b, followed by a compare processor, to compare(equals) the sum with a "2" from memory.


It can also be done with just one math processor set to multiply.

0*0=0
0*1=0
1*0=0
1*1=1

Compare(equals) the result to "0" from memory, to make it a NAND gate.
Sasquatch 14 Jan, 2018 @ 5:32pm 
Ahh ok thank you for explaining.
Hardly  [author] 12 Jan, 2018 @ 3:10pm 
Ah. I think I made a mistake there - I think the replacement for the "multiply by -1" math operation should be a "less than 0.5" compare operation (I fixed this in the guide now, thanks for spotting it).

An "equals 0" compare operation would also work, which is probably a more intuitive solution.
Sasquatch 12 Jan, 2018 @ 8:06am 
I got your tick tock oscillator working, but I don't understand the .5 part to make it toggle 0 and 1 instead of -1 and 1. Can you explain further?
Hardly  [author] 29 Dec, 2017 @ 6:11pm 
Update: Added a note about using Math processors for logic, instead of my clunky NAND implementation.
Tasolth 24 Dec, 2017 @ 1:29pm 
D'oh, didnd't even think of the hybrid solar setup. Far easier than asigned a vertical to each panel...
LimberJorji 23 Dec, 2017 @ 7:30am 
@Hardly
I've been thinking all day about writing article like that):bbtcat:
Just went to the manuals page to see if its written by someone...
And thats it):praisesun: Good job Hardly. I wish you will not stop, so I don't have to write manuals):glory: