Example Code

How to Stop Parallel Loops Using Occurrences

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 

Overview
This example VI shows how to stop parallel loops using Occurences

Description

Labview is the best one when working with parallel loops for multi tasking purposes. However stoping multiple loops is somehow complicated.

This is because it is not possible to create local variable to a boolean control with latch property.

There are many solutions to this; One is using occurences found on syncronization functions subpalette.

 

Requirements
LabVIEW 2012 (or Compatible)

 

Steps to Implement or Execute Code
Run the Vi

Push Stop Button

 

Additional Information or References

VI Block Diagram

 Stop using Occurrence LV_2012_NI_Verified.png

Occurence BD2.PNG

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
NI-hilator
Member
Member
on

I like this method but if one of the loops contains a long delay then the stop is also delayed, right?  How do you stop a loop with a Wait or Time Delay?  I've seen examples of this using events, but I have the base development systems which doesn't have events.

Thanks

eng.3zam
Member
Member
on

nice method to solve the problem >>> but can you explain the idea of method ?