LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding sum of previous element

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!

0 Kudos
Message 1 of 5
(2,548 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,543 Views)

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

0 Kudos
Message 3 of 5
(2,533 Views)

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



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 5
(2,514 Views)

As described, two methods out of the many possible.

add.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 5 of 5
(2,509 Views)