Tutorial SubVIs - Developer Zone - National Instruments

Tutorial SubVIs- - Tutorial SubVIs Developer Zone N Improve your ni.com experience Login or Create a user profile Document Type Tutorial NI

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Overview This video describes how to develop modular applications. The power of NI LabVIEW software lies in the hierarchical nature of the VI. After you create a VI, you can use it on the Block Diagram of another VI. There is no limit to the number of layers in the hierarchy. Using modular programming helps you manage changes and debug the Block Diagram quickly. Understanding Modularity Modularity, by definition, means to use modules or smaller parts for the overall objective. Within LabVIEW, program modularity means creating smaller sections of code known as subVIs. SubVIs are the same as VIs. They contain front panels and block diagrams, but you call them from within a VI. A subVI is similar to a subroutine in text-based programming languages. When you create a subVI and use it, you see an icon within your block diagram that represents the subVI. You can customize this icon, which is the same icon in the upper right corner of the subVI front panel and block diagram. Learn how to customize icons in a later section of this tutorial. The following figures demonstrate the difference when replacing a section of code with a subVI. You can see the simplicity in the bottom figure. Tutorial: SubVIs Document Type : Tutorial NI Supported : Yes Publish Date : Jul 2, 2008 Improve your ni.com experience. Login or Create a user profile. 2/2/2009 Tutorial: SubVIs - Developer Zone - N… zone.ni.com/devzone/cda/tut/p/id/7593 1/9
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
another VI. Once you create a VI, you can: Customize the icon for the subVI Configure the terminals Use it within other VIs repeatedly Creating a SubVI from an Existing VI You can simplify the block diagram of a VI by converting sections of the block diagram into subVIs. 1. Create a new VI and construct the following block diagram. 2. Select the section of the block diagram you want to convert. 3. From the Tools menu, select Edit»Create SubVI . The selected section of the block diagram is replaced with an icon for the subVI. 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. 2/2/2009
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/11/2009 for the course ENTC 219 taught by Professor Staff during the Spring '08 term at Texas A&M.

Page1 / 9

Tutorial SubVIs- - Tutorial SubVIs Developer Zone N Improve your ni.com experience Login or Create a user profile Document Type Tutorial NI

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online