To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Coding that exemplifies how to perform a synchronized shutdown for loops in parallel.
Description
There are many times where I write an application that contains two or more loops running in parallel. To synchronize shutdown of these loops in the past, I have wired an execution flow enforcing wire from the loop to my main application finalization code. With several loops, this can become messy on the block diagram. I came up with a method that uses Rendezvous vi’s to synchronize this shutdown in a cleaner manner. The attached code is an application framework or “shell” that I use for many applications that require multiple loops executing in parallel. The attached VI does nearly nothing, other than to demonstrate the mechanics of the shutdown method I am showing.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Run the VI
2. When desired, press the Stop button
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.