LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
ToeCutter

Wait millisecond timer value

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

At the moment there are two wait functions in LabVIEW that I know of:

 

-wait (ms)

-wait until next ms multiple

 

I propose a third option, 'wait until ms timer value' which waits until the system timer reaches the specified value.

 

What does this gain us? Suppose we want a loop to execute on the average every n milliseconds. We use the existing 'wait next ms multiple' in the loop. What if we want n to be non integer? It may not make sense to pass a fractional number to a wait function that doesn't offer that resolution, but it's a reasonable wish to have a loop execute on the average every n milliseconds for non integer n. How can we achieve this? Add n to a count each time we loop, then each loop wait the whole part of this accumulated value and take this off the count. The result would be a loop which takes sometimes a little under, sometimes a little over the specified number of millis due to rounding, but averages to the non integer value requested. The problem is the required wait function- wait(ms) will not do it- it doesn't account for the time the code in the loop takes to execute. Wait next ms multiple won't do it- it's no good when the wait is varying - what we need is to wait until a fixed timer count.

 

Hence the request.

11 Comments
Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.