LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP: Run-time array dimension in LabVIEW formula node

I need to dimension an array at run time within a formula node as follows:

int32 i,N;
N = sizeOfDim(inputArray,0);
float64 outputArray[N];

for (i = 0; i outputArray[i] = myfunction(inputArray[i]);
}

However, LabVIEW complains "Formula Node: index list expected". On the
other hand, if I say

float64 outputArray[1000];

LabVIEW is perfectly happy. But that's not what I need to do! Is there
an alternative
way of accomplishing my goal?

BTW, I've tried calculating N outside the formula node and then
presenting it as
an input with the same results. I've got a bad feeling that run time
array dimensioning
just isn't allowed.

TIA,
Hugh
0 Kudos
Message 1 of 2
(2,480 Views)
Can't you just use the Initialize Array function outside the formula node and pass that instead?
0 Kudos
Message 2 of 2
(2,480 Views)