LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pb to save a vi on LabVIEW 6.1

I have a vi pretty big vi (12 M).
When I try to save, it works when the modification is small and when the vi is showing error.
When I do the last modification to get the vi OK, I am not able to save: the CPU of my PC is at 100 % and it never ends.
0 Kudos
Message 1 of 9
(3,470 Views)
I'm don't understand what you mean by "it works when the VI is showing error" and by "the last modification to get the VI OK". Explain more about this. But before you do, how did your VI get to 12 MB? Unless you have a picture or something similar embedded in your front panel it is bad practice to have VIs so big. You should split your tasks into sub VIs and see if this helps. However, in general, I don't think that 12 MB for a single VI is too much for LV to handle so your problem is probably somewhere else. Do you use any hardware with your VI? Do you have enough space left on your hard drive? If all this didn't help, I would suggest that you post your code, but before you do (12 MB is a lot, even if you ZIP it), tell us why your VI is so big.

___________________
Try to take over the world!
0 Kudos
Message 2 of 9
(3,465 Views)
I mean by "it works when the VI is showing error": I can save the VI when the VI is still exhibiting an error, but when I do the last modification to correct the last error, I am not able to save the VI anymore.
Please find attached my zipped code.
0 Kudos
Message 3 of 9
(3,435 Views)
I was missing many controls and VIs, so I couldn't simulate your problem, but I will make a few comments. Hopefully they will help.
First, your front panel is great. It is well organized, makes good use of tabs, colors and frames and is pleasant to look at. Your block diagram, however, is another matter. It is very large, has no comments and is hard to follow. Crucially, it also has a very small number of subVIs. While this may not be what is causing your problem, having subVIs is important in many ways, the most important of which, in this case, is that subVIs can be debugged individually, so if your problem is localized to a certain place, it would be easier to find. I don't believe having subVIs would help you memory-wise, because as far as I know LV loads all VIs into memory when they are opened, so the same amount of code will take the same toll on the computer. It will make a difference if you're using a VI in several places within your code. So, the first advice - more subVIs and more comments.
Second, is the problem always caused by the last "fix" or is it caused by something specific? If you change the last "fix" and do something different, will it make a difference or will it still crash? If it still crashes, it's possible LV compiles the code every time you make a change and the second you make the last change it compiles the entire code and runs into trouble with something. I can suggest two things for you to try: see if you have any unnecassary structures initialized (for example, a DBL takes 8 bytes, so think how much an array of many DBLs or many clusters would take) and try clearing them. Try doing this on another computer, one that has the same setup as your own (mine doesn't). BTW, how much memory do you have on that computer? I think LV should be able to hold your VI in memory, but maybe that is your problem?
Last suggestion, try mass compiling or force compiling (ctrl+shift+run). I don't know if it will work on a broken VI, but maybe it will help.
I can also suggest that you read the LabVIEW user manual. Also, try searching this site and google for LabVIEW tutorials. There is a lot of information and programming practices which can (and should) be learned from these sources. You can also contact your local NI office and join one of their courses. In addition, I suggest you read the LabVIEW style guide.

___________________
Try to take over the world!
Message 4 of 9
(3,427 Views)
Thanks a lot for your comments and advices.
- I have already tried on another computer without success.
- My computer has enough memory by far.
- I have tried the forced compiling, but it is still failing to save the VI.
- This is not depending of the last fix. If I change the last fix, I still have the issue. However, according to your explanation, I will go back to a previous version that is compiling and I will try to save little step by little step.
0 Kudos
Message 5 of 9
(3,421 Views)
quimper,

I strongly echo tst's comment about more subVIs to get the size of your VI down. Unfortunately, I don’t have any specific suggestions right now because there's a lot to digest.

One minor suggestion (which will knock a few hundred kilobytes out of your block diagram) is the following:

The Index Array function is expandable. You can remove ~400 or so I32 constants being used as indices if you make the switch shown in the attached jpg.
It'll also free up space on the block diagram.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 6 of 9
(3,398 Views)
Thank you very much. I will try the Index Array function expandability.
My VI is quite slow, do you think this change can improve the execution speed ?
0 Kudos
Message 7 of 9
(3,378 Views)

@quimper wrote:
Thank you very much. I will try the Index Array function expandability.
My VI is quite slow, do you think this change can improve the execution speed ?


No, unfortunately I don't think it will make any difference for execution speed.
It is a really big VI (4 MB front panel, 8 MB block diagram), doing a lot of things. As with tst, it's not executable for me with all the missing subVIs, but my computer bogs down if I start editting it. If I delete some of the larger structures from the block diagram LabVIEW locks up completely.

Another minor suggestion (that might speed things up a little, little bit):
Is your "conversion_number_to_boolean.vi" set to be reentrant?
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 8 of 9
(3,371 Views)
Sorry,
I do not understand what you maen by reentrant ?
Would you please give me a small explanation ?
Thanks.
0 Kudos
Message 9 of 9
(3,366 Views)