11-24-2012 03:43 PM
11-24-2012 04:19 PM - edited 11-24-2012 04:22 PM
@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.
11-24-2012 04:49 PM
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
11-25-2012 04:43 AM
@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.
12-19-2012 08:36 AM
I added the VI that I prepared for this job is here.