To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI exemplifies how to make a one-digit counter that counts up and down based on the value of a Boolean control.
Description
This VI uses a shift register to store the value of the counter. This could be really useful to keep track of the number of iterations or events in a code. For the time being is counting up to ten, however it could be modified to count to higher values.
The code includes a “Wait (ms)” function to add time control to the count vi, however, it could be modified depending on the user needs. This could help not only to keep track of the number of iterations, if not also to control the time between them as well.
Requirements
LabVIEW Base Development System.
Steps to Implement or Execute Code
1. Open the attached VI "Up-Down Counter LV 2012 NI - Verified.vi".
2. Run the VI.
3. Change the Value of the boolean control depending if you want it to count up or down.
Additional Information or References
**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.
password
What kind of example is this? The code is locked by password!