LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

splitting a 1-D array to text file

How can I write a text file from a 1-D array of cluster with 3 elements. How can I split the array? The 1-D array cosist of 2*clusters of 3 elements with time delta time and amplitude array! I can`t use unbundel clusters or split 1-D array as before!!!
Any help would be good. Thanks!
0 Kudos
Message 1 of 3
(2,611 Views)
Hi Student:

You can get any element you want from an array using INDEX ARRAY function.

Then, as your element consists of a cluster, you can use UNBUNDLE to get every value inside the cluster, ordered as you created the cluster, or UNBUNDLE BY NAME (if elements in cluster have asigned name)

Then you will have simple elements (strings, doubles, booleans... ) that you can convert to anything you want.

You can also use FOR LOOP that will by default index your cluster-1D-array.

Hope it helps,
Aitortxo.
0 Kudos
Message 2 of 3
(2,599 Views)
Time, delta time, and amplitude.  That sounds more like a waveform instead of a normal cluster.  The Waveform File I/O pallette has a "Export Waveforms to Spreadsheet File.vi" that will by default create a tab delimited file.  Slap a .txt on the end of the filename and you are done.
0 Kudos
Message 3 of 3
(2,589 Views)