I've been trying to create a timer that runs through once when a signal is received from an inserter holding an item, once the timer cycle is completed I want it to wait until the next time the inserter picks up an item. I'm stuck on getting the timer to start when i want it to and then to stop after one cycle.
Basically i want to make a launch sequence with lights that count down, then flash when i insert a satellite into a silo & launch a rocket, then wait until the next launch before starting the sequence again. I've managed to get a nice sequence i like, i'm just struggling with the stopping & starting of the timer, i couldn't find just the basic set-up of a one-run timer that I could understand, could somebody explain or point me in the direction of how to set one of these up please?
Re: Single run timer
Posted: Sat Apr 17, 2021 1:13 pm
by mmmPI
timer.jpg (40.21 KiB) Viewed 4873 times
That is my attempt.
Place the blueprint power it , and put a satelite in the chest.
The belt loop is sized to fit the 10 sec timer and is just there for demonstration purposes, one lap simulate one launch as if the chest was the rocket silo.
Horizontal red arrow => receive the pulse from the inserter, act as memory, allow the timer to function.
Vertical white arrow => timer
vertical black arrow => reset the memory, ( which stop/reset the timer.)
constant combinator is set to 600 ticks, so 10 second timer, could be deleted and instead write the value in place where signal T is used, that is one option included for free without anyone asking for it.
I added some lamps just to show where to plug them with a simple hardcoded condition.
Is that what you are looking for ?
does that helps you ?
Re: Single run timer
Posted: Sun Apr 18, 2021 5:50 pm
by synyster31
I've had a quick look and that looks great! Thanks a lot!
Re: Single run timer
Posted: Sun Apr 18, 2021 7:31 pm
by Zanthra
You can use a decider combinator with Each < Max output Each. This works on 2 conditions due to how the Each signal is handled, X != 0 and X < Max. Used alongside a decider with Each < Max output 1 Each you can build a counter with 2 deciders that is triggered by a pulse, (a value going above 0) and resets to 0 when the counter ends.