LabVIEW Tutorial

Assignment 3


Controlling your VI with Loops

Assignment

Modify your temperature monitoring VI so that it runs continuously, allow the use to stop the VI with a button, and allows the user to set the measurement rate with the number of measurements per second. Also, allow the user to select both a high-level and a low-level warning temperature, and these levels should be adjustable when the program is running.. A red LED should light up whenever the recorded temperature exceeds the high level, and a blue LED should light up whenever it goes below the low level.

 

Textbook Sections

Chapter 5 (pp 213-227); Chapter 11 (pp 618-620)

Programming Hints

The most common repetitive loop structures are the For Loop (which executes a defined number of times) and the While Loop (which executes until a particular condition is true). Make sure you understand how to use each. In this case, the While Loop is prefered.
You may find it tricky to set the colors of the LEDs. Simply click on the LED and change it from its Off state to its On state. Then use the coloring tool to change the color of the On state.
For timing the execution of a loop, I like to use the Wait Until Next ms Multiple function found on the Timing subpalette. You'll have to figure out how to convert the number of measurements per second into a millisecond value that tells the loop how long to wait between successive executions of the loop.

 

Front Panel (example)

Link to working version of VI (no block diagram access)

Front Panel Image 1
Front Panel Image 2

 


Back to...

LabVIEW Tutorial LabVIEW for Analytical Chemistry
Concordia College Mark Jensen's homepage
Concordia Chemistry Department

 

 

This page was last updated on July 27, 2011 .