LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop

I have a problem with a while loop, because it is too slow.
I record data from an USB interface, this works without any problems by 100KHz but when i raise it up to 800KHz the record-loop loos some data. the record-loop has only an queue wich get the date not any more. You can see that some data are double by 100KHz, so the loop read the interface faster then the interface delivers the data, that ok and right but by 800 kHz the interface is faster than the loop 🙂
Is there any way to make the loop faster?

THX
0 Kudos
Message 1 of 6
(2,562 Views)

Hi chefcommander,

which USB interface do you use?

Mike

0 Kudos
Message 2 of 6
(2,555 Views)
I don´t know 😞 but it works with 800KHz , i don´t have the datasheet here sorry
the problem is that the loop is to slow,  i think there should be no problem with only 800KHz and an realy fast PC, or not?
0 Kudos
Message 3 of 6
(2,549 Views)
Hai,
 
Try replacing while loop with a timed loop according to your specifications....
 
Hope this helps,
Mathan
Message 4 of 6
(2,481 Views)
If you have any SubVIs that are placed in the loop, you can go to their VI Properties (open them, Ctrl-I), go the execution panel and set the priority to "Subroutine."  This will eliminate task sharing when any of those SubVIs need to be called, but it may reduce performance elsewhere in your application.
Message 5 of 6
(2,456 Views)
What else do you do inside the loop?
0 Kudos
Message 6 of 6
(2,438 Views)