07-18-2005 10:52 AM
07-18-2005 11:13 AM - edited 07-18-2005 11:13 AM
Message Edited by altenbach on 07-18-2005 09:14 AM
07-18-2005 05:34 PM
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...
07-18-2005 08:07 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-19-2005 07:58 AM
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
07-19-2005 08:04 AM
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...
07-19-2005 08:08 AM
07-19-2005 08:09 AM
And it's a good excuse to upgrade the PC too!! ![]()
Thanks.
07-19-2005 08:24 AM
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
07-19-2005 08:36 AM
@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
😄