1233023
1233023

Reputation: 321

Labview filling an array with data

I have code which generates an amount of data continuously and I'd like to store generated data in a 1-dimensional array.

How do I do this in LabVIEW?

Upvotes: 1

Views: 10023

Answers (2)

Ryan Duell
Ryan Duell

Reputation: 182

Are you using the array to transfer data from your data acquisition to another location? If you know how many elements are in the array, you should first initialize the array to that size. Then you can place data in the array by using "Replace Array Subset". This way you're not continuously allocating memory. This also assumes that you're moving that data out of the array prior to the next instrument read.enter image description here

Upvotes: 1

Dako
Dako

Reputation: 1

In this case it is better to use while loop (if you know the exact number of data you can use For Loop as well, giving an N terminal defined number of iterations). Simply connect your generated data wire to the border of the while loop, right click it and choose Tunnel Mode:Indexing and you will get and array.

Upvotes: 0

Related Questions