Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Event Structure

LabVIEW 2012 Help

Edition Date: June 2012

Part Number: 371361J-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Structures

Requires: Base Package

Has one or more subdiagrams, or event cases, exactly one of which executes when the structure executes. The Event structure waits until an event happens, then executes the appropriate case to handle that event. The Time output responds to the Control event you use. Right-click the structure border to add new event cases and configure which events to handle. Wire a value to the Timeout terminal at the top left of the Event structure to specify the number of milliseconds the Event structure should wait for an event to occur. The default is –1, indicating never to time out.

Before you configure events to be handled by the Event structure, review the caveats and recommendations for using events in LabVIEW.

The Event Data Node is attached to the inside left and right borders of each event case. The node identifies the data LabVIEW returns when an event occurs. The node displays data that is different in each case of the Event structure depending on which event(s) you configure that case to handle. If you configure a single case to handle multiple events, only the data that is common to all handled event types is available.

When you place an Event structure on the block diagram, the Timeout event case is the default case.

You cannot replace the Event Structure with another structure.

Note  When you place an Event structure on the block diagram from the Events palette, the structure displays the Event Dynamic Registration terminals. When you place an Event structure on the block diagram from the Structures palette, the structure does not display the terminals. To display the Event Dynamic Registration terminals, right-click the Event structure and select Show Dynamic Event Terminals from the shortcut menu.

(Real-Time Module) You cannot use this structure in VIs that run on RT targets.


Refer to the following VIs for examples of using the Event Structure:

  • New Event Handler VI: labview\examples\general\uievents (Full).llb
  • Left-click Shortcut Menu VI: labview\examples\general


Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit