ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sum of array element

I'd like to perform a sum of elements of an array, using "For Loop" and "Formula Node" only. I wrote this program but it does not work. Can anybody advise?

Thanks..

0 Kudos
Message 1 of 6
(9,109 Views)

Hi Splee,

 

Can you please post the vi in an earlier LV format (I have 8.5)?

0 Kudos
Message 2 of 6
(9,105 Views)

here is the v8.5 version..

0 Kudos
Message 3 of 6
(9,102 Views)

Why do you use Formula node? To hold on to the previous value in a for loop, I think you have to use a shift register.

Message 4 of 6
(9,087 Views)

Hi,

 

I'm not sure if that's what you meant, but it's working now (with slight modifications).

You can do it without a for loop too....

 

Hope this helps,

 

A

Message 5 of 6
(9,084 Views)

Hi,You can also use the add array elements to do it directly.

 

 

LabVIEW 8.2,8.6,2009...still learning 😛
0 Kudos
Message 6 of 6
(9,064 Views)