06-30-2010 05:49 AM
Hi,
I am using Labview with a NI DAQPad-6015 to measure temperature (via thermocouple) and control via digital output (counter).
The measurement rate I get is very slow (about 10 Hz).
How can I speed up the measurement? I tried a sample clock for measurement, but togheter with the implicit counter the sampling rate was still about 10 Hz.
Thanks in advance
Gianluca
07-01-2010 08:10 AM
Hi Gianluca,
Can you please post your VI that actually does the data acquisition from the termocouple?
07-01-2010 11:18 AM
Hi Luca,
here is the VI for temperature acquisition.
If I add an implicit counter to generate a pulse output (constant frequency 100 Hz and variable duty cycle), the measurement is strongly slowed.
Thanks,
Gianluca
07-05-2010 10:25 AM
Gianluca,
can you please post also the other VI with the implicit counter?
thanks
07-05-2010 10:31 AM
Here is the complete VI.
thanks
07-05-2010 11:23 AM - edited 07-05-2010 11:24 AM
From what I can tell, you are reading single samples of N channels in a tight loop, seperating the channels, and stuffing each individual into its own queue. In a parallel loop, you are building these samples into an array and if the size is 100, you average them, stream them to a file, and zero the intermediary arrays. All arrays grow at the same rate, so why all these separate size checks and case structures?
This is all way too complicated and inefficient. Why not read 100 samples at once, average the channels, place the array of averaged channels into a single queue, and write them all at once to tdms?
You also seem to be unaware of common simplifications. Index array is resizable. Most primitives can operate on arrays. For example on the left, you explicitly index out four individual string elements, see if they are empty strings, then invert the boolean and form an array of four elements. You would get exactly the same resulting boolean array by taking the four element array subset, checking for empty, and inverting.
I think with little effort, you code could be reduced to 20% of its current size and it would run much more efficiently and would be easier to maintain and debug. Try it! 🙂
07-06-2010 03:52 AM
Thanks for your tips, altenbach.
I've already done some simplification, but the main problem remains the coexistence of sample clock and implicit counter, which slows down measurement.