Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Occurrences Functions

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Owning Palette: Synchronization VIs and Functions

Use the Occurrences functions to control separate, synchronous activities. Examples

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.

You can perform the same task using global variables, with one loop polling the global variable until its value changes. However, global variables use more overhead because the loop that waits uses execution time. With occurrences, the second loop 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.

Palette ObjectDescription
Generate OccurrenceCreates an occurrence that you can pass to the Wait on Occurrence and Set Occurrence functions.
Set OccurrenceTriggers the specified occurrence. All nodes that are waiting for this occurrence stop waiting.
Wait on OccurrenceWaits for the Set Occurrence function to set or trigger the given occurrence.

Examples

Refer to the following VIs for examples of using the Occurrences Functions:

  • labview\examples\general\occurrence.llb\Generate Occurrence.vi

     

  • labview\examples\general\occurrence.llb\Continuously Generate Occurrences.vi

     


Resources


 

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