10-25-2023 01:41 AM
Hello everyone.
I am a student and as part of an internship in a company I have to create a LabVIEW program to carry out certain measurements. I'm using a cDAQ 9184 and two NI 9219 boards. I'm making 4 separate measurements, 3 of which are of voltage and one of current. However, I have a problem. During data acquisition, I observe a very low sampling frequency.
I've tried to solve the problem in various ways: I've tried using the timing function, property nodes to force a high acquisition frequency, executing the while loop with only the read function, testing the read function with more or less sampl or chanel, but nothing seems to work. I'm even wondering if the problem isn't with the cards used for acquisition.
Is there anyone who has already encountered this kind of problem and/or has an idea of how to solve it?
Thank you in advance for your time.
10-25-2023 01:49 AM - edited 10-25-2023 01:51 AM
Hi Ziprat,
@Ziprat wrote:
However, I have a problem. During data acquisition, I observe a very low sampling frequency.
Please define "very low sample frequency". And please define your requirement/expectation…
I guess you know about this part of the NI9219 specs:
Mind to downconvert the VI to LV2019?
10-25-2023 02:00 AM
Hi GerdW
Thanks for your fast answer.
By low sample frequency i mean that the while loop seems to take between 600ms and 400ms to do one iteration even thoe i am not asking for a high-resolution sample. I also have no thermocouple connected to the NI 9219.
I can try to convert it but i only have a licence for LabVIEW 2020 sp1.
Best regards,
Ziprat
10-25-2023 02:07 AM
Here is the Lv 2019 version.
10-25-2023 02:31 AM - edited 10-25-2023 02:35 AM
Hi Ziprat,
@Ziprat wrote:
By low sample frequency i mean that the while loop seems to take between 600ms and 400ms to do one iteration even thoe i am not asking for a high-resolution sample.
Your acquisition loop is very "overloaded" with several Rube-Goldberg constructs…
Several suggestions:
See this suggestion:
You may even apply a scale to the DAQmx channel so you don't need scale the readings afterwards…
10-26-2023 01:31 AM
Hi GerdW
Thanks for your solution proposition .
I have tried it and it works well on one/ two while loops. But then with more of them i encounter a synchronisation problem. One read is trying to reserved the device before the other one unreserved it.
I have tried making them wait for the device to be free before trying to read data but i am then having once again a slow sample rate.
10-26-2023 02:46 AM
Hi Ziprat,
@Ziprat wrote:
I have tried it and it works well on one/ two while loops. But then with more of them i encounter a synchronisation problem. One read is trying to reserved the device before the other one unreserved it.
I have tried making them wait for the device to be free before trying to read data but i am then having once again a slow sample rate.
While the NI9219 uses 4 simultanuous channels it seems there are not enough simultanuous timing sources...
So what happens when you read all channels within one task, with sample rate set, continuous mode amd high-speed mode for all channels?
10-26-2023 02:54 AM
You've set "Fréquence d'échantillonage (ms)" to 1000ms, so i expect it to only sample once/sec.
What you usually do it set up a DAQ-task with a sampling frequency and then simply read 1 or 100 samples at once and it'll wait for the hardware.