LabVIEW Public Beta Program in 2023

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait Until Next ms Multiple still using slow clock

Aside from the interminable and ongoing argument about if one should use "Wait Until Next ms Muplitple" I continue to use it to reduce jitter in my measurements.  So far it has done a decent job, but in the last decade, computer clocks have gotten much better and the 60Hz clock has been upgraded to nanosecond timing on most OS platforms.

 

AFAICT, LV is still using a mS or worse clock and if I check it against a high resolution timer now provided in LV I get the following.

sth_0-1686599181470.png

The top histogram is 200 measurements of the standard "Wait Until Next mS Multiple" and is ± 1 mS or so.  The bottom is a quick substitute LV VI using the high resolution timer.  As you can see the reduction in jitter is significant.

 

The built in functions should take advantage of the high resolution clocks and CPU speed in 21st century systems.  Milliseconds are so last century.

 

Attached are the VIs I used for replacement (NOT CPU efficient, I assume a built in function could be optimized).  Also the wait should be a high resolution wait as well along with all these new functions being a double precision seconds value rather than integer mS.

LabVIEW ChampionLabVIEW Channel Wires

Download All
Message 1 of 1
(1,091 Views)