LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrays into the fromula node?

Hello,

I am trying to convert my voltages into pressures via the formula node but I am having trouble.

The situation is follows, I have a 1D array of single and I want to convert them using the formula node.

When I enter the equation into the node it tells me that there is an error on line 1 left brace needed.

What is the left brace, this must sound silly but I have no idea what to do.

Please help.

I have other formula nodes working fine but the inputs into them are not arrays they are just single elements (the mean of 1000 points for example).

Thanks
lp19
0 Kudos
Message 1 of 3
(2,917 Views)
In order to output an array from a formula node, you must declare the array variable.

float32 Y[100]; /* Declare 100-element array output

Inside the formula node, you must work with the arrays just like in C. The left brace is this -> [. It is looking for something like Y[0] = 1 + X[0]; where X is an array input. To make things simple you may consider placing your Formula node as it stands right now into a FOR loop. Your 1D array input will auto-index and your output will become an array as it tunnels out of the loop.

Daniel L. Press
PrimeTest Corp.
www.primetest.com
0 Kudos
Message 2 of 3
(2,917 Views)
0 Kudos
Message 3 of 3
(2,917 Views)