LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get an array output on a Formula Node?

My problem is simply that I cannot figure out how to get an output on a Formula Node to be an array. Documentation states that "you must declare local arrays and output arrays in the Formula Node" but doesn't say anything more than than. Attempts to put something like "float32 out[100];" for an array output called "out" fail.

If anybody knows how you can do this or even knows if it is possible I would appriciate your help.

Thanks,
Naveen
0 Kudos
Message 1 of 5
(3,476 Views)
Naveen,

You need to remove the 32. 32 is the size of an integer, e.g. int32, int16 or int6. float32 doesn't exist. Just use float. This creates an array of DBLs.

Good luck
0 Kudos
Message 2 of 5
(3,476 Views)
Sorry, this is a mistake on my part. It should have read float64. But, removing the 64 and leaving it at float doesn't work either. It creates an array within the Formula Node, but the output with the same name is still a single DBL.
0 Kudos
Message 3 of 5
(3,476 Views)
I found a typo in the formula node I was doing that was making the output not be an array. I don't think I was getting the error before but I was going to put together an example VI to attach here and I found it. So, thanks for your help even tho it was a stupid little mistake on my part.
0 Kudos
Message 4 of 5
(3,476 Views)
I am having the same problem as you described, can't make it work with float or float64. you said you found a typo: what was the mistake? All of the arrays show up as a dbl on the output. I get no errors. very frustrating.
0 Kudos
Message 5 of 5
(3,476 Views)