Example Code

Resetting the Iteration Count for a Specific Case

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: Counting the iterations required on the user condition.


Description:

This VI demonstrates a question that was brought up in the NI discussion forums. When ran, the VI will wait for a conditional. Once the conditional is met (in this case, a boolean control) a different case will be used in the case structure. Inside of the case structure, the iteration count will start at 0 and continue for a user set amount of iterations. Once the iteration count is met, the boolean resets to false and the iteration count is reset to 0.


 

Requirements: LabVIEW 2012 (or compatible). Hardware: none.


Steps to Implement or Execute Code:

1. Run the VI.
2. Switch on conditional control.
3. Look on the String indicator.
4. Change Iterations to run.


Additional Information or References:

 

Resetting the Iteration Count for a Specific Case FP.png

 

Resetting the Iteration Count for a Specific Case sn.png

 

This example is in reference to this discussion forum


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

 

Chris Van Horn
Applications Engineer

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