LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to initialize a cluster of arrays?

I am trying to have a cluster of 3 1D arrays as my input to a VI. I would like the arrays to be intialised with a programmagle length. Thank you 🙂

0 Kudos
Message 1 of 5
(3,010 Views)

Can you show us what you have tried?

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

i know this setup doesnt work...as it always sets them to 0. I am not sure how i would get  it to initialize when there is no input and and not do that when i give it a value.

0 Kudos
Message 3 of 5
(2,988 Views)

Make sure the default for the cluster is 3 empty arrays.  Then do a check to see if the arrays are empty.  If they are, do your initialization.  Otherwise keep you input value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,970 Views)

I'm not sure what you are trying to do here.

 

If you don't have anything in the file, the arrays will be initialized to 0 size.  If you have something in the file then your arrays will be initialized with the size specified by the first column of the file content.  Notice that the initialized array will have values of zeros, so the results of multiplication of "Impedance Noise" with column 2 will be zeros, and the results of the square of "Voltage Noise" will also be zeros.

 

What is the content of the file you are reading? The column description, and is there an equal number of rows for each column?

 

Michel

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