Assignment
Modify your temperature monitoring VI so that it runs continuously, allow the user 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.
Download
Working version of VI (no block diagram access)
Textbook sections
For loops (pp. 80-81)
While loops (pp. 39-41)
Wait Until Next ms Multiple function (p. 443)
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 preferred.
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)