#Restock Latch Circuit?

1 messages · Page 1 of 1 (latest)

silk laurel
#

Circuit novice here. I'm trying to create what would basically be a T-flipflop in Minecraft terms.

I want a circuit that a) turns on when the stock of a given resource is below 2000, and then b) turns off when it's above 4000. However, if the current amount is between 2000 and 4000, the circuit state shouldn't change (so even if the stock drops below 4000, restocking doesn't trigger until 2000).

I know how to read the current stock, and I've figured out the "easy version" where it just turns on below 4000/off above 4000, but I'm struggling a bit with the more complex latch. Haven't really used circuits before at all despite hundreds of hours with the game, because I'm lame. 😛

Modded playthrough (Krastorio) but I don't think that affects circuit logic.

rough pagoda
#

Usage of RS latch

Here is an example of how you could use an RS latch.
The two extra decider combinators provide the set and reset conditions.
Petroleum gas < 50 and petroleum gas > 100.

This is how they describe a possible usage, which matches your scenario closely.

silk laurel
#

That's perfect, thank you! Just didn't have the right terminology to search for it. 🙂

rough pagoda
#

You're welcome.

And the entire cookbook there is interesting, if you're thinking about other things.

cyan lily
#

+faq srlatch