LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loop interval is shorter than "Wait Until Next ms Multiple" input value.

I am using a "Wait Until Next ms Multiple" to control the interval of a while loop on a FieldPoint 2000 network module. At higher multiples (e.g. approx. 50 ms range), the time reference (from a Get Date/Time in Seconds) changes at approx the same rate as the millisecond timer. However, at shorter multiples (e.g. in the 8ms-20ms range), the time references of the loop (from Get Date/Time In Seconds) are much shorter (e.g. in the 2ms-5ms range). I do not understand what the problem is and would appreciate any insight. Thanks.
0 Kudos
Message 1 of 3
(2,537 Views)
I can not explain that either. I do not see that behavior with my FP 2000. Check out Measuring the Determinism of Real-Time Applications and download Download - TICK Timing Shell.zip. This is a library of VI's that set up all of the timing for you, so you can just add in the "Wait until next ms multiple" for the code to be timed. It ran at the expected speed for me without any problems. Hope this helps.

JR A.
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,537 Views)
Hi,

I�ve also seen strange Get Date/Time in Seconds behavior. I think the problem is the time update from your time server (a millisecond update over a network�) especially when running your vi time-critical.
A solution is to use the Get Date/Time in Seconds only as start time. And calculate the current time. (Get Date/Time in Seconds plus difference of millisecond timer)
0 Kudos
Message 3 of 3
(2,537 Views)