Reads multiple event registration refnums for an Event Messenger channel and makes the refnums available to one or more Event structures.

You can drop this endpoint on the block diagram by right-clicking an Event Messenger channel terminal or wire and selecting Create»Channel Reader»Event Messenger»Read Multiple Event Registration.


icon

Inputs/Outputs

  • cqueuern.png channel

    channel is the channel wire that connects this endpoint to a writer endpoint.

  • cu16.png number of event structures

    number of event structures specifies the number of Event structures that read event registration information from this endpoint. number of event structures must match the number of Event structures that read from this endpoint to avoid undefined errors.

  • i1deventregrn.png event registration refnums

    event registration refnums returns an array of event registration refnums for an Event Messenger channel.

    The number of elements in the array equals number of event structures. Each refnum in the array is a unique refnum intended for one specific Event structure that reads from this endpoint, and each Event structure triggers on all of the events from the channel.

  • Unlike the reader endpoints of other channel templates, this reader endpoint must be placed outside the While Loop and can execute only once.

    Use one Event structure to handle events whenever possible. Use the Build Array or Bundle functions to combine multiple event registration refnums for a single Event structure.

    To allow multiple Event structures to read event registration refnums from this endpoint, you must use the Index Array function to index the event registration refnums and wire each refnum to the dynamic event terminal of each Event structure so that each Event structure receives its own copy of the events from the channel.

    Do not fork the event registration refnums to multiple Event structures. Doing so creates undefined behavior that may result in race conditions or deadlocks in your application.

    Related Information

    Write

    Caveats and Recommendations when Using Events in LabVIEW

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Channels\Event Messenger\Channel - Event Messenger.lvproj