LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview application Freezes randomly

I have an image aquisition software grabing image and process it.
The application freezes randomly, but after hanging for a few seconds, the application resumes automatically.
What can be the possible reasons for this and what is the solution?
I do not think it is caused by the hardware because when I read from local AVI files instead of grabing images from camera,
it still has the same problem.
I had inserted a 0 time waiting period in my loop and it is not helping.
 
I am not using any thread VI, but I have used queues.
 
I am using Labview 7.1 and Windows XP SP2.
 
 
Thanks
 
akang
 

Message Edited by akang on 10-31-2005 02:46 PM

0 Kudos
Message 1 of 4
(3,192 Views)

akang,
 
Try to use a wait time greater than 0.  Try adding a 100 mSec pause in the program loop.  Windows is an OS and it will do other task in the background thus suspending your application at times.  Disable the Windows Automatic Updates and Virus checker automatic updates.  That's what we do and we have systems that run for months at a time in a time sensitive environment.  We have had good results with XP and LV 7.1.  Use Windows Task Manager and see how much CPU and Memory you are using while your application is running.
 
Matt
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 4
(3,172 Views)
When the application freezes, windows also does not respond to other activities including mouse clicking, so I cannot look at the task to see how much cpu and memory it is using when it freeze, but it seems that it is the labview that uses all the CPU time. Is there a debug tool that can show the stack or the current VI of the program ?

I do not really want to add more time delay into the loop because it is a time critial application, I am expecting the frequency of  200 fr/second.

Thanks

0 Kudos
Message 3 of 4
(3,165 Views)
It sounds too me that you are maxing out the capabilities of your PC.  If this application is a true real time application then you may have to consider using a Real Time OS that would also require LV for Real Time.  200 fr/sec is asking a lot out of a desk top PC and it is freezing because the OS needs to catch up with other task.  Are you doing image processing, saving images to disk, running for an extended period of time?  If you want this to work then you need to review your code carefully and make it ultra efficient.  Upgrade your PC to faster processor, more RAM, and a faster hard drives with RAID 0 (data swiping) configuration. Even this does not mean that it will work the way you want it too.  Disable all task that run in the background like auto-updates.  Windows is not a Real Time OS.  If you don't have any free CPU time then the application will freeze.
 
Use Application Note 168 for guidance:
 
Matt
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 4
(3,153 Views)