LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

non-responsive user interface

I have a event structure that waits on various front panel controls. In some of the event cases a method or property of an Active X control is called. In this case the front panel becomes unresponsive. The other event cases work fine.

John
0 Kudos
Message 1 of 4
(2,957 Views)
Look at the event structure as an interrupt handler. Only do the necessary task to understand what should be handled and then dismiss the task to some parallel running part of your program. So don't execute all your calls from the event structure but put the real command into a queue and read that queue in a parallel running part of the program. Your task will then be executed in parallel to the event structure and your user interface should stay responsive.
greetings from the Netherlands
0 Kudos
Message 2 of 4
(2,957 Views)
But shouldn't the user interface return at some point? It hangs forever, while the program execution goes on as necessary ( in a while loop ). This is what is strange to me.
0 Kudos
Message 3 of 4
(2,957 Views)
rammer,

Right-click on the event structure drop down box and uncheck the last line entitled 'Lock Panel Until Handler Completes'. This should solve this issue. Here is a quote from the LabVIEW help:

"Locking Front Panels
Right-click the Event structure border and select Lock Panel Until Handler Completes from the shortcut menu to lock the front panel when an event handled by that event case occurs. This menu option is enabled by default, but you can enable or disable the option for each event case. LabVIEW queues mouse clicks, key presses, and other user actions on that front panel until the event case completes, then processes pending events in the order received.

You cannot disable this option for filter events, because Lab
VIEW cannot finish processing a filter event until its case completes. Allowing LabVIEW to process other events while it is handling a filter event could cause events to occur out of order.

LabVIEW does not lock the front panel during a Timeout case, even if the same event case locks the user interface for other events it is configured to handle."

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 4
(2,957 Views)