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: 

How do I determine array size in a formula node

I am feeding an array into a formula node to perform an operation on. However the size of the array can be an arbitrary size. How can I determine its size to use for iterating through a for loop?
 
I suppose that I could add another input that is fed with the array size from the array palate but I would like to know if it can be done inside the formula node itself.
0 Kudos
Message 1 of 4
(4,924 Views)

Your own advice is the only and best one.

 

greetings from the Netherlands
0 Kudos
Message 2 of 4
(4,906 Views)
Sometimes I scare myself. Smiley Surprised
0 Kudos
Message 3 of 4
(4,892 Views)

Hi,

 

Inside formula node you can use following code to find the array size.

 

variable=sizeOfDim(array_variable,0);

 

eg: n=sizeOfDim(a,0);

Rocky
0 Kudos
Message 4 of 4
(4,228 Views)