Example Code

Tank Fill or Empty Example

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

Description

Overview

This code is an example of how to fill or empty a tank using a while loop, shift registers, and case structures.

 

Description

This either fills or emptys a tank based on user input. It's meant as an example to learn how to implement shift registers in a while loop in a functional global variable style.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Configure the controls on the front panel
  2. Run the VI
  3. Change the front panel controls and view the changes in the fill level

 

Additional Information or References

 

Front Panel

1.PNG

 

VI Snippet

2.png

 

Helpful Links

 

Shift register help

Alternate tank fill example

 

 

 

**This document has been updated to mee the current required format for the NI Code Exchange. For more dtails visit this discussion thread.**

 

 

Sincerely,

Chris G in AE

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

Comments
Todd S.
NI Employee (retired)
on

Thanks Chris.  Please be sure to include LabVIEW In the tag field so it shows up on the main page of ni.com/community.

Todd S.
LabVIEW Community Manager
National Instruments