Suspend execution of a subVI to edit values of controls and indicators, to control the number of times it runs before returning to the caller, or to go back to the beginning of the execution of the subVI. You can cause all calls to a subVI to start with execution suspended, or you can suspend a specific call to a subVI.
Complete the following steps to suspend all calls to a subVI.
Open the subVI.
Select Operate»Suspend when Called.
The subVI automatically suspends when another VI calls it. If you select this menu item when single-stepping, the subVI does not suspend immediately. The subVI suspends when it is called.
Complete the following steps to suspend execution at a specific subVI call.
Right-click the subVI node and select SubVI Node Setup from the shortcut menu. The SubVI Node Setup dialog box appears.
Place a checkmark in the Suspend when called checkbox and click the OK button.
In the Browse»Show VI Hierarchy window, the suspended VI includes a green glyph.
After you suspend execution of a subVI, you can perform the following tasks:
Change the control or indicator values if you want to return different values to the caller VI. You can set values of indicators only when a suspended VI is not running. Click the Return to Caller button at the top, left of the subVI front panel to send the indicator values of the subVI to the caller VI.
Run the subVI as many times as you want before returning to the caller VI. Click the Run button or select Operate»Run. Repeat the execution.
Go back to the beginning of the execution of the subVI. Click the Skip to Beginning button at the top, left of the subVI front panel. Click the Return to Caller button at the top, left of the subVI front panel to return to the caller VI. The Return to Caller button appears when a suspended subVI is not running. Notice that you can return to a caller VI without running the current VI. If you want to run it, click the Run button before you return to the caller.