SR-latch

This is the place to request new mods or give ideas about what could be done.
Post Reply
Dragonling
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Sep 12, 2019 2:00 pm
Contact:

SR-latch

Post by Dragonling » Fri Sep 13, 2019 6:03 am

I have searched over the requests, and haven't found this one.

A Set-Reset Latch is a circuit network item, that starts emitting a signal when a "set" event (logical condition) occurs, and stops emitting the signal only when a "reset" event occurs. One of the obvious applications is using this contraption to turn on steam generator reserve when accumulators' energy level is 1% or less, and turn them off, when accumulators charge up to, say, 20% (this allows to avoid flickering). But it has much more uses than just that example.

It is common knowledge, that a Set-Reset Latch can be implemented with 3 combinators, as per the Cookbook. However, not every player is skilled enough to understand, how it works and is built (my personal case: coop with family). Also, not every player can understand English enough to read the Cookbook.

Would someone, please, implement SR-latch as a simple to use single item?

User avatar
brunzenstein
Filter Inserter
Filter Inserter
Posts: 887
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: SR-latch

Post by brunzenstein » Fri Sep 13, 2019 7:05 am

https://youtu.be/vEOXGBYR6oM
Its in plain English and easy to understand, follow and use therefore easily


User avatar
planetmaker
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Jan 21, 2019 9:30 am
Contact:

Re: SR-latch

Post by planetmaker » Fri Sep 13, 2019 8:10 am

My suggestion: create a blueprint for the SR latch and share it with those people (e.g. your family).

Of course, switching on backup power, is the most obvious use, it is not common enough to warrant a special item for that in the vanilla game IMHO (maybe one can make a mod to create such item - then you could use that mod).

Dragonling
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Sep 12, 2019 2:00 pm
Contact:

Re: SR-latch

Post by Dragonling » Fri Sep 13, 2019 8:37 am

planetmaker wrote:
Fri Sep 13, 2019 8:10 am
(maybe one can make a mod to create such item - then you could use that mod).
Well, yes, let's hope for that. After all, I am posting this request in the forum branch called "Ideas and requests for mods".
I am thankful for everyone trying to help me by suggesting workarounds, but I am looking for anyone with goodwill to make the quality of life mod, which will not require additional actions or special knowledge.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2218
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: SR-latch

Post by Optera » Fri Sep 13, 2019 8:59 am

planetmaker wrote:
Fri Sep 13, 2019 8:10 am
My suggestion: create a blueprint for the SR latch and share it with those people (e.g. your family).

Of course, switching on backup power, is the most obvious use, it is not common enough to warrant a special item for that in the vanilla game IMHO (maybe one can make a mod to create such item - then you could use that mod).
Not common had me chuckle.
Every single of my production lines is behind an sr-latch, with delayed off timer to clean belts before turning off power.
Then again I'm probably the minority enjoy fine tuning automation with combinators.

Having a dedicated latch combinator instead of two could reduce my combinator count a fair bit.

User avatar
planetmaker
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Jan 21, 2019 9:30 am
Contact:

Re: SR-latch

Post by planetmaker » Fri Sep 13, 2019 10:19 am

Optera wrote:
Fri Sep 13, 2019 8:59 am
planetmaker wrote:
Fri Sep 13, 2019 8:10 am
My suggestion: create a blueprint for the SR latch and share it with those people (e.g. your family).

Of course, switching on backup power, is the most obvious use, it is not common enough to warrant a special item for that in the vanilla game IMHO (maybe one can make a mod to create such item - then you could use that mod).
Not common had me chuckle.
Every single of my production lines is behind an sr-latch, with delayed off timer to clean belts before turning off power.
Then again I'm probably the minority enjoy fine tuning automation with combinators.

Having a dedicated latch combinator instead of two could reduce my combinator count a fair bit.
On the chance to have this going a bit off-topic: Agreed, yes. Arguably there are playstyles and setups where they are common (and I find them quite a commodity use them for power and situations like you describe myself). Yet... I doubt that qualifies as 'majority of players use it and need it'.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2147
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: SR-latch

Post by darkfrei » Fri Sep 13, 2019 10:34 am

Dragonling wrote:
Fri Sep 13, 2019 8:37 am
Well, yes, let's hope for that. After all, I am posting this request in the forum branch called "Ideas and requests for mods".
I am thankful for everyone trying to help me by suggesting workarounds, but I am looking for anyone with goodwill to make the quality of life mod, which will not require additional actions or special knowledge.
This entity must be at least 2x2, maybe 3x3 tiles, one edge as R, the second as S, another two edges are output values with Q and not(Q).
If any on S, then Q is same as S, nothing on not(Q) and holding this value;
when any on R then nothing on Q, but not(Q) has the value of R;
if nothing on S and R then hold the value;
if both S AND R then Q and not(Q) are nothing.

It can be done with two lamps as input, two constant combinators as output and control.lua calculations on each tick;
or as hidden arithmetic and decider combinators without control.lua on tick, just on entity placing.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2218
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: SR-latch

Post by Optera » Fri Sep 13, 2019 2:09 pm

Performance of any lua scripted combinator will be magnitudes worse than dedicated circuit logic.
Especially if all an sr latch requires is 2-3 combinators. Personally I prefer the 3 combinator variant with one decider set to if R == 0 then everything = 1 and dedicated combinators to trigger set and reset signals as those are easier to set up for multiple set and reset conditions and also easier to check remotely.

Post Reply

Return to “Ideas and Requests For Mods”

Who is online

Users browsing this forum: No registered users