LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I stop the front panel from locking while responding to a dynamic event?

I'm attempting to create a VI in which the user can click a button to bring up a dialog box where the main VI remains active (e.g., continues to display new data generated in loops independent of the event-handling loop and responds to user input handled by separate event-handling loops) while the user interacts with the dialog box. Due to some complications (described below), I need to register the event which spawns the dialog box dynamically. However, responding to a dynamic events seems to invariably lock the front panel. I've included a small VI which demonstrates this problem. Is there any way to keep the front panel active while responding to a dynamic event?

Jason



Grundgy details: I'm writing a data acquisition application for a large, variable number of identical sensors. Rather than manually copy the GUI associated with each sensor, I've created an array of clusters, where a single cluster is the GUI for a single sensor. There is no static event corresponding to the element of an array, but I can get a reference to a generic array element and thus can use it to register a dynamic event. However, the GUIs need to continue to respond while I handle to dialog box spawned by a button press. I've put the event handling for dialog-box spawning and other user interactions in separate event-handling loops. As far as I can tell from the documentation, its OK that I'm registering the same event twice; it should merely be processed separately by both event-handling loops. Everything works fine, except that the front panel seizes up until the dialog-box-generating event returns.
Jason Rolfe
0 Kudos
Message 1 of 3
(2,914 Views)
Hi,

I can't open the vi (using LV 7.0), but the front panel does not lock while
handling a dynamic event case in 7.0.

The problem might be that the dialogs are modal. Make the dialogs floating
(or normal), and the main panel remain active.

Regards,

Wiebe.


"Rolfe" wrote in message
news:506500000008000000C8E00000-1079395200000@exchange.ni.com...
> I'm attempting to create a VI in which the user can click a button to
> bring up a dialog box where the main VI remains active (e.g.,
> continues to display new data generated in loops independent of the
> event-handling loop and responds to user input handled by separate
> event-handling loops) while the user interacts with the dialog box.
> Due to some complications (described below), I need to register the
> event which spawns the dialog box dynamically. However, responding to
> a dynamic events seems to invariably lock the front panel. I've
> included a small VI which demonstrates this problem. Is there any way
> to keep the front panel active while responding to a dynamic event?
>
> Jason
>
>
> Grundgy details: I'm writing a data acquisition application for a
> large, variable number of identical sensors. Rather than manually
> copy the GUI associated with each sensor, I've created an array of
> clusters, where a single cluster is the GUI for a single sensor.
> There is no static event corresponding to the element of an array, but
> I can get a reference to a generic array element and thus can use it
> to register a dynamic event. However, the GUIs need to continue to
> respond while I handle to dialog box spawned by a button press. I've
> put the event handling for dialog-box spawning and other user
> interactions in separate event-handling loops. As far as I can tell
> from the documentation, its OK that I'm registering the same event
> twice; it should merely be processed separately by both event-handling
> loops. Everything works fine, except that the front panel seizes up
> until the dialog-box-generating event returns.



[Attachment Dynamic Event Panel Lock.vi, see below]
0 Kudos
Message 2 of 3
(2,914 Views)
I did not think that dynamic events locked the front panel was true until I ran your code. You might consider using a producer consumer with events instead. This greatly extends the power and flexibitily of events.
Message 3 of 3
(2,914 Views)