LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What Are the Advantages of using Sub VI

I am just wondering what the advantages are when using sub VI. 
0 Kudos
Message 1 of 3
(5,710 Views)
breaking a huge project into small pices, so you don´t loose generaly survey

develop and testing small programms is much easier for me then a huge,complex programm

0 Kudos
Message 2 of 3
(5,700 Views)
You use a subVI for a lot of reasons. Just like a sub-routine in text languages, it's code that may be called several times by the main. Instead of duplicating a bunch of functions and wires, create one subVI. You can also use a subVI to make your block diagram more manageable. A good rule of thumb to follow is to keep your block diagram no larger that a single screen. Having to scroll back and forth over several screens makes the diagram harder to modify and debug. Using subVIs, your diagram is smaller. It's also much easier to debug a subVI that does some limited function that trying to debug a large main. It's much easier to test a subVI with a couple of inputs and outputs than one with dozens or even hundreds.
Message 3 of 3
(5,694 Views)