Home  >  Blog  >   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.

Rating: 4
  
 
3248
  1. Share:
Labview Articles

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!

 

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
LabVIEW TrainingApr 20 to May 05View Details
LabVIEW TrainingApr 23 to May 08View Details
LabVIEW TrainingApr 27 to May 12View Details
LabVIEW TrainingApr 30 to May 15View 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 more
Recommended Courses

1 / 15