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. |
Add to the block diagram | Find on the palette |
occurrence is the occurrence refnum that links Wait on Occurrence and Set Occurrence. |
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.
Refer to the Simple Occurrence VI in the labview\examples\Synchronization\Occurrence directory for an example of using the Generate Occurrence function.