Page 1 of 1

1-Combinator RS-latch

Posted: Wed Oct 30, 2024 8:38 pm
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 5229 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 :)

Re: 1-Combinator RS-latch

Posted: Sun Nov 03, 2024 8:09 pm
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!

Re: 1-Combinator RS-latch

Posted: Wed Nov 13, 2024 5:34 pm
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!

Re: 1-Combinator RS-latch

Posted: Thu Nov 14, 2024 2:37 pm
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 ...

Re: 1-Combinator RS-latch

Posted: Sat Nov 16, 2024 2:15 am
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.

Re: 1-Combinator RS-latch

Posted: Sun Nov 24, 2024 9:22 am
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 3645 times

Re: 1-Combinator RS-latch

Posted: Fri Nov 29, 2024 8:50 am
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 3292 times
11-29-2024, 10-49-12.png
11-29-2024, 10-49-12.png (1.17 MiB) Viewed 3292 times

Re: 1-Combinator RS-latch

Posted: Thu Jan 02, 2025 10:20 pm
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.

Re: 1-Combinator RS-latch

Posted: Fri Jan 10, 2025 6:41 am
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 1453 times

Re: 1-Combinator RS-latch

Posted: Sat Jan 11, 2025 11:33 pm
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.


________$$$$
_______$$__$
_______$___$$
_______$___$$
_______$$___$$
________$____$$
________$$____$$$
_________$$_____$$
_________$$______$$
__________$_______$$
____$$$$$$$________$$
__$$$_______________$$$$$$
_$$____$$$$____________$$$
_$___$$$__$$$____________$$
_$$________$$$____________$
__$$____$$$$$$____________$
__$$$$$$$____$$___________$
__$$_______$$$$___________$
___$$$$$$$$$__$$_________$$
____$________$$$$_____$$$$
____$$____$$$$$$____$$$$$$
_____$$$$$$____$$__$$
_______$_____$$$_$$$
________$$$$$$$$$$