Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel freezes but program keeps going

I have a program with 100+ objects on the front panel that indicate activity based on serial input.  The problem is that the front panel seems to lag/freeze intermittently.  The program still runs while this happends, but nothing changes on the front panel display.  The amount of CPU taken up by labview never exceeds 22% and memory used never goes over 50megs (stays stable during runtime).  I have tried to disable smooth updates and have reduced hardware acceleration on my video card setting, but none of this seems to make any difference.  Is there anything else i can do to avoid having the front panel freeze? 
 
When i move the mouse over some objects or click on it, sometimes it starts updating again, only to freeze within another minute.  Is there a limit as to the number of front panel objects that labview can handle dealing with?
 
thanks,
Polina Sorkin
0 Kudos
Message 1 of 6
(3,369 Views)

Hi Polina,

 

It appears that the processor is somehow switching between User Interface activity and the block diagram. If you go to File >> VI Properties >> Execution, what execution system do you see selected ? Also what version of LabVIEW and what Operating System are you working with? Finally, here is a document discussing multi-threading that might shed some light on the issue:

http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/d2e196c7416f373a86256869007...

 

Hope this helps.

Ankita

0 Kudos
Message 2 of 6
(3,343 Views)

under execution:  the priority is set to "normal priority" and the preferred execution system is set to "same as caller"

My labview version is 7.0 running on windows 2000.  I don't think it's switching between user activity and the block diagram, because everything on the block diagram continues to run normally during the lag/freezing of the front panel.  The program itself continues to run smoothly, and if i setup probes for any of the values within the program, they update regularly.  The ONLY thing that seems to be affected is the front panel display.  The problem only started when I added a bunch of graphical indicators to the front panel (gauges, meters, thermometers, etc).  Do you think it could be putting too much stress on my video card memory?

0 Kudos
Message 3 of 6
(3,334 Views)

Hi Polina,

Since you have already tried disabling smooth updates and have also played with hardware acceleration, the only other thing I can think of is to make sure you have the latest video card driver.

LabVIEW has to redraw the front panel when any front panel user activity is detected. You can try choosing the synchronous display option for your control/indicator. Beware that this will make the block diagram wait for the front panel control/indicator to update so it will make your program slower.

Ankita

0 Kudos
Message 4 of 6
(3,317 Views)

I have updated my video card driver, but the problem remains.  I figured out that if i have a wait function in my program for 500ms, the lagging goes away.  However, if I drop this wait function to any shorter delay, the problem comes back.  For now, I will just keep the wait function at 500ms unless someone thinks of something else I can try.

I have not tried enabling synchronized displaying because of the amount of objects I would have to enable it for.  Right-clicking -> advanced -> synchonous display for each of over 100 front-panel indicators and controls seems tedious.  Is there any way I can select everything at once and change the option?

0 Kudos
Message 5 of 6
(3,302 Views)
Hi Cory,
 
There isn't a way to select and change all of those elements at one time. Maybe if you could post your code, other members could take a look at it and make recommendations for improving efficiency. Thanks!
 
Regards,
Chris J
0 Kudos
Message 6 of 6
(3,284 Views)