Front Panel Locking Behavior for Event Handling

By default, LabVIEW locks the front panel of a VI that generates an event. This behavior ensures that LabVIEW handles events predictably and prevents conflicts between events.

Front panel locking while LabVIEW is handling an event behaves as follows:

  • LabVIEW locks the front panel of a VI when an event generated from an object in that front panel enters the event queue.
  • While the front panel is locked, LabVIEW places front panel interactions in a buffer.
  • The front panel remains locked until all Event structures finish handling that event.
  • LabVIEW then handles further interactions when the front panel becomes unlocked.

For example, consider an event case that launches an application that requires text entry from the user. The user might begin typing before the application appears on the front panel.

  • If the front panel is locked, once the application launches and appears on the front panel, it processes the key presses in the order in which they occurred.
  • If the front panel is unlocked, the key presses might be processed elsewhere on the front panel. This is because LabVIEW does not queue their execution to depend on completion of the event case.

Front panel locking for event handling does not affect certain actions, such as the following:

  • Moving the window
  • Interacting with scroll bars
  • Clicking the Abort Execution button ()
Note If an event case that locks the front panel takes a significant amount of time to execute, consider using the Set Busy function or displaying a dialog box to notify the user that the front panel is locked.
Notice If no Event structure executes promptly to handle an event and front panel locking is enabled, the user interface of the VI might become unresponsive. If this occurs, click the Abort Execution button () to stop the VI. Alternatively, you can disable front panel locking for user interface–based notify events.

Disabling Front Panel Locking for Notify Events

You can disable front panel locking for notify events from the user interface. Use this functionality to prevent the user interface of your VI from appearing frozen if the event handling takes a long time to complete.

When an event from an unlocked front panel enters a queue, all controls, including the one that generated the event, can still generate events.

When multiple events occur and front panel locking is disabled, LabVIEW does not wait for the front panel to unlock before handling them.

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

To disable front panel locking for notify events, complete the following steps.

  1. Right-click the Event structure border and select Edit Events Handled by This Case.
    The Edit Events dialog box appears.
  2. In the Events area, select the notify events to unlock.
    Tip Notify events are shown with a green arrow. Filter events are shown with a red arrow.
  3. Remove the checkmark from Lock panel (defer processing of user actions) until the event case completes.