LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vi file size suddenly increased

Solved!
Go to solution
I have had a main vi file size of about 160 KB for several days now. All of a sudden today after ( maybe after making very slight changes to my SubVi -not sure about this) , the main vi file size suddenly shot up to 18MB! Why did this happen and how do I get it back to normal ( if normal is fine)

[BADGE NAME]

0 Kudos
Message 1 of 10
(4,800 Views)

Seeing as we know so much about your VI, let us give you a detailed response 😛

 

Try posting the VI so we have SOME chance to figure out what may have changed?

0 Kudos
Message 2 of 10
(4,793 Views)
Solution
Accepted by topic author blessedk

This typically happens if you set a contol value to have a default value that contains a lot of data.  If you have an array control and you set it to have a default value that was a very large array, for example, LabVIEW has to store all that data inside the VI.

 

Another possibility is including images on the front panel or block diagram.

Message 3 of 10
(4,775 Views)
Similar to what Matt said, constant folding can also do this. Say you have a loop that generates 10,000 values and all the inputs to the loop are from constants. The optimizer in LabVIEW will see that the contents of the array cannot change and so will calculate the output of the loop at compile-time and save the result like a constant.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 10
(4,760 Views)

So you made changes to the subVI, but the size of the main VI increases? That makes very little sense.

 

What is your LabVIEW version?

Is the subVI inlined?

Do you seperate compiled code? (VI properties...general)

What are the various values in "VI properties...Memory Usage"?

Are large controls and indicators empty by default (arrays, graphs, variants, etc.).

Does the diagram contain express VIs?

Does the front panel or diagram contain any bitmaps/pictures?

What does the VI do? Does it load and work correctly?

Did you scan the HD for errors?

Do you have a backup of the small VI for comparison?

 

It would be easiest if you could attach your code.

 

Message 5 of 10
(4,755 Views)
Thanks Mattt. You were spot on. I mistakenly "made current value default" without first clearing graph 🙂 This was a graph on my main vi which makes sense.

[BADGE NAME]

0 Kudos
Message 6 of 10
(4,729 Views)

Hello,

 

Thank you for this nice chain. This prompted a question: I know that it's good to clear large arrays/graphs before saving to save memory. What about the subVIs? is it necessary for me to clear arrays or graphs inside the subVIs? so that the main VI doesn't blow?

 

Thanks

0 Kudos
Message 7 of 10
(668 Views)

Hi rpicazof,

 


@rpicazof wrote:

What about the subVIs?

is it necessary for me to clear arrays or graphs inside the subVIs? so that the main VI doesn't blow?


How is the filesize of your subVIs related to the filesize of your MainVI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 10
(664 Views)

I am not sure - that was my doubt, if I have a 1 MB main VI and I put 100 MB subVI inside, is the main VI 1 or 101 MB?

0 Kudos
Message 9 of 10
(602 Views)

Hi rpicazof,

 


@rpicazof wrote:

I am not sure - that was my doubt, if I have a 1 MB main VI and I put 100 MB subVI inside, is the main VI 1 or 101 MB?


Just try it on your own and check the resulting filesizes!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(590 Views)