Need help making delayed output circuit

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Yogzototh
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun Apr 30, 2017 7:00 pm
Contact:

Need help making delayed output circuit

Post by Yogzototh »

Hello everyone!
The circuit system confuses me greatly, so while i have managed to understand how existing examples (like timers and latches) work, i have trouble figuring how to make the following setup:

Code: Select all

One boolean input
If input is 0, output is 0
If input is 1, set output to 1 after 10 seconds.
If input goes to 0 at any point, set output to 0 and reset timer back to 10 seconds.
Any advice? I've tried playing around with the timer design offered in the tutorial section but cant find a way to make it work with an external trigger that can set and reset it.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3612
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Need help making delayed output circuit

Post by DaveMcW »



10-second-delay.jpg
10-second-delay.jpg (94.21 KiB) Viewed 1029 times

Yogzototh
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun Apr 30, 2017 7:00 pm
Contact:

Re: Need help making delayed output circuit

Post by Yogzototh »

Thanks! Now to reverse engineer this setup...
DaveMcW wrote:
Sat Dec 28, 2019 5:59 pm
A blueprint with "each" signal
This is fucking sorcery. No surprise i couldnt figure this on my own considering i didnt know how exactly this stupid yellow asterisk works.

Also, i wonder - is this the best approach to "smooth" an input that might oscillate?
Basically, i have my defenses (along with a lot of solar panels and batteries) on a separate power grid. Normally it is linked to the production grid so that excess power flows there. However, if there is some problem in the factory and its losing power real hard (so that it would drain battery charge from defense grid) the defense grid shuts off. If its daytime, the defense grid then instantly recovers to 100% and the power link ends up oscillating.
That's what i've been trying to prevent with this circuit set up.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3612
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Need help making delayed output circuit

Post by DaveMcW »

Accumulators fill at a rate of 6% per second, so you could use the RS latch example with a couple different accumulator levels.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: Need help making delayed output circuit

Post by TruePikachu »

For people who don't want to import the blueprint above, the settings are as follows (where → represents value assignment and ⇒ represents decider true/false assignment):
  • Green-wire constant is 1→✓
  • Red-wire constant is 1→A 1→B
  • Arithmetic is EACH*✓→EACH
  • Left decider is A>0→B (note there's a looparound wire as well)
  • Right decider is B>600⇒✓
  • The arithmetic combinator is used to enable/disable "hold" and "count" signals (A and B respectively from the constant)
  • The left decider combinator is used to implicitly sum the "count" signals while the "hold" signal is set
  • The right decider combinator is used to convert a particular range of total "count" into a constant boolean signal
The output is delayed three ticks from the condition being tested (i.e. if the input is false and switches to true, if it remains true, it takes 10 seconds plus 3 ticks for the output to become true; if the input then switches to false, it takes 3 ticks for the output to become false).


User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: Need help making delayed output circuit

Post by TruePikachu »

PyroFire wrote:
Sun Dec 29, 2019 12:17 pm
Circuitissimo might be helpful
That mod is only useful for making large circuits more compact and potentially more UPS-efficient. It does not help with learning the techniques behind construction.

Post Reply

Return to “Gameplay Help”