Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

VI optimisation, sampling rate speed

Hi to everyone! I’m working with Labview 8 and using the USB-DAQPad 6015 for data acquisition (1 counter signal, 2 DI and 2 AI). The max sampling rate I achieved is about 8ms between two loops. Is there a possibility to give a higher priority to the process or to optimise the VI to achieve higher sampling rate (expected is 2ms). Please help!
0 Kudos
Message 1 of 13
(4,437 Views)

I could not open your VI, coz I do not have labVIEW on the system i am using

but herez a good wav to get to the sampling rates you desire

got to examples and use any suitable continous Analog input acquisition VI's

It should help you

0 Kudos
Message 2 of 13
(4,419 Views)
Thanks Dav.
I tried to  make it siple as possible, without using advanced vi-s . It will be much better to have a look inside the vi I posted and if possible sugest me a way to optimise it. In any case thanks.
zolee
0 Kudos
Message 3 of 13
(4,416 Views)

Hi zolee,

I just looked in to your VI and I'm sorry, but I don't quite get, what you want to measure.

At first I would suggest, that you should try to remove the sequence structure and replace it with a flat sequence structure and then try to put the VIs so that the functionality will be obvious. If not possible because you are performing some data acquisition in a specific order, add comments so that it will become clear what is happening. After that place the VIs in an order where the dataflow is from the left to the right and try to make wires as short as possible while maintaining readability of the VI.

Also I don't understand what you mean with "between two loops I need 2ms". What exactly are you trying to measure in sequence "2" ?

Best Regards,

 Andreas Pistek

Message Edited by Andi P on 07-10-2006 01:49 PM

~~~ Logic is a systematic method of coming to the wrong conclusion with confidence ~~~
0 Kudos
Message 4 of 13
(4,390 Views)

Hi Andreas,

Thanks for your time. Short explanation of the VI. According to the chosen sampling rate in the first sequence, on specified positions (acquired by counter in the 2 sequence) vi calls 2 or 4 other sensors and acquire data (right side in the sequence 2). It is necessary to have the whole thing in the loop because the length of the measurement is differing from measurement to measurement. In sequence 1 I make initialisation of the analog and digital inputs just to avoid, making it in the every loop (the execution is in that case faster I suppose).

As I acquire data according to the position, the execution is directly dependable from the speed. For example if the system moves with 0,6 km/h and the sampling rate is 2mm, time between to loops is about 20ms. So if I would like to move the system with 6 km/h and same sampling rate the time between to loops should be about 2 ms. Unfortunately, the min time between two loops I can achieved without to lose data is about 8ms.

zolee


0 Kudos
Message 5 of 13
(4,368 Views)

Hi zolee,

please try to change your measurment setup in LabVIEW to a setup, in which the software execution speed of LabVIEW is not the slowest point. I think you should change to a hardware based timing and then using the measured signals in your software.

I suggest you try to do a hardware triggered acquisition of your analog input data while the same trigger is used on the counter inputs to determine the width of the impulses. With this setup you are free from software timing and can then use LabVIEW to examine the measured signals. In the example finder of LabVIEW you can find several examples with triggered acquisitions.

Best Regards,

 Andreas Pistek

~~~ Logic is a systematic method of coming to the wrong conclusion with confidence ~~~
0 Kudos
Message 6 of 13
(4,364 Views)

Thanks Andreas,

I’m not sure how can I use the signal from the counter for hardware triggering. Because it’s not that I use every signal on the counter but it’s dependable from the denominator (sampling rate) E.g. Sampling rate 4: I use every 4th signal from the counter, sampling rate 10: I use every 10th signal from the counter for reading the value from another sensors.

Is there a chance to change the priority of the Labview VI to all other programs running on the PC? I red a lot about difference between VI and exe and I didn’t reach how big is the difference of the execution speed?

please try to change your measurment setup in LabVIEW to a setup, in which the software execution speed of LabVIEW is not the slowest point” Please tell me  how? I didn’t foundd such an option; is that in the main Labview window or it should be done in the Windows process adjustment.

Thanks again!

zolee

0 Kudos
Message 7 of 13
(4,360 Views)
Hello Zolee,

Andreas is out of office, so I jumped in.

First of all, the system you are using seems to be not a good choice for your task.
You are working under windows, which is not capable of real time applications. Maybe you can achive loop times of 2 ms, but when windows decides to something else, than the loop execution might have to wait for 10 ms or else.
Also you are using an USB device. Reading the counter in single sample is a software timed operation. There are no DMA channels for fast data transfer.

What you can try to do is to use a timed loop for your single sample acquisition. Timed loops run in almost highest priority.
Building an application from your Vi might also increase the performance.

Do you have the option to use a PCI card for your measurement? You can achive better rates with these devices.

Best regards

Dermot Ackermann



D. Ackermann
Applications Engineer
National Instruments Germany
0 Kudos
Message 8 of 13
(4,339 Views)

Thanks Dermot,

Unfortunately answer to all of your questions is NO! I don’t have a chance to use a PCI because we make this measurements with notebook and usb-box on the field, we don’t have money for PXI or compactRIO which are much better solutions, and finally I have a Labview full development system without chance to make application from the VI. Smiley Sad

I will try with timed loops (I made already something but there were no revolutionary progress). Can you give me some tips how to change to adjust the labview to higest priority in Windows environment?

Many thanks!

zolee

0 Kudos
Message 9 of 13
(4,334 Views)
Hello Zolee,

maybe you can tell me more about your application and the specific needs.

You can set the priority in the VI settings (Execution).

Best regards
D. Ackermann
Applications Engineer
National Instruments Germany
0 Kudos
Message 10 of 13
(4,331 Views)