convert every constant signal to pulse only when signal turns on

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
varundevan
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Jan 20, 2020 4:41 am
Contact:

convert every constant signal to pulse only when signal turns on

Post by varundevan »

hi,

This might be a simple question, but i could not find the exact answer i need.

I have 5 different signals namely 1, 2, 3, 4, 5 coming in a green wire. the time period of this signal is not definite as it depends on train unload time in the station.

the signal 1 may hold for 5 secs , and signal 2 may hold for 5 mins. whenever any of the 5 signal is generated , i want to have an output where only a pulse of that signal is generated.
a pulse of that signal should be generated when the signal is on and no pulse is needed when the signal turns off.
i searched in the forum to find ways to generate pulse, but none suits my exact need.

Thanks for reading and your answers.

User avatar
tobsimon
Fast Inserter
Fast Inserter
Posts: 104
Joined: Wed Apr 29, 2015 10:58 am
Contact:

Re: convert every constant signal in the network to pulse

Post by tobsimon »

Trying to translate your requirement to more technical terms. You want to output the signal for one tick only, if it has changed from the previous state? Then you need to delay the input for one tick (i.e.with an arithmic combinator set to any +0), substract that delayed value from the original signal, so you get a value unequal zero for one tick only if something changed (this is the pulse generator), then normalize the output to one and multiply with the original signal (equally delayed by two combinators, otherwise the first instance of consecutive changes is lost).

Note that the pulse is also generated, if the signal changes back to zero, however the output would be zero as well, so this event is lost.

DerGraue
Fast Inserter
Fast Inserter
Posts: 151
Joined: Mon May 30, 2016 12:12 pm
Contact:

Re: convert every constant signal to pulse only when signal turns on

Post by DerGraue »

Directly above this post are sticky posts. One of them is called "Combinators 101 (Link)". You might want to read that one.

varundevan
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Jan 20, 2020 4:41 am
Contact:

Re: convert every constant signal to pulse only when signal turns on

Post by varundevan »

DerGraue wrote:
Sat Jun 13, 2020 8:15 am
Directly above this post are sticky posts. One of them is called "Combinators 101 (Link)". You might want to read that one.
thank you , i just searched and found it useful ..

Post Reply

Return to “Gameplay Help”