LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce VI File Size - Large Project

I have this project with about 60 subVIs and a top level VI. The file size was around 600K and now it's between 1.5 and 1.6M. Sometimes, I remove an object and save it, the file size increases. I am at a loss.

I read through a lot of forums and did the following:

1. cleared the controls and indicators and set a blank value (arrays and plots)
2. Minimized the use of local variables and used references, and property nodes.

I should say that I have a lot of property nodes around 100-200 now .. whew !

any tips on what I should do to minimize my file size ?

Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 7
(3,836 Views)
Here is a snapshot of my TOPLEVEL.vi memory ... thanks ! Looks like the block diagram objects take a whole lot of memory ... Is it impossible to reduce that size ? Any suggestions would be helpful. Thanks !!

Kudos are the best way to say thanks 🙂
0 Kudos
Message 2 of 7
(3,824 Views)
100 to 200 property nodes ??!!!?? Smiley Surprised

What in the world are you doing that requires that many property nodes?

I would suspect that whatever it is, there's got to be a better way to do it.

Yeah, that many property nodes is certainly going to increase your file size since each property node is an object. If you take a new VI and plop down a numeric control and save it, it's about 5K on disk. Plop down 100 property nodes and it's now 64K.
0 Kudos
Message 3 of 7
(3,824 Views)
I'd say close to 100. The reason I have that many are: I have about 10 booleans, each triggering an event, and bunch of menus, plots ... so I am using property nodes to make my GUI as user friendly as possible ... One thing I noticed was : I have a bunch of instructions repeated ... So I guess I can group them or something ...

Isn't using property nodes better than local variables ? I have very few of the locals left ... however I have few instances of globals too..

Kudos are the best way to say thanks 🙂
0 Kudos
Message 4 of 7
(3,813 Views)
Still seems high to me, even for super-friendly GUIs.

Eliminating duplicate code is obviously going to help. It may also be possible to eliminate some of those nodes by recoding so that you're using wires to update your values rather than property nodes.

Are property nodes better than local variables? Not always. If you're using the "Value" property, then the answer is no. The "Value" property node is way slower than a local variable. Sometimes, though, you need to use the property node, like when you need to trigger a "change" event due to the value changing. In this case you need to use the "Value (Signaling)" property.
0 Kudos
Message 5 of 7
(3,800 Views)

There have been independent discussions about this in the past, but local variables are more efficient from an execution speed point of view than using the Value property.  Of course there are many things you can do with property nodes other than read / write the value of a control, in which case you'd need to use property nodes.

I'm more interested in your VI.  What version of LabVIEW are you working with?  Is it the top-level VI alone or the combination of all 60-or-so VIs that take up around 1.5 MB on disk now?  Is it possible to post your top-level VI (even without the subVIs)?  I presume this is the one with the majority of the property nodes.

0 Kudos
Message 6 of 7
(3,797 Views)
Did you read the suggestion to move the property nodes to a subVI? Instead of repeating the same properties for many different controls/indicators, write a single subVI that contains a single node with multiple properties and just pass the reference of the control/indicator you want to modify. Look at the shipping example called Property Nodes. It has a subVI for modifying the single chart but for modifying one of many charts, you just pass a different reference.

Message Edited by Dennis Knutson on 11-09-2006 08:24 AM

0 Kudos
Message 7 of 7
(3,796 Views)