LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array

Hello,
 
Please, someone know how to manage data from an array in formule node?
 
Thank you for your help
Hadj
0 Kudos
Message 1 of 5
(2,991 Views)
Mibemol,

that is very simple (C style):

Output = Result
Input = Array (an array(one dimension) of numbers)
Input = SizeofArray (guess what 🙂 )

____________________________________
int i;

Result = 0;

for (i = 0; i < SizeofArray; i++){
Result=Result+Array[i];
}
____________________________________

Have a look at the screenshot aswell.

Regards,

Balze

Message Edited by Balze on 01-26-2007 12:57 AM

0 Kudos
Message 2 of 5
(2,971 Views)

Hello,

Thanks Blaze, you are very kind to help me in my trouble.

But what I want is to take data from an array already full via front panel and to manage the data in formule node to fill after some mathemathics calculus an other array.

Best regards

Mibemol

0 Kudos
Message 3 of 5
(2,960 Views)
It's easy too 😉

The only thing you have to take care of is, that the Array_Out Array has (at least) the right size to tkae the results.

Two ways are possible:
-Handle an array to the formula node which is input AND output with the same name
-define an array of the appropriate size in the formula node

Output = Array_Out
Output = Array_Out_fixed_size
Input = Array
Input = SizeofArray

____________________________________________
int Array_Out_fixed_size[10];

int i;

for (i=0;i<=SizeOfArray;i++)
{
Array_Out[i] = Array[i];
Array_Out_fixed_size[i] = Array[i];
}
_____________________________________________


Regards,

Balze
0 Kudos
Message 4 of 5
(2,952 Views)
Hello Balze,
 
You are wonderfull !!!
 
Viel danke
merci beaucoup
 
Mibemol (Hadj)
0 Kudos
Message 5 of 5
(2,938 Views)