LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

best way to change an array of waveforms to 2d array

Hello here,

 

I was trying to change an array of waveforms (number of waveforms depends on the number of channels) to a 2d nummerical array to save it to file. The waveforms have timestamps very close to each other and I want the 2d array to be something like clock time of the first waveform as the first colunm, 1st channel data as the second colunm, 2nd channel as the third colunm.......I am a newbie to labeview and have tried several ways but they didn't work properly. I particularly got problem when I was using the build array function since I don't know the number of channels.

Could someone give me an idea? Thanks!

 

Yaqiong

0 Kudos
Message 1 of 4
(2,305 Views)
What is the problem with the built-in functions? You have Export Waveforms to Spreadsheet File and Write to Measurement File.

To create your own, you simply wire the waveform array to a for loop with the Get Waveform Components inside. If you are not aware of the auto-indexing feature of a for loop, then your first step is to take a basic tutorial.
Message 2 of 4
(2,300 Views)

My way is getting time array in a for loop and index it outside the loop to get the timestamp from 1st waveform and paste it with 2d array data. This method seems troublesome but.... it works anyway.

Thanks for the reply.

0 Kudos
Message 3 of 4
(2,272 Views)
There is no time array in a waveform data type. You still have not explained why you want to do this. If it seems cumbersome, it probably is. Attach your code.
0 Kudos
Message 4 of 4
(2,267 Views)