Stored Value in circuit non-incrementing
Posted: Thu Aug 22, 2019 6:46 am
Hello,
I am trying to implement a stored value in a circuit and I am having a bit of trouble. The standard implementations I have found are basically counters that increase using the loop of input to output on a combinator.
I wish to store a value that is transmitted on a circuit and not have it accumulate. It would work fine for me if the first value sent was stored and I needed to send a reset signal to clear whatever that first value was.
As a simple explanation of what I am trying to make work imagine the following:
Constant Comb outputs Y with a value of 30.
Arithmetic Comb Accepts Y + 0 and converts that signal to A with a value of 30.
I now wish to store that value for A even if I delete the Constant Combinator. Obviously since the combinators output their values every single tick, I can't simply loop this back on another combinator or the value with increment like crazy. I basically want to store that initial value of Y until I do something else to cause it to reset. Although I am using a constant combinator in my example, my ultimate solution will not be a constant but a variable Y that I wish to store.
If there is a guide or example of this and someone could point me there I would really appreciate it. I cannot seem to wrap my head around how to make this work and I have a feeling the solution is pretty straightforward.
EDIT: I believe I have found the solution Here. It was found as a simpler solution to what I felt I wanted but was impossible for me to understand. This example was very straightforward.
Leaving this here in case it helps anyone else.
I am trying to implement a stored value in a circuit and I am having a bit of trouble. The standard implementations I have found are basically counters that increase using the loop of input to output on a combinator.
I wish to store a value that is transmitted on a circuit and not have it accumulate. It would work fine for me if the first value sent was stored and I needed to send a reset signal to clear whatever that first value was.
As a simple explanation of what I am trying to make work imagine the following:
Constant Comb outputs Y with a value of 30.
Arithmetic Comb Accepts Y + 0 and converts that signal to A with a value of 30.
I now wish to store that value for A even if I delete the Constant Combinator. Obviously since the combinators output their values every single tick, I can't simply loop this back on another combinator or the value with increment like crazy. I basically want to store that initial value of Y until I do something else to cause it to reset. Although I am using a constant combinator in my example, my ultimate solution will not be a constant but a variable Y that I wish to store.
If there is a guide or example of this and someone could point me there I would really appreciate it. I cannot seem to wrap my head around how to make this work and I have a feeling the solution is pretty straightforward.
EDIT: I believe I have found the solution Here. It was found as a simpler solution to what I felt I wanted but was impossible for me to understand. This example was very straightforward.
Leaving this here in case it helps anyone else.