LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the recommended maximum file size for a VI ?

1.) I am involved in documenting a project that includes LabView developed controls for a built from scratch test instrument. The LabView I am wading through involves multiple VIs, many of which are large files that are difficult to decipher. I would like the programmer to consider reducing the VI file sizes by breaking the large VIs up into sets of smaller VIs. What would be a target file size to shoot for?

2.) Is it possible to avoid the use of global variables in LabView projects made up of multiple sub-VIs?

Lost in Code
0 Kudos
Message 1 of 4
(2,956 Views)
Probably better guidelines that dictates 'size' of a vi are:
typically no more than 1 video screen in size
is it legible
and is it's function and operation clear.

I have seen examples of '1 vi does it all' that were many screens wide and tall, totally a flustercuck, and nearly 1 MB in size.

Globals and local variables (except for LV2 style) are typcially shunned for they can create a host of problems (race conditions, indeterminant data).
Use connector pane to wire controls and indicators to. Then use wires between vi's to transfer data. I tend to use clusters to hold shared data.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 4
(2,949 Views)
when you say "one video screen in size" are you precluding the multiple monitors allowed by Windows? 😉


Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,942 Views)
What I would recomend is that you read Chapter 6 of the LabVIEW Development Guidelines. This is a shipping document that is part of the LabVIEW Bookshelf you can access from the Help menu. In there, the recomended size of a diagram is that it be no larger than the screen size. Now, with 21 inch monitors and high resolution, you can still end up with a pretty big diagrams so you might want to get a bit more specific (i.e. 17", 1024/768). The actual file size can vary greatly and may not be a good indicator of readability.

Avoiding globals is certainly possible. I have done and seen many large application with no globals at all. If a global is the only solution, then a functional global is a better choice. This too, is covered in the style guide
Message 4 of 4
(2,938 Views)