Avoiding SubVI Selections That Contain Terminals inside Structures

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

When you create a subVI from a selection, avoid including a structure that contains a block diagram terminal in the selection. If you create a subVI from the selection, LabVIEW displays a dialog box that warns you of the potential problem and prompts you to continue or cancel the conversion.

If you create a subVI from a For Loop or a While Loop that contains a block diagram terminal, the functionality of the original VI might change. Because the terminal remains on the original block diagram and the terminal is wired to the new subVI, the subVI does not update the value of the terminal on every iteration of the loop inside the subVI. The value of the terminal updates only after all iterations of the loop execute and the subVI finishes running.

Also, if you create a subVI from a Case structure that contains an output terminal, the functionality of the original VI might change. Because the output terminal remains on the original block diagram and the indicator is wired to the new subVI, LabVIEW always writes a value to the indicator after the subVI runs. Before you created the subVI, LabVIEW wrote a value to the indicator only when the case containing the indicator executed. If you create a subVI from the Case structure, you must edit the subVI to pass a value to the indicator in all cases.

WAS THIS ARTICLE HELPFUL?

Not Helpful