Factorio

Factorio

View Stats:
Bone White Apr 13, 2018 @ 5:49am
Circuit Network - SR Latch that stores value of signal
I've been pouring over the combinator wiki pages, SR latches and memory but cannot find a specific solution to my requirement.

At irregular intervals the input to the solution is a pulse of the same signal (let's say I) with varying values.

I need the solution to constantly output the last value of I that was input on a different signal (let's say O), even if there is no I signal.

Any help would be appreciated :)
< >
Showing 1-4 of 4 comments
PunCrathod Apr 13, 2018 @ 6:53am 
0eNrlVl2OmzAQvss8VlDxFxLxto/71ANUK2RgsjsS2MiYqFHEAXqLnq0n6RjS7KYJG0g2VaW+gGyPv/n8fczgHWRli7UmaSDZAeVKNpB83UFDz1KUds5sa4QEyGAFDkhR2ZHQZF4qNJS7uaoyksIoDZ0DJAv8BonfPTmA0pAhHAD7wTaVbZWh5oADVFOJsnSxxNxohqtViZynVg3vVdIyYDyX47f8ijgFc5QcTD3VHfj28awR5ds8VEAScCzpvCUzDLunruucEyrBhVONkgk+LwY6RqsyzfBFbIjjOegVKOXlgg5k16Qbk56IuyFtWp55FaWPcL9YSRu0GNM3PdhNqkYtBs7wiUNUa+p2XuZuRGuNxUWlnaPl8P3lxalPDgTTUvUf2ln3/RG7w9l2B4Pd/rV226IywlaY/wFuule4+TDu5lntotscOat7dCBVYE4F6imie6Oa70Fuq69HGND39nh2UNVC95wS+Pn9x3ViW5x6y9xaadK1VlVKkjEgWYuywRmFtTzVdm/EWd/CaVYs5paAf8GMe/S7o6r5u+0svsPnH8/V3Pu/NF/O0XwxTfPllX92/+6iP/4bokd/6nj8Y169a0I8zYTVgeLvg06xIBoxYE2lQT1yR73Q5lur8cI7vqRSk9rcQ2O+pS93PZq9JSdvLtUOlCJDJgkVVkpveWLD/Pvzxqtl4K/C2AujrvsF6jD3Kw==
I'm sure there are simpler ones but it works. This one zeroes when there is input I and when there is no input it outputs O what the last input was.
Last edited by PunCrathod; Apr 13, 2018 @ 6:53am
Killcreek2 Apr 13, 2018 @ 7:32am 
@OP ~ Your explanation is not very clear, exactly how do you need the inputs to be processed?

You want an input (A) that might be a pulse, stored in the latch & output continuously. That bit is clear, & quite simple to setup.


But what should it do when it recieves a new (A) signal? Should it overwrite the one in the latch if it is less / greater than the stored value? Or always overwrite if it is a different value?

Same question about the second input (B) ~ should that one always overwrite the value stored in the latch, or only if it is different / less / greater?

What about if there is a signal on both (A) and (B) inputs at the same tick ~ should the latch combine them together, or store the highest / lowest input only, or always prefer (A) over (B) input?

Will the inputs be positive integers, or does it need to support storing negative values also?


If you can provide some more details, a solution should be entirely possible to build.
Bone White Apr 13, 2018 @ 9:09am 
Originally posted by PunCrathod:
0eNrlVl2OmzAQvss8VlDxFxLxto/71ANUK2RgsjsS2MiYqFHEAXqLnq0n6RjS7KYJG0g2VaW+gGyPv/n8fczgHWRli7UmaSDZAeVKNpB83UFDz1KUds5sa4QEyGAFDkhR2ZHQZF4qNJS7uaoyksIoDZ0DJAv8BonfPTmA0pAhHAD7wTaVbZWh5oADVFOJsnSxxNxohqtViZynVg3vVdIyYDyX47f8ijgFc5QcTD3VHfj28awR5ds8VEAScCzpvCUzDLunruucEyrBhVONkgk+LwY6RqsyzfBFbIjjOegVKOXlgg5k16Qbk56IuyFtWp55FaWPcL9YSRu0GNM3PdhNqkYtBs7wiUNUa+p2XuZuRGuNxUWlnaPl8P3lxalPDgTTUvUf2ln3/RG7w9l2B4Pd/rV226IywlaY/wFuule4+TDu5lntotscOat7dCBVYE4F6imie6Oa70Fuq69HGND39nh2UNVC95wS+Pn9x3ViW5x6y9xaadK1VlVKkjEgWYuywRmFtTzVdm/EWd/CaVYs5paAf8GMe/S7o6r5u+0svsPnH8/V3Pu/NF/O0XwxTfPllX92/+6iP/4bokd/6nj8Y169a0I8zYTVgeLvg06xIBoxYE2lQT1yR73Q5lur8cI7vqRSk9rcQ2O+pS93PZq9JSdvLtUOlCJDJgkVVkpveWLD/Pvzxqtl4K/C2AujrvsF6jD3Kw==
I'm sure there are simpler ones but it works. This one zeroes when there is input I and when there is no input it outputs O what the last input was.

That's effective enough for what I want, thank you.

I do wonder how you'd adapt it so I goes straight through when there's input, but I can play and discover that myself.

Much appreciated.
PunCrathod Apr 13, 2018 @ 10:00am 
Originally posted by Bone White:
I do wonder how you'd adapt it so I goes straight through when there's input, but I can play and discover that myself.
Much appreciated.
Just add a parallel I*1 to O between the input and the output
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Apr 13, 2018 @ 5:49am
Posts: 4