LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a limit to how large a VI can be?

I am approaching 7MEG file size and will probably end up needing 10 Meg.

0 Kudos
Message 1 of 19
(13,031 Views)

hummm well.. the question is how comes your VI is so large??

For instance if you put a large image (jpg for instance) on the front panel, that will affect the size of your VI.

But if there is no such thing and you hace 7MB of pure code then I'd love to see you diagram 😮

If you hit ctrl + i and select the "memory usage" tab, what does it say?

FP objects

BD objects

Code

Data

Total

Size on disk


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 19
(3,951 Views)

FP objects:  1870.3K

BD objects:  27249.2K

Code:  15218.0K

Data:   4032.9K

Total:  ~48370.5K

Size on disk:  ~7168.6K

0 Kudos
Message 3 of 19
(3,951 Views)

In LV 6.0 or there-abouts the VI would break if the type descriptor for the FP

grew over 64K (?) but the limit on VI s since then

...

BD with a size larger that 32K pixels (?) crashes LV.

if you plan a keeping that VI, then I suggest you find out yourself and after BACKING IT UP (a zillion times to a server and your home PC) just astrt doing a "ctrl-a" ctrl-v on the diagram until it crashes. Please share the size that resulted in the crash, so the rest of us never go there.

Just trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 19
(3,951 Views)

15Mb of code... wow...

What is your application doing?

Do you not have any subVIs?


How big is the block diagram in terms of screen-scrolling?

What's the size of you screen?


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 19
(3,951 Views)

Wow, this gives new meaning to "large application development". I checked one of my more complicated VIs and it's memory usage is:

     FP: 91.2K

     BD: 1MB

     Code: 293K

     Data 271K

     Total: 1.7MB

     Size on Disk: 422KB

Use SubVIs and empty your Graphs, Charts, and Arrays before saving to disk.

0 Kudos
Message 6 of 19
(3,951 Views)

Ok this is my dilemma:

For the people who have asked, I do have some SubVI's in my program.  Most of the program is written using property nodes over and over.  Shifting controls from one place to another making controls blink and hiding other controls.  I am using property nodes like blinking, visible and value.  Is it possible to make SubVI's that have property nodes in them?

0 Kudos
Message 7 of 19
(3,951 Views)

Yes you can have property nodes in sub-VI provided you are coding

in a version more recent than LV 6.0.

I wrote a mini-Nugget on accessing control refs from sub-VIs this morning and you can find it here.

At the time I wasn't quite sure why i took the time but it must have been to handle this Q here today.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 19
(3,951 Views)

Absolutely. Pass a reference to the control to the subVI. In the subVI, you can use a "generic" property node to get and set properties of the control connected to the reference.

0 Kudos
Message 9 of 19
(3,951 Views)

Instead of manually creating references and adding them to the connector pane, keep in mind that LabVIEW can create subVIs for you.  Simply select the portion of code you want to put into a subVI and select 'Edit > Create SubVI.'  I recommend modifying the connector pane it'll create to conform with your style guidelines, but it does most of the work for you.  LabVIEW will also warn you if creating a subVI risks changing the functionality of your code.

Also, Ben is right about backing up your code religiously, but I would highly encourage everyone to use source code control for this purpose!  TortoiseSVN is a great (and free) solution for this.

Elijah Kerry
NI Director, Software Community
0 Kudos
Message 10 of 19
(3,951 Views)