LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Program freeze during while loop operation

Dear all.

I have a program that controls mass flow controller and LabJack data acquistion unit and I have a difficulty in fixing a program bug that cause while loop freeze after certain period time(about 1-10 hours after run start).

 

Basically, the program reads a control profile that consists of two rows of data (two steps) from the front panel and controls the flow controller and Labjack.

There are three while loops and one is for reading data from mass flow controller and writing control data to that device and LabJack, the other one is to monitor the elapsed time to change the control profile, and the another one is to measure the data from the Aglient miliohm-meter.

 

Each step (each control profile) has data for flow rate and duration time, etc. Once the time(duration) elaspsed, the control profile switch to the second profile (second row) and the software keeps running with new control profile. After the second step, the control step comes back to the first profile. This sequence keeps going in the while loop.

 

The problem that I encountered is that after a certain amount of time, the control profile is no longer switched to the other one, and even though I change the step manually, the profile is not switched to the other one. I found that there is no error message from the instrument when this thing happens and no memory increase, but the CPU usage jumps up to 50 ~ 70%. (You can see the screen shot in the attached file). Normal CPU usage is between 2 ~ 10 % for this program. I use LabView 8.2.

 

I tried to figure out this problem , but it's too difficult for me to find the bug.

 

It would be appreciated if you can give me some hints and suggestions.

 

Thank you very much.

 

Yoon.

 

Message Edited by swsyoon on 06-25-2009 05:49 PM
Message Edited by swsyoon on 06-25-2009 05:51 PM
Download All
0 Kudos
Message 1 of 3
(2,608 Views)

In the program, there is tab control, but please look at the "RH cycling" tab only. (ignore the other two tabs)

Thank you.

Yoon

0 Kudos
Message 2 of 3
(2,598 Views)

My general suggestion for a problem like this, is to try and isolate the problem.  Cut things out of your program, until you have the simplest possible program that still causes the problem.

 

Also, perhaps you can make the program go faster and get the problem to happen quicker, for testing. 

0 Kudos
Message 3 of 3
(2,562 Views)