Generate Occurrence

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

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

Generate Occurrence Details

Ordinarily, only one Generate Occurrence node is connected to any set of Wait on Occurrence and Set Occurrence functions. You can connect 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, you can think of the Generate Occurrence function as a constant. When a VI is running, every time a Generate Occurrence function executes, the node produces the same value. For example, if you place a Generate Occurrence function inside of a loop, the value produced by Generate Occurrence is the same for every iteration of the loop. If you place a Generate Occurrence function on the block diagram of a reentrant VI, Generate Occurrence produces a different value for each caller.