LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I write a 1d array of cluster with 3 elements to a file?

Hi,

I have to make a "Power spectral densities" analyse from my waveform data. The results from this VI is an array of cluuster with 3 elemments. Now I want to write this array of cluster with 3 elements to a file. And later it must be able to use this file with EXCEL!!

thanks
0 Kudos
Message 1 of 5
(3,971 Views)
Hello schloronzo,

make a for loop feeded with your array. Inside the for loop unbundle the cluster, "format into string" the 3 values, adding the result to the ones before and collect them in a shift register. Then save the resulting string to a txt-file. If you make a good format string then Excel is able to read your txt-file (use tab a separator and CR/LF after each 3 values aka "csv format").


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,966 Views)

Place a for loop on the diagram, with a Cluster to Array function in it. Wire your array into the loop and into the Cluster to Array function. Wire the result out of the loop and into the 2D data input of a Write to Spreadsheet File VI (File I/O palette).

Wiring the array into the loop causes auto indexing which extracts each cluster and then transforms it into a 1D array. Wiring this out of the loop builds the 1D arrays into a 2D array.


___________________
Try to take over the world!
Message 3 of 5
(3,965 Views)

Do you have a picture or example?

0 Kudos
Message 4 of 5
(2,907 Views)

Hi Brandaoh,

 

you really ask in a 13 years old thread for an image?

You got luck:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,900 Views)