Test and Measurement Forum

Increase speed of Labview-routine with ADC20/24

Post your LabVIEW discussions here

Increase speed of Labview-routine with ADC20/24

Postby schor » Fri Mar 18, 2011 3:01 pm

Hi there,
can please anybody look at the attached vi and tell me how long it takes the procedure to run on your machines?
If I choose a conversion time of 100 ms to record data over a time span of 30 s, the whole procedure takes about 37 seconds on my machine (Pm, 1.5 GHz, 32 bit single core).
I basically moved to Labview8.6 in the hope of speeding up things, as my code initially written in Matlab produced the same latency.
Now the outcome is quite disappointing, as I really need the datalogger ADC24 to retrieve data more or less real time (every 100 ms). Latencies in the order of 1 seconds (for a 30 second interval) would be acceptable, and in fact it works flawlessly using PicoRecorder in real-time continuous mode!
I've already checked if the massive overhead is caused by 'online' updating the Waveform Chart in Labview, but this is not the case! So it seems to be a driver problem or am I just using the wrong mode? I'm using the latest version (sdk r10_1_0_8).
Which API collection mode corresponds to the 'real-time continuous' option in PicoLog(Recorder) ?

Any help greatly appreciated
(21.55 KiB) Downloaded 169 times

Re: Increase speed of Labview-routine with ADC20/24

Postby Chris » Tue Mar 22, 2011 10:51 am

By default, the PicoLog application uses RealTimeContinuous mode.

If you set PicoLog to measure in Streaming mode, you will find it also uses a high CPU count, because it polls.

To get a lower CPU usage, you need to use HRDLCollectSingleValueAsync / HRDLGetSingleValueAsync, which are non-blocking calls.
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: Increase speed of Labview-routine with ADC20/24

Postby schor » Thu Mar 24, 2011 10:11 am

Ok now I think I've managed to implement Picolog's 'real-time continuous' mode in Labview using the HRDLCollectSinglevalueAsync and HRDLGetSinglevalueAsync function, see attached file. It work's pretty well for conversion times in the order of 100 - 340 mS, but interestingly lags a bit for 60 mS and 660 ms. See attached file.
CPU load is now down to 1-5 %.
(1.55 MiB) Downloaded 140 times

Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests