From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Simple While Loop Counter Using LabVIEW

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 VI is an example of how you can implement a counter using a while loop.

 
Description
The count value will either increase or decreases (based on selected enum control) its value each loop iteration. The count value will continue to increase or decreases unless the user resets the count, changes count direction, or stop the VI.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the example
  2. Open the example in LabVIEW
  3. Examine the block diagram
  4. Run the example VI

 

Additional Information or References
VI Block Diagram

1.png 

 

 

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

 

Matthew R.
Field Applications & Systems Engineer
National Instruments

Certified-LabVIEW-Developer_rgb.jpg

Certified-TestStand-Developer_rgb.jpg


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