LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Size Issue

Hi,
I have a very large VI that I am having problems editing.  Given any change in the VI I must wait a minute for the change to take effect during which time my machine locks up. I have tried to simplify the VI but I need to generate a completely automated test on a complicated system, which results in layers of nested loops.  The VI is about 30MB.  The machine is a 2.8GHz Pentium 4 with 512MB ram that operates very well for a Windows machine.   There are no other applications or VI's open.  Is it a memory issue or can I change settings in Labview to accomadate this large VI?
Thanks,
Ben
0 Kudos
Message 1 of 17
(3,657 Views)
Have you tried encapsulating sections of code into subVIs?
 
Do you know what uses all that memory? Look at the VI properties... memory usage. How much is code, data, objects etc.?
 
Is the code mostly wires or is it peppered with local variables and property nodes?
 

Message Edited by altenbach on 07-18-2005 09:14 AM

Message 2 of 17
(3,642 Views)

Definately check the things altenback mentioned, but also check to see if there could be other problems. I recently saw a VI that on disk was only a couple meg with all its subvis but loading it into memory caused my PC to run out of virtual memory and crash... And I have a LOT of virtual memory...

If there isn't glaring design problems with the code, the VI itself could be corrupted and you might have to rebuild it.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
0 Kudos
Message 3 of 17
(3,618 Views)
I'm sure you will be better off to break up things into smaller subVIs. The performance hit is extremely small, but the savings can be large.
Just drawing the dang diagram on such a beast might tax your machine.
And you won't regret it when you have to do some mods on it 18 months after it's installed.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 17
(3,611 Views)

Hi,

Thanks for the info.

I have already broken the VI down into as many subvi's as seems possible.  The problem is that I have many (about 700) different configurations to test and I have to repeat this for each of 30 channels.  Each test requires interfacing with a VI on a PCI-7831, comparing the information to logic, then writing information to a file.  I am not creating thousands of arrays however, I am just overwriting one array to then sending it each time. Very few of the logic tests in the cases are alike.  So I can't use a few different subvi's and call them repeatedly.   For some cases I can and have, but not too many.  Perhaps there will be some space savings if I make each test case a different subvi?  

It is interesting that it seems to execute reasonably well, but when I edit it it takes minutes to make any change and I get a "not responding" note on the top of the window.  Is there any simple way I can prevent labview from continually compiling?  Maybe that would help.

I use local variables whenever it is not terribly simple to wire things together.  Do the locals take a lot more space?

Do you think that a memory upgrade would help with these large files?  Maybe 512MB isn't so much anymore.

Thanks,

Ben

0 Kudos
Message 5 of 17
(3,598 Views)

If the program is simply that large, perhaps you can use VI server to dynamically load portions of the test code as you need them.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
0 Kudos
Message 6 of 17
(3,594 Views)
Just noticed another statement:
 
"I use local variables whenever it is not terribly simple to wire things together.  Do the locals take a lot more space?"
 
If you are needing to use local variables to connect things, you definately need to redesign things considerably. I have build larger applications than yours (in terms of # of VIs) without resorting to this sort of thing. Needing to use local variable to connect things is a BIG red flag.
 
How many layer deep is your code?
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 7 of 17
(3,588 Views)

And it's a good excuse to upgrade the PC too!! Smiley Wink

Thanks.

0 Kudos
Message 8 of 17
(3,591 Views)

Hi,

I have 3 layers.

I use a local variable whenever a wire would cross another wire more than once, or if I can't see the source and sink in the same screen shot.

Do you know where I can find some good examples of large, professionally written VI's?  The samples I found on this site and that came with the software are great to explain any specific technique, but they are relatively small and can't explain how to put it all together.

Thanks,

Ben

0 Kudos
Message 9 of 17
(3,526 Views)


@bugsmashers wrote:

I use a local variable whenever a wire would cross another wire more than once, or if I can't see the source and sink in the same screen shot.

Do you know where I can find some good examples of large, professionally written VI's?  The samples I found on this site and that came with the software are great to explain any specific technique, but they are relatively small and can't explain how to put it all together.


Aiye Caramba!!!  LOL!!!  😄 😄

Okay..  that appears to be a large number of local variables, right?  I would rather cross wires a number of times than using Local Variables.    From experience, of course.  We've all been there, so don't knock down your vi.  You simply need to tidy things up 😉

As for "large, professionally written vi's", you'll discover that they are a bunch of small vi's.  I break down a "large vi" by functionality into a number of smaller, re-useable vi's.  It keeps the code cleaner, easier to maintain & expand, as well as preventing too many cross wires.  As a rule of thumb, I keep the vi's no larger than a screen (21", of course) 😄

Actually, the sample files have small vi's.  It is good to study them, because they were carefully designed to be small.  As for putting them together, it boils down to the basic inputs & outputs.  Learn what the inputs do and what the outputs do.  In many cases, you do not need to use all inputs & outputs.  You can do the same when creating your vi's (or called sub-vi's). 

As recommended by others, try to avoid Locals.  They are nice and clean, but are very memory hungry.  I cannot remember if using proprty nodes is a lesser memory hungry approach.  I seem to recall that it is.

And remember on important thing about Labview.   Have fun wiring!!

Regards,

JLV

😄

Message 10 of 17
(3,519 Views)