[Combinators] How to delay a signal?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

[Combinators] How to delay a signal?

Post 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

Chess
Inserter
Inserter
Posts: 35
Joined: Thu Sep 17, 2015 9:08 pm
Contact:

Re: [Combinators] How to delay a signal?

Post by Chess »

Add 30 combinators that multiply per 1 the signal.

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

Re: [Combinators] How to delay a signal?

Post 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.

Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

Re: [Combinators] How to delay a signal?

Post 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?

Lupoviridae
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Apr 20, 2015 6:26 pm
Contact:

Re: [Combinators] How to delay a signal?

Post 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.

Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

Re: [Combinators] How to delay a signal?

Post 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 :)

Post Reply

Return to “Gameplay Help”