Example Code

Two Different Flowrates and Resulting Concentration Example 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

If we have two different flow rates and a known concentration we want to achieve, how long should each valve be open to get the right concentration?

 

Description

To know how long we need each valve open for, we need to know the flowrates of each valve (In the same units!) and the desired concentration (e.g. %50 fluid A). The formula in this VI uses those 3 pieces of information to find out the ratio of time for each valve and if you input the total time you want to run the valves, will give the amount of time (in seconds) for each valve!

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Open the VI
  2. Input the flow rates and desired concentration
  3. Optional Input: The total time of mixing
  4. Run the VI
  5. Observe the resulting ratio for fluid A
  6. Observe the resulting time for each fluid to run if you input a time target

Additional Images
Block Diagram

main.png

 **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.

Contributors