Showing results for 
Search instead for 
Did you mean: 

Slow parallell loops with DAQ

Go to solution

Hello guys,


i decided to make new thread about really strange issue with DAQ assistant in one of my loop. There is deffinatelly something wrong with my program but i have no idea what it is. So i think that my program is really usual and often used. So i have two separate While loops in my program, one is empty an in my other one is DAQ assistant. In DAQ assistant i want 1 sample on demand, i tried this for inputs, outputs of digital signal and for inputs and outputs of analog signal too. If i start program, loop with DAQ assistant is very slow, i measured this and it take at least 3s to do one circle. But when i stop the empty loop, thet loop with DAQ assistant do one cicle per 25ms. So i am wondering is this normal behavior or is there som problem? I am running this on NI USB 6229, LabView 2010 and Windows XP. Picture of measurements are attached.


(slow.png both loops are runnging, fast.png only loop with DAQ is running)

Download All
0 Kudos
Message 1 of 3
Accepted by topic author BMAJTZ

Try to insert a wait of 1 ms in the empty loop.


The reason for what you are seeing, is that the empty loop is using ALL the cpu power to run, leaving nearly no power left to the DAQ or to windows.
You should NEVER make a loop without somekind of wait in the loop. Even a small wait will let windows run other task on the pc that has to run.

Message 2 of 3

Ok. The reason why i post this problem at first time what, that in the second loop was reading data from serial port. So the second loop wasnt newer empty. But you have right, when i put there 1 ms delay it is working. Thank you very much and I put your solution on my top 10 list why some of my programs dont work!

0 Kudos
Message 3 of 3