Page 1 of 1
[Combinators] How to delay a signal?
Posted: Thu Oct 15, 2015 8:01 am
by Xeteth
I am currently trying to use a read/write mechanism for my current build and need to implement a system in which a pulse is sent to 'read' then 30 ticks later the same pulse is sent to 'write'.
Both of these signals are the same actual signal, just with different destinations, but I basically need the 'write' destination to receive the signal 30 ticks after it's initially sent to the 'read' destination. To do this I am wanting to put a mechanism in between the two that 'waits' 30 ticks.
I know it's probably a rather simple build, but I am sitting here giving myself a headache over it. Anyone able to enlighten me by chance?
Cheers
Re: [Combinators] How to delay a signal?
Posted: Thu Oct 15, 2015 8:24 am
by Chess
Add 30 combinators that multiply per 1 the signal.
Re: [Combinators] How to delay a signal?
Posted: Thu Oct 15, 2015 9:10 am
by DaveMcW
Use a simple clock that adds -1 to itself.
When it reaches 3, a decider combinator sends the write signal. (Since there is a 3 combinator delay already built in)
When it is less than 1, a decider combinator adds +1 to the clock. (Locking it at a floor of 0)
Start the clock with +30 when you get the read signal.
Re: [Combinators] How to delay a signal?
Posted: Thu Oct 15, 2015 2:39 pm
by Xeteth
DaveMcW wrote:Use a simple clock that adds -1 to itself.
When it reaches 3, a decider combinator sends the write signal. (Since there is a 3 combinator delay already built in)
When it is less than 1, a decider combinator adds +1 to the clock. (Locking it at a floor of 0)
Start the clock with +30 when you get the read signal.
Thanks for the reply, however I still seem to be a little stumped. Would it be possible for you to provide an example by chance?
Re: [Combinators] How to delay a signal?
Posted: Fri Oct 16, 2015 9:03 pm
by Lupoviridae
Make a single clock that counts up to 60. This is done by connecting a constant combinator outputting a signal of one (I will call it "A" == 1) to the input of a decider. Then attach the output of the decider back to the input and set it to [When "A" < 60, output "A" (input count)]. Attach the output of this decider to the input of 2 new deciders. Set one to [When "A" == 1, output your read signal], and the other to [When "A" == 31, output your write signal].
Problem solved with 4 combinators
If you don't want it to be constantly repeating, you can make a unidirectional clock that only starts counting up when some other signal is sent to it. This is done by taking your clock and instead setting it to [When "B" == 0, output everything(input count)]. Now the clock will count up indefinitely until it receives a signal of "B" == 1, when it resets to 0 and starts over.
Let me know if you need clarification on anything, I would be happy to build it in-game for you.
Re: [Combinators] How to delay a signal?
Posted: Sat Oct 17, 2015 8:27 am
by Xeteth
Lupoviridae wrote:Make a single clock that counts up to 60. This is done by connecting a constant combinator outputting a signal of one (I will call it "A" == 1) to the input of a decider. Then attach the output of the decider back to the input and set it to [When "A" < 60, output "A" (input count)]. Attach the output of this decider to the input of 2 new deciders. Set one to [When "A" == 1, output your read signal], and the other to [When "A" == 31, output your write signal].
Problem solved with 4 combinators
If you don't want it to be constantly repeating, you can make a unidirectional clock that only starts counting up when some other signal is sent to it. This is done by taking your clock and instead setting it to [When "B" == 0, output everything(input count)]. Now the clock will count up indefinitely until it receives a signal of "B" == 1, when it resets to 0 and starts over.
Let me know if you need clarification on anything, I would be happy to build it in-game for you.
Got it going, thanks for your help