Factorio SR Latch

In Factorio, you will find an RS latch that is also known as SR latch in several threads in some gaming forums. However, SR latch will be RS latch as the latch will reset when both inputs are true. The SR Latch will identify the usage of the accumulator when using a power source.

Unfortunately, there are a lot of Factorio players who get difficulty when working with SR latch. It’s so common, considering you should understand to use SR latch or RS latch, as it requires great understanding. No worries! Let’s find out everything about SR Latch in our post below!

How Does SR Latch Work in Factorio?

After taking a little research to find more about SR latch, we finally found the information in Reddit threads. According to reddit user @celem83, the accumulator drops below 20% and will send ‘S’. Well, the latch will realise that ‘S’ (1) will be greater than ‘R’ (0) and it dutifully outputs ‘S’. So, it will start the coal backup.

When the accumulator begins to charge, it will be now 21%, the decider then will then stop sending ‘S’. Well, here’s where the feedback comes in. The latch is outputting 1 ‘S’ and feeding it back into its own input, as well as onto the coal power plant. So, although when the original trigger stops to send it is ‘S’, the latch will still have S =1 and R = 0, so it can be confirmed to still be active.

When the accumulator finally hits 90%, the second decider will send ‘R’. Then, the latch realizes ‘S’ will no longer be greater than R (both are 1) and will stop sending it as ‘S’. This process will cut the power plant and its own feedback loop, and the latch will be reset.

According to Factorio Wiki, the process simply sets the ‘L’ (Lower Level) constant combinator and U (Upper Level) constant combinator to your thresholds. A After that, you can paste this puppy in there.  Afterwards, your reverse power will connect to the right-most pole and your primary power to the left substation.

It is actually intended for use for large solar or accumulator arrays. If accumulator power drops below %L, it will allow your reverse power (steam/ nuclear) until it achieves %U.

The Example of SR Latch Results

According to a Reddit user, @Linosaurus, the circuit logic updates like everything else in Factorio 60 times per second. He tried to count time in those updates (ticks). The two minutes (2*60*60) select below just as an example.

Let’s say the ‘S’ input turns on at time t=1. Here’s for the result:

t=0:

    • Red: Nothing.
    • Green: Nothing.
    • Combinator: 0>0.
    • No signal is the same as 0.
    • Therefore no output.

t=1:

    • Red: S=1.
    • Green: nothing.
    • Combinator: 1>0.
    • Next tick it will output S=1 (to the green wire).

t=2:

    • Red: S=1.
    • Green: S=1.
    • Combinator: 2>0.
    • Next tick it will output S=1.

It will stay exactly the same for a while.  Then, two minutes later, the input signal will stop since the accumulator is recharging.

t=7202:

    • Red: Nothing.
    • Green: S=1.
    • Combinator: 1>0.
    • Next tick it will output S=1.

t=7203:

    • Red: Nothing.
    • Green: S=1.
    • Combinator: 1>0.
    • Next tick it will output S=1.
    • Nothing further changed.
    • It is still set.

Then, two minutes later. It will be almost fully charged, so the reset signal becomes active.

t=14403:

    • Red: R=1.
    • Green: S=1.
    • Combinator: 1>1.
    • Next tick it will output nothing.

t=14404.

    • Red: R=1.
    • Green: Nothing.
    • Combinator: 0>1.
    • Next tick it will output nothing.

Here’s the SR Latch Blueprint

You can find the SR Latch blueprint here. However, we will also show you the Blueprint of SR Latch below, here you go!

0eNrNVttum0AQ/ZVonnHExcYOaitVefVDZStPlYW4rJORYEHLrl3L4gP6If2xfklnwSEE4xSspu0LWpaZ2TlzZg57hDBRLBfIJXhHwCjjBXhfj1DgIw8SvScPOQMPdiikoh0DeJDqjdpisobSAOQx+waeVRojPFctT7vXEyVLX9zybM/EpNijjJ5ark65MYBxiRJZnXv1cvC5SkMmKKuXg1VYyEBixilqnhVYLek8CjNxb2cGHGhh3s5KnU4njN2ECaJIpSoJZCZ64kzbcQygikqRJX7InoIdkgeZZUrmSvqDK/UZyjoSZ5E+qtA+ln48CsZ4GzTGVBGyRREplNWr1QKj3+fdz5uyD6/TZBGzCGMqfZSlIfILsK1n2HQcxCjqTKuy9ZXgFNOnbzE2mLYoinF1MaBgOsZwpyVUtUzzQFRQPPhANmMpWddR8gMhUFz6W5GlPnKKAd42SAp2iTHB4i5fM93BvUzaxI0B9gW/xTAip03uerplwOWbTFpjaNxiIpkYKRkPde2U1pw7s6Uem+E1G9jEs3HYzXfHvmxhd67E7gzD7vYr5xlo+/eC9XxcM61XDOtpYmoWqjZ7NYQfx2lcp/frQblXZteOjtkTk9Xa1HN2r6yuzd1rm75azq8TQ/M/18KHMy38+f3HFWq4+oNqOH1fNVyMYtL8+0SuryFydUbkp3/8U3O6A/rmJcS+SHrvoNtDdaF793EvdMVdU4qUxajSCUsIo8BokmcJO+8L99QVOu3qluq1LtIGJEHIqOCwXt180dp7swxq6d3RD6OK4i7mtunOXGcxLctfml3uZg==

You can use the blueprint to copy a set of buildings. The blank blueprint can also be crafted by clicking the ‘blueprint icon’ button in the shortcut bar.

If you also want to create a blueprint, you can just choose the blueprint item out of the toolbar or the inventory. Using the blueprint icon that is shown beside the mouse cursor, you can then click and hold the left mouse button and then drag a box as large as needed.

It is known that all buildings included in the blueprint will be highlighted with a green square. After everything to copy is inside the drag box, you can then release the mouse button and the Blueprint icon setup menu will open.

RS Latch Configuration

RS Latch Configuration

We got the example of RS Latch configuration from Factorio Wiki shown in the picture above. The example will be turning on the steam generator when the Accumulator charge drops to 20%. However, it will latch the On Sale until the accumulator is charged to 90%.

In this case, latching will be used to introduce hysteresis and prevent power switch rapidly cycling on and off when the accumulator fails to 19%, charges to 20% and falls to 19% and others.

After that, the accumulator will output the current charge level as % on signal ‘A’. The first decider will output ‘Set’ (S= 1) if the accumulator is less than 20%. The second decider will output ‘Reset’ (R=1) after the accumulator is more than 90% full.

The RS Latch configuration will start when the central decider and green feedback wire is actual RS latch. It will latch the ‘Set’ signal (S) until the Reset Signal ( R ) is received and vice versa.

It’s important to note, the latch will expect binary inputs ( S & R should be 0 or 1). So, that’s why the previous two deciders will be required. When both inputs are true, the reset signal will then take priority and the latch will reset. It means that it is an RS latch, instead of an SR Latch.

Well, the Power Switch will isolate the generator from the rest of the factory until ‘S’ = 1. It must be familiar to everyone with any background in electronics. Well, the signal will be set and reset with the constant combinators on the left by adjusting an A= 1 signal. The latch ‘remembers’ that one was last set and the light will stay on until another signal is totally received.

Leave a Reply

Your email address will not be published. Required fields are marked *