• Home
  • Blog
  • Labview
  • Creating SUBVIS From Sections Of A VI in Modular Programming - LabVIEW

Creating SUBVIS From Sections Of A VI in Modular Programming - LabVIEW

In the simplest terms, modularity is using smaller elements to accomplish a larger goal. Program modularity in LabVIEW refers to the division of code into smaller units known as subVIs. A subVI is like a subroutine in a text-based computer language. This article will demonstrate you how to construct a subVI, how to customize its icon appearance, and how to build and configure the connection pane.

You can convert a section of a VI into a subVI by using the positioning tool to select the section of the block diagram you want to reuse as shown in Figure 3.11. Then select Edit» Create SubVI as

If you would like to Enrich your career with an Android certified professional, then visit Mindmajix - A Global online training platform: “LabVIEW training” Course.This course will help you to achieve excellence in this domain.


VI and SUB VI Creation

shown in Figure 3.12 from the menu to convert the selected portion into a subVI. SubVI created with default icon is shown in Figure 3.13. An icon for the new subVI replaces the selected section of the block diagram. LabVIEW creates controls and indicators for the new subVI, automatically configures the connector pane based on the number of control and indicator terminals you selected, and wires the subVI to the existing wires.

MindMajix Youtube Channel

                                              Checkout LabVIEW Interview Questions

Select Edit»Create SubVI to create subVI.
VI and SUB VI Edit

Sub VI Creation

Creating a subVI from a selection is convenient but still requires careful planning to create a logical hierarchy of VIs. Consider which objects to include in the selection and avoid changing the functionality of the original or resulting VI. Creating a subVI from a selection is the same as removing the selected objects and replacing them with a subVI. In both situations, LabVIEW does not remove any of the front panel terminals included in the selection from the original VI. The front panel terminals remain on the front panel of the original VI and the terminals are wired to the new subVI. Also for each front panel object with a Property Node or local variable in the selection, LabVIEW adds a control reference to the original block diagram and wires the reference to the subVI. In the subVI, LabVIEW wires the reference to a Property Node. Select not more than 28 objects to create a subVI, because 28 is the maximum number of connections on a connector pane. You avoid creating cycles on the block diagram and including a structure that contains a front panel terminal in the selection.

Explore LabVIEW Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

 

Course Schedule
NameDates
LabVIEW TrainingNov 09 to Nov 24View Details
LabVIEW TrainingNov 12 to Nov 27View Details
LabVIEW TrainingNov 16 to Dec 01View Details
LabVIEW TrainingNov 19 to Dec 04View Details
Last updated: 04 Apr 2023
About Author

I am Ruchitha, working as a content writer for MindMajix technologies. My writings focus on the latest technical software, tutorials, and innovations. I am also into research about AI and Neuromarketing. I am a media post-graduate from BCU – Birmingham, UK. Before, my writings focused on business articles on digital marketing and social media. You can connect with me on LinkedIn.

read less
  1. Share:
Labview Articles