Table Of Contents

Generate Occurrence (G Dataflow)

Last Modified: November 4, 2020

Generates an occurrence that you can pass to Wait on Occurrence and Trigger Occurrence.



A reference to an occurrence.

When to Use Occurrences

Occurrences are the most fundamental part of all synchronization mechanisms. You should use occurrences only when no other synchronization method is sufficient. For most operations, you can use the Notifier nodes in place of Occurrence nodes.

Occurrence nodes control separate, synchronous activities without polling. For example, use these nodes when you want one VI or subdiagram to wait until another VI or subdiagram finishes a task without using the processor resources that polling consumes while waiting. Occurrences do not add processor overhead because the waiting VIs or subdiagrams become idle while they wait. When the first VI or subdiagram triggers the occurrence, it also activates the VIs or subdiagrams that wait for the specified occurrence.

Occurrence Behavior in Reentrant VIs

Each Generate Occurrence node represents a single, unique occurrence unless you use it within a reentrant VI. When a VI is running, Generate Occurrence produces the same value every time it executes. For example, if you add a Generate Occurrence node inside of a loop, the node produces the same value for every iteration of the loop. However, if you add a Generate Occurrence node to a reentrant VI, the node produces a different value for each caller because the callers are different copies of the reentrant VI.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application

Recently Viewed Topics