|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
|LabVIEW 2020 Help|
Owning Palette: Dialog & User Interface VIs and Functions
Requires: Base Development System
Pauses the execution of the calling VI block diagram in run mode until the function detects front panel activity in the front panel you want to monitor.
|If do not wait! is TRUE, the VI runs without pausing execution.|
|front panel is a reference to the VI you want to monitor for front panel activity. You can wire a VI, front panel, or control reference to this input. If you wire a control reference, the function monitors the activity of the front panel containing the control. If you do not specify a reference, the function monitors the front panel activity of the VI in which you place the function. |
You must wire a reference to a VI or object in a local application instance. You cannot wire a reference to a VI or object in a remote application instance.
|timeout ms specifies the time, in milliseconds, that the function waits before it lets the VI continue execution. The default value is –1, which indicates to wait indefinitely.|
|millisecond timer value returns the value of the millisecond timer.|
This function is similar to the Occurrences functions. Use this function if you want a block diagram to execute only after a user changes the value of a front panel object, such as when the user clicks a button, turns a knob, or enters data. This function activates that block diagram if the function detects user activity on the front panel. Use this function to eliminate the need for continually polling the front panel to determine if the value of a front panel object changes. You also can use this function to monitor activity on a remote front panel.
|Note You cannot use this function to handle front panel events such as mouse clicks or keystrokes programmatically. Use the Event structure to handle front panel events programmatically.|
Continual polling can cause a VI to run millions of times and use up system resources before a user interacts with the front panel. If you use this function, the loop runs only twice to respond to user input—once to engage the function and a second time when the user changes the value of a front panel object.
The VI in the following example pauses at the Wait For Front Panel Activity Node until a user enters a user name or password or clicks the OK button.
The OK button wired to the While Loop passes the user name and password to the Validate Password VI and to the do not wait! parameter of the Wait For Front Panel Activity function. If the button were not wired to the function, clicking the OK button would execute the subdiagram in the While Loop including the Wait For Front Panel Activity function, which defaults to wait on front panel activity when executed. The user would have to click the OK button twice to send the user name and password to the Validate Password VI—one time to wake up the VI and execute the loop and a second time to wake up the VI and send the user name and password out of the loop to the Validate Password VI.