Pauses the execution of a VI in run mode until the function detects front panel activity. Details
![]() |
If do not wait! is TRUE, the VI runs without pausing execution. |
![]() |
front panel specifies which VI the function monitors for front panel activity. If you do not specify a reference to a VI, the function monitors the front panel activity of the VI in which you place the function. |
![]() |
timeout ms specifies the number of milliseconds the function should wait before it lets the VI continue execution. The default is 1, which indicates never to time out. |
![]() |
millisecond timer value returns the value of the millisecond timer. |
This function is similar to the Occurrence 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 inputonce 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 VIone 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.