04-17-2010 10:45 AM
Hi,
I am using Labview 8.5 and have been running an uncompiled program on it for recording data in 30 min intervals. Lately, the computer has been crashing and whenever I try and make changes to the program, it would take incredibly long to do so (ie. saving the program, loading/applying any properties tab on some blocks) at 3 minutes or longer. I am getting annoyed at this because it makes it almost impossible to work effectively on the program and to making changes take an incredulious amount of time. I have been running the same program on the computer for over a month and it had been fine, so I'm not sure if it is a memory issue (although there is still 12 GB on the harddrive).
Occassionally, the system would crash during the run of the program within about 20 minutes, and would show the message that the computer would be checking for file inconsistency due to the .lvm file name. Since I'm using the "Write to measurement file" block for the program, I'm not sure if there is something I need to account for in the programming for this (although a month ago, this presented no problems)?
Oh, and I looked through some articles about memory management, which did mention about the slower execution time when most of my programming is in one vi -- I am hoping to have this as a lesser resort, since this will be a little cumbersome to repackage the vi... so I'd like to try alternative methods for what may be the culprit here? Any help would be appreciated! Thanks!!
04-19-2010 12:14 PM
Hi Karen,
I'm sorry to hear you're having trouble with your application. Would it be possible for you to post your code so I could take a look at how it is architected? At this point, it is difficult for me to make more than very general suggestions and I feel looking at the code might help me be more effective in assisting you. I look forward to helping you out as best I can.
04-20-2010 10:38 AM
Hi,
Thanks -- unfortunately, I cannot load my vi on this computer to give you the code because it is in a newer version. The best I can do at this time is to describe it, but please let me know what kind of information is relevant.
My program acquires data from 2 analog channels and has a sequence frame to initialize variables prior to running in a loop when the user presses a 'start' button. The data acquisition assistant starts a continuous acquisition at 1000 S/s at 1kHz. I have two versions of this program - one of them is in task code format -- I did this to configure the memory allocation based on the article dealing with my CPU jumping to 100% usage which was what was happening to the computer whenever the program ran. When this happens, the data acquistion would freeze. The configuration is set at "use when half-full"which is what hte article recommends, so I wonder if there is something else I can do with this configuration setting (I don't know how to use the custom setting)??
Thanks for any help,
I will post with more details in a subsequent post.
04-20-2010 03:17 PM
Continuing from the previous post:
After the data acquisition, two waveforms are extracted and displayed on the front panel using charts, with the acquisition being looped. The loop contains a bunch of if/case-boxes which are attached to buttons on the front panel for the user to acquire/configure data. One of these are in a series of sequence frames. The user can write the charts to file by clicking another button. This sets a flag variable to true, and starts to create 2 files to write and sets another flag to true. This second flag uses the 2 files to write waveforms continuously (until user presses another button). The loop may be exited by the user by clicking another button. The computer runs for about 20 minutes before it crashes.
Thanks for any help!
04-20-2010 03:21 PM
04-20-2010 03:37 PM
04-20-2010 03:37 PM
Karen,
You can still attach the file to a forum post from a previous version of LabVIEW, just don't open it in LV. If I'm missing something and you can't move it to this computer, can you move it to one that can upload it?
04-21-2010 10:22 PM
Thanks for all the advice.
I am using sequences, but in a strange way, the first in that there would be one frame in the entire loop, and the second in an case-box with 3 frames. I'm not too familiar with sequences so I'm not sure if this is the best way to be using them. Would using sequences in a loop be inefficient?
In terms of using task manager -- it does show huge problems in that it would go to 100% CPU capacity very frequently. I have been using this in the recent past to monitor the program and to predict when it would crash or execute slowly. Whenever this happens during program execution, the data acquistion would freeze up. When I save the program, this would happen as well. Occasionally (and more frequently recently) Labview would also crash when I try to save the program. It also crashes when I transfer the file to another computer.
But also even when I program - ie. when I load a properties box, for example -- the CPU would go to full capacity and I would have to wait at least 1 minute before I can continue programming.
Just in the past two days, when I load the program Labview says that there is not enough memory to compile the program. From what I can tell, I dont' think I changed the program too much.
I'm not sure if these are two different issues that are causing the program to load slowly or whether this problem originates from the same source.
I used the feature in Tools » Profile » Performance and Memory and the other monitoring feature in the Tools » Profile menu and based on that, it looks like my vi is not taking the most memory during execution -- though perhaps I'm not reading it correctly? Unfortunately, I cannot run the program right now to confirm, but when I get the chance I could verify which vi would be taking the most memory, if that would help. How could I check more detailedly for a memory leak?
I'll see if I could post up some code when I get the chance to. Thanks.
04-22-2010 05:52 PM
Hi Karen,
Just for reference, what are the vital stats of the computer you're running on? Windows version, CPU speed, RAM, how much other software is running concurrently, and anything else that might affect performance.
Diagnosing memory leaks is a bit spotty, especially in Windows. Make sure your loops have timers in them so they don't run at full speed. The Wait VI or Wait Until Next Multiple VI is a good way to enfore this. Beyond a few general suggestions, I think I'm going to need to see your code to be much more helpful. I hope this does help!
04-26-2010 02:01 AM