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

Create User Event Function

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

Owning Palette: Events Functions

Requires: Full Development System

Returns 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.

Details  Examples

user event data type is a cluster of elements or an individual element whose data type and label define the data type and name of the user event.
Note  LabVIEW uses owned labels to identify data the user event carries, so label each element of the input with a descriptive owned label.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
user event out returns the strictly typed user event refnum.
error out contains error information. This output provides standard error out functionality.

Create User Event Details

The user event data type is a cluster of elements or an individual element. If you wire a cluster to the user event data type input, LabVIEW uses the type name of the cluster as the name of the user event. The names and data types of the cluster elements define the event data the user event carries. If you wire an individual data element to the user event data type input, LabVIEW uses the type name of the element as the name of the user event and as the name of the single data item it carries, which is the same data type as the element. The actual value you wire to the function is not important because LabVIEW uses only the name and data type to define the user event. The user event out output is a strictly typed refnum that includes the user event name and event data type.

You can wire the user event out output to the Generate User Event function and the Destroy User Event function. Wire the user event out output to the Register For Events function to dynamically register for notification when the user event occurs. When you handle a user event in an Event structure, the name of the user event appears in the event selector label at the top of the Event structure, and the user event data fields appear in the Event Data Node inside the left border of the event case.

Note  If you obtain a user event reference in one application instances, you cannot use that user event reference in another application instance. If you attempt to use a user event reference in another application instance, LabVIEW returns error 1500.

Examples

Refer to the following VIs for examples of using the Create User Event function:

  • Programmatically Fire Events VI: labview\examples\general\dynamicevents.llb
  • Dynamically Monitor VI's VI: labview\examples\general\dynamicevents.llb

 

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