To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Coding that demonstrates how the "Wait (ms)" and "Wait until Next ms Multiple" functions work in a different way.
Description
This VI goes through two common wait VIs in LabVIEW: Wait(ms) and Wait Until Next ms Multiple. There is often a questions of when to use each and what the difference is. Exploring this VI will increase your awareness of the difference of the two functions and how they interact with one another.
There are four cases explored in this VI, and each has a designated tab on the front panel:
0. Wait (ms) - This is the most basic wait function, where the VI will wait a specified number of milliseconds.
1. Wait Until Next ms Multiple - This VI will wait until the system clock has reached a multiple of the specified millisecond amount.
2. Wait & Wait Until - This case explores how the two VIs work when used in parallel. Try this case with different values to see which controls the execution timing.
3. Wait Until Next Explained - This case has a little bit of math that calculates why the Wait Until Next ms Multiple VI waits the amount of time that it does.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Select the tab you would like to run
2. Set the time you would like the functions to wait
3. Run the VI
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Excellent example! It helps a lot to understand the REAL functions of these two timing blocks.
Well done, thanks!
Good example and cleared my doubts about these functions
Really good example with all questions answered
Can any one please tell me, how I can get the specified value to wait(ms) timer as output from it (Supposing 10 is the input to the wait(ms) timer, how I can 10 in the numeric indicator if I wire it to its output.