LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to extract required data from waveform

Solved!
Go to solution
That's just wrong. Why would you throw away all that data?

If you want a 1D array, use a DAQmx Read set for 1 sample and n channels. Then select to return a 1D dbl instead of a waveform. Why select to return a waveform in the first place? Why select n samples in the first place?
0 Kudos
Message 11 of 15
(1,783 Views)

@Dennis_Knutson wrote:
That's just wrong. Why would you throw away all that data?

If you want a 1D array, use a DAQmx Read set for 1 sample and n channels. Then select to return a 1D dbl instead of a waveform. Why select to return a waveform in the first place? Why select n samples in the first place?

Does it work in continuous measurements? I mean if I set it as n channels 1 sample?! If it was I really do not know that.:( I did not try nchannels 1 sample because in continuous analog temperature meaurement example in labview shows it n-channel n-sample in a while loop. That's why I did not use it.

Egemen
0 Kudos
Message 12 of 15
(1,779 Views)

In your first post in this thread you inidcated that you need to measure data on many channels.  In your recent posts you are using the array data but not the timing data that comes with the waveform data type.

 

DAQmx uses the term "channels" to refer to the different inputs. Samples refers to data points within one channel.

 

To measure data from 32 thermocouples you will have 32 channels. If you want to get 100 sampels on each channel with each Read then you will set the Number of Samples to Read at 100. If the DAQmx Read is configured for 1D Wfm NChan NSamp you get an array of waveforms. The number of waveforms is the number of channels and the Number of samples in the Y array of each waveform is the number of samples you set when you configured the system.  You use Index array to get one waveform corresponding to the thermocouple channel you want.

 

If you do not care about the timing, configure the DAQmx Read for 2D DBL. That will give you a two-dimensional array where one dimension is channels and the other is samples.  You will still need to use Index array to get the data for an individual channel.

 

Lynn

0 Kudos
Message 13 of 15
(1,770 Views)

@johnsold wrote:

In your first post in this thread you inidcated that you need to measure data on many channels.  In your recent posts you are using the array data but not the timing data that comes with the waveform data type.

 

DAQmx uses the term "channels" to refer to the different inputs. Samples refers to data points within one channel.

 

To measure data from 32 thermocouples you will have 32 channels. If you want to get 100 sampels on each channel with each Read then you will set the Number of Samples to Read at 100. If the DAQmx Read is configured for 1D Wfm NChan NSamp you get an array of waveforms. The number of waveforms is the number of channels and the Number of samples in the Y array of each waveform is the number of samples you set when you configured the system.  You use Index array to get one waveform corresponding to the thermocouple channel you want.

 

If you do not care about the timing, configure the DAQmx Read for 2D DBL. That will give you a two-dimensional array where one dimension is channels and the other is samples.  You will still need to use Index array to get the data for an individual channel.

 

Lynn


Hi Lynn,

 

I added the time to them by bundling time data from get time function inside the while loop. I understand it now clearly. I used many unnecessary calculations and functions to add time info after scaling. Thank you all again.

 

Egemen
0 Kudos
Message 14 of 15
(1,760 Views)

I added the VI that I prepared for this job is here.

Egemen
0 Kudos
Message 15 of 15
(1,731 Views)