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

Generate Occurrence Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Occurrences Functions

Requires: Base Development System

Generates an occurrence that you can pass to the Wait on Occurrence and Set Occurrence functions.

Note  National Instruments encourages you to use the Notifier Operations functions in place of occurrences for most operations.

Details  Example

occurrence is the occurrence refnum that links Wait on Occurrence and Set Occurrence.

Generate Occurrence Details

Ordinarily, only one Generate Occurrence function is wired to any set of Wait on Occurrence and Set Occurrence functions. You can wire a Generate Occurrence function to any number of Wait on Occurrence and Set Occurrence functions. You do not have to have the same number of Wait on Occurrence and Set Occurrence functions.

Unlike other Synchronization VIs, each Generate Occurrence function on a block diagram represents a single, unique occurrence. In this way, the Generate Occurrence function is similar to a constant. When a VI is running, every time a Generate Occurrence function executes, the function produces the same value. For example, if you place a Generate Occurrence function inside of a loop, the value produced by the Generate Occurrence function is the same for every iteration of the loop. If you place a Generate Occurrence function on the block diagram of a reentrant VI, the Generate Occurrence function produces a different value for each caller.

Example

Refer to the Simple Occurrence VI in the labview\examples\Synchronization\Occurrence directory for an example of using the Generate Occurrence function.


 

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