Occurrence Functions

Use the Occurrence functions located on the Functions»Advanced»Synchronization»Occurrences palette to control separate, synchronous activities. In particular, use these functions when you want one VI or part of a block diagram to wait until another VI or part of a block diagram finishes a task without forcing LabVIEW to poll.

Click the icons for VI descriptions.

Generate Occurrence Wait on Occurrence Set Occurrence

Generate Occurrence
Set Occurrence
Wait On Occurrence

You can perform the same task using global variables, with one loop polling the value of the global until its value changes. However, global variables use more overhead, because the loop that waits uses execution time. With occurrences, the second loop can becomes idle and does not use processor time. When the first loop sets the occurrence, LabVIEW activates the second loop and any other block diagrams that wait for the specified occurrence.