Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Events Functions (Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Owning Palette: Dialog & User Interface VIs and Functions

Use the Event functions to register events dynamically and to create user events.

Examples

Palette ObjectDescription
Create User EventReturns a reference to a user event. LabVIEW uses the user event data type you wire to determine the event name and data type of the event. Wire the user event out output to a Register For Events function to register for the event. Wire the user event out output to a Generate User Event function to send the event and associated data to all Event structures registered for the event.
Destroy User EventReleases a user event reference by destroying its associated user event refnum. Any Event structures registered for this user event no longer receive the event.
Event StructureHas 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. 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.
Generate User EventBroadcasts the user event you wire to the user event input and sends the user event and associated event data to each Event structure registered to handle the event.
Register For EventsDynamically registers events. The events for which you can register depend on the type of the reference you wire to each event source input. Wire the event reg refnum out output to an Event structure or to another Register For Events function.
Unregister For EventsUnregisters all events associated with an event registration refnum.

Examples

Refer to the following VIs for examples of using the Events Functions:

  • labview\examples\general\dynamicevents.llb
  • labview\examples\general\uievents.llb

Resources


 

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