From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Read Loop only reaches speed of serial Communication

Solved!
Go to solution

Hello everybody,

 

this is my first post in this Forum. I have a program with 4 loops, 2 seperate and 2 connected by a queue. The first loop (see attachment PID Loop) runs at maximum speed, the second one (serial communication) runs at maximum speed (very slow because of serial speed).

 

To find the error I deleted the queue to get 4 seperate loops. The loop with the calculations (Calculate Loop) now also runs at maximum speed, but the analog read loop just runs at the speed of the serial communication loop. Inside the subVI is just the setup for the DAQmx with internal sampling. I have no connections between the serial communication loop and the analog read loop. Is it possible that the DAQmx is slowed down because of the serial communication? The serial communication also uses a DLL of windows.

 

I hope you can help me.

 

Best regards,

 

Jannik

0 Kudos
Message 1 of 3
(2,526 Views)

Hi jannik,

 

as all subVIs are missing we cannot tell much about your VI…

 

All I can say is you are misusing local variables in your "calculate loop", enforcing race conditions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,509 Views)
Solution
Accepted by topic author jannik1810

Thank you for your fast answer. I found the answer I guess: I deleted the SubVI and use the DAQmx in the loop directly, than it worked. I think the SubVI took to much time because of extra options to execute at 1kHz.

0 Kudos
Message 3 of 3
(2,481 Views)