Creating Modular Code with SubVIs
- Updated2026-05-29
- 2 minute(s) read
A subVI is a VI that appears on the block diagram of another VI. Use subVIs in LabVIEW to create modular code that you can use in other VIs.
Large block diagrams are hard to read and maintain. Identifying commonly reusable segments of code and replacing these segments with a subVI saves space and simplifies future updates to the code because when you edit the subVI, the changes affect all calls to the subVI, not just the current instance. A block diagram that contains several identical subVI nodes calls the same subVI each time.
After you build a VI, you must build a connector pane and create an icon to use it as a subVI. You then can place the subVI on the block diagram of another VI. The subVI controls and indicators receive data from and return data to the block diagram of the calling VI.
Related Information
- Creating SubVIs from Selections
- Opening and Editing SubVIs
- Building the Connector Pane
- Types of Icons
VIs, custom controls, project libraries, statecharts, classes, and XControls can all have icons in LabVIEW. Uniquely identify an item with an icon, and use a library icon to denote membership in a grouping, such as a project library.
- Placing SubVIs on Block Diagrams