1-Combinator RS-latch

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Achating
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Oct 30, 2024 8:31 pm
Contact:

1-Combinator RS-latch

Post by Achating »

Hey,
Idea popped in my head, that it should be possible to make single-input single-combinator RS-latch with new decider combinator. So I made one:
10-30-2024, 22-33-05.png
10-30-2024, 22-33-05.png (672.44 KiB) Viewed 13580 times
On the screenshot I recreated example of the backup steam generators from wiki using new latch design.

I have created parametrized blueprint for general use:


Notes:
- Output is "green" signal by default
- Red wire used as a memory cell

Have fun :)
daemuth
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Nov 02, 2024 8:21 pm
Contact:

Re: 1-Combinator RS-latch

Post by daemuth »

Hey dude! This is awesome! I randomly bumped into this while making my own "smart assembler" and have used it to make my setup nice and compact:


Thanks for posting!
CircuitBreaker
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Nov 04, 2024 10:20 pm
Contact:

Re: 1-Combinator RS-latch

Post by CircuitBreaker »

Cool! I've now used this in my fuel processing setup (when to crack heavy oil into light oil etc.). Very useful, thank you!
TomyTheBest
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Jul 11, 2015 6:21 am
Contact:

Re: 1-Combinator RS-latch

Post by TomyTheBest »

This is epic.
you should ask for a 1$ license fee every time when someone using it.
I already owe a full tank gas ...
coffee-factorio
Filter Inserter
Filter Inserter
Posts: 283
Joined: Thu Oct 17, 2024 10:56 pm
Contact:

Re: 1-Combinator RS-latch

Post by coffee-factorio »

I was looking at this because I didn't get to 1 combinator RS latch but I had the idea it could be done.
Because I made a 1 combinator resetting clock.

You have two input conditions: t < value and r == 0. Two output conditions: 1 qty t and output total quantity of ts. This is done on a standard back fed logic single combinator clock. I have a videya of it and wanted to see if it was a novel idea or if it was already covered in a Friday Fast Facts or similar. I know I have my idea of how an RS Latch works and might try and come up with another video but if I do I wanna give people credit for being coming up with cool stuff :)

It isn't the timer that pauses from the tutorial. It definitely cycles. You'd have to use an rs latch as a guard for the demo purpose I think it has, which is switching a mall resource line on and off (because malls can halt while you build up small logistics; versus dedicated construction products that need to work till they end or research - which doesn't really end in theory).

I'll put a still frame from the video on this post when I get round to editting it.
phant0m
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Nov 20, 2024 6:47 am
Contact:

Re: 1-Combinator RS-latch

Post by phant0m »

Hi,

Thanks for the idea! I've updated the latch for more general usage. Red wire is used as a memory cell.

A > 0 is the set signal.
B > 0 is the reset signal.

The logic I thought of is as follows:
We want to output S if A > 0 or S > 0, but not B > 0, so
[(A > 0) OR (S > 0)] AND [NOT (B > 0)]
[(A > 0) OR (S > 0)] AND (B = 0)
[(A > 0) AND (B = 0)] OR [(S > 0) AND (B = 0)]

I have not actually tested this thoroughly, please correct me if there's any issues with this setup.
Capture.PNG
Capture.PNG (77.29 KiB) Viewed 11996 times
Hudy01
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 29, 2024 8:40 am
Contact:

Re: 1-Combinator RS-latch

Post by Hudy01 »

and....I just use a box: :?
and set ON time by transport belt length :))
11-29-2024, 10-48-50.png
11-29-2024, 10-48-50.png (1.57 MiB) Viewed 11643 times
11-29-2024, 10-49-12.png
11-29-2024, 10-49-12.png (1.17 MiB) Viewed 11643 times
SuicideJunkie
Fast Inserter
Fast Inserter
Posts: 128
Joined: Wed Aug 23, 2017 10:17 pm
Contact:

Re: 1-Combinator RS-latch

Post by SuicideJunkie »

phant0m wrote: Sun Nov 24, 2024 9:22 am Hi,

Thanks for the idea! I've updated the latch for more general usage. Red wire is used as a memory cell.
...
I have not actually tested this thoroughly, please correct me if there's any issues with this setup.
I'm not clear on how that differs significantly from the classic; {S} > {R} ? Output 1x {S} (+Wire output to input)

2.0 could add some sidecar values to the classic latch using the additional output options; they would a running tally or a clock depending on your use case of 1 and input count options.
gGeorg
Filter Inserter
Filter Inserter
Posts: 487
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: 1-Combinator RS-latch

Post by gGeorg »

Slightly improved original idea,
input is restricted, (to green_only AND red_only) so it doesn’t mix with others. In case you use it in some far intriguing scenario.
01-10-2025, 07-40-37.png
01-10-2025, 07-40-37.png (359.1 KiB) Viewed 9804 times
leograyc
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jan 11, 2025 10:47 pm
Contact:

Re: 1-Combinator RS-latch

Post by leograyc »

This is such a great step up. I've browsed for 2 nights of normal RS-latch stuff till I see this.

I made a account just to give you a thumbs up.


________$$$$
_______$$__$
_______$___$$
_______$___$$
_______$$___$$
________$____$$
________$$____$$$
_________$$_____$$
_________$$______$$
__________$_______$$
____$$$$$$$________$$
__$$$_______________$$$$$$
_$$____$$$$____________$$$
_$___$$$__$$$____________$$
_$$________$$$____________$
__$$____$$$$$$____________$
__$$$$$$$____$$___________$
__$$_______$$$$___________$
___$$$$$$$$$__$$_________$$
____$________$$$$_____$$$$
____$$____$$$$$$____$$$$$$
_____$$$$$$____$$__$$
_______$_____$$$_$$$
________$$$$$$$$$$
gargamel9
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Oct 26, 2019 5:40 pm
Contact:

Re: 1-Combinator RS-latch

Post by gargamel9 »

gGeorg wrote: Fri Jan 10, 2025 6:41 am Slightly improved original idea,
input is restricted, (to green_only AND red_only) so it doesn’t mix with others. In case you use it in some far intriguing scenario.
01-10-2025, 07-40-37.png
Hi there. I've been trying to use this to regulate the output of light oil. The idea is for the pump to work when the oil reaches a certain level and then continue to pump until it reaches another one, say from 190.000 to 180.000 (so the pump not just starts at 190.000 and then stops when it reaches 189.000 almost instantly)
Its there a way to do that?
thx
gGeorg
Filter Inserter
Filter Inserter
Posts: 487
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: 1-Combinator RS-latch

Post by gGeorg »

gargamel9 wrote: Mon Nov 24, 2025 9:27 pm
gGeorg wrote: Fri Jan 10, 2025 6:41 am Slightly improved original idea,
input is restricted, (to green_only AND red_only) so it doesn’t mix with others. In case you use it in some far intriguing scenario.
01-10-2025, 07-40-37.png
Hi there. I've been trying to use this to regulate the output of light oil. The idea is for the pump to work when the oil reaches a certain level and then continue to pump until it reaches another one, say from 190.000 to 180.000 (so the pump not just starts at 190.000 and then stops when it reaches 189.000 almost instantly)
Its there a way to do that?
thx
Sure, you want classic hysteresis.
https://en.wikipedia.org/wiki/Hysteresis
SetUp First line value at 190.000
SetuUp last line value at 180.000
Change both "<" signs into ">"

Basically, you are turning the direction of hysteresis other way around.
Post Reply

Return to “Combinator Creations”