cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Looping Time Less Than 1 ms

Could the wait time in a loop be less than 1 ms when Windows XP OS is used?
Mensaje 1 de 12
7.279 Vistas
If you are using the wait function you can set it to zero but it will not do much good if you are on a windows machine. No matter what you set it to you will be at the mercy of Microsoft.



Joe.
"NOTHING IS EVER EASY"
0 kudos
Mensaje 2 de 12
7.251 Vistas
Hi

I just wanted to add that even if you set it to zero, the call to the Wait function makes the while loop yield so that other tasks can be scheduled.  For a much more detailed explanation see here:

http://forums.lavausergroup.org/index.php?showtopic=258

Regards,

Robst.



Robst - CLD

Using LabVIEW since version 7.0


0 kudos
Mensaje 3 de 12
7.249 Vistas
If I would like to record 2 sets of data at 1-ms sampling rate each, could I write two parallel loops each with a 1 ms wait?
0 kudos
Mensaje 4 de 12
7.238 Vistas

Instead of a regular loop, you should use a timed loop (ot two timed loops in this case).

Their timing is much more tightly controlled and they even keep you informed if an iteration finishes late, etc. Check the online help for more information.

Mensaje 5 de 12
7.229 Vistas

Keep in mind that the Timed Loop is only available in LabVIEW 7.1 and later.

-D

0 kudos
Mensaje 6 de 12
7.209 Vistas

The timing VIs use calls to windows to monitor the PC's millisecond timer.  Therefore you cannot receive any time granularity less than a ms, but to make it worse since you are making a windows call you (as mentioned before) are at the mercy of the OS's scheduler.  I guess a "workaround" is to embed some sort of VI in a loop you can estimate the execution time on (such as a for loop iterating over nothing for 1000 times).

Best of luck!

0 kudos
Mensaje 7 de 12
7.191 Vistas
Hello LVNA,

I think your "workaround" is no good idea. It went wrong 25 years ago and it will call for trouble now! Such a loop is heavily processor dependent...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Mensaje 8 de 12
7.181 Vistas
You can off course.

Just repeat the code you need to
execute in a loop as many times as you want
your loop to run faster than 1 ms, and
don't forget to set "Wain until next ms multiple"
to 1 ms.

It is not very beautiful and cannot
solve special problems but it works fine
even on Win.
0 kudos
Mensaje 9 de 12
7.172 Vistas
This won't work very well.  You'll end up with the code in the loop being executed N times, and then a pause, then N times, then a pause with each cycle being repeated every ms.

This means that the time between individual "measurements" is different depending on whether you have successive runs within the same iteration of the loop or not.

I can imagine that this will mess with many data analysis functions.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 kudos
Mensaje 10 de 12
7.152 Vistas