‎12-08-2003 08:56 AM
‎12-08-2003 09:42 AM
‎12-08-2003 12:44 PM
‎12-09-2003 04:38 AM
‎12-09-2003 08:53 AM
‎12-09-2003
08:59 AM
- last edited on
‎07-12-2026
12:31 PM
by
Content Cleaner
Any good program uses a modular design. In text-based languages, the source code typically contains multiple subroutines or functions in a single source file. In LabView, the hierarchy is built with sub-VIs, as Dennis and Steve have said. You cannot include multiple VIs in a single diagram. Each VI has its own diagram.
If I understand your question, there is no good way to create "local subroutines" as you see them: one section of the diagram that may get called from multiple places on the same diagram. The dataflow model of LabView doesn't support this. For some applications, it may be possible to build a state-machine that does this in a very limited way, but then you're eliminating some of the benefits of modular code, including the flexibility to use a subrou
tine (subVI) anywhere.
If you simply copy the diagram from the subVI onto the diagram of the calling VI and wire it in, you're creating single-use code (code that gets called only from one place). You'll be sorry if you do this for anything but the simplest application. Modular code is so much easier to develop, debug and maintain.
Click here [broken link removed] for some addition discussion on modular code in LabView.
‎12-09-2003 10:35 AM
‎12-09-2003 12:00 PM