02-04-2013 01:50 PM
Hi there, i'm trying to add the previous sum of an element of a 1D input array to a 1D output array. This is for a school lab that is considered extra exercise, so there is no solution. I'm aware that there are functions in LV that would make this easier, but i'm trying to do this the old school way. Attached to this is a picture of what i have so far.
The first output element should be 3, 2nd be 4, etc etc. I can't seem to connect my output shift register to my arrray because of a number type difference? I'm really stuck
Insight would be appreciated!
Thank You!
02-04-2013 02:00 PM
That's because the shift register contains a scaler, not an array. All you need to do is add another tunnel (auto-indexing) for the output.
02-04-2013 02:21 PM
Adding another tunnel from the iteration or the input array? I just tried iteration and still getting the same funky results from what i've tried before
02-04-2013 03:26 PM
@ckboii89 wrote:
Adding another tunnel from the iteration or the input array? I just tried iteration and still getting the same funky results from what i've tried before
Simply wire the result of your addition to the right edge of the loop. It will automatically create an array of the results for you.
02-04-2013 03:28 PM
As described, two methods out of the many possible.