Saturday, September 25, 2010

Temperature Control VI

Summary: In this exercise, the objective is to use the Case structure in a VI. Complete the following steps to build a VI that allows the user to analyze data for limit testing and to determine the highest value.

EXERCISE 1

1.A) Front Panel

  1. Open the Temperature Running Average VI.
  2. Modify the front panel as shown in Figure 1.
    Figure 1
    Figure 1 (tempcontrol.png)
    1. Place a horizontal smooth box, located on the Controls>>All Controls>>Decorations palette, on the front panel. This decoration visibly groups the Analysisitems.
    2. Create a duplicate of the Power Boolean switch. Label the new switch ANALYSIS. Right-click the switch and select Mechanical Action>>Switch When Pressed from the shortcut menu.
    3. Place a numeric control, located on the Controls>>Numeric Controls palette, on the front panel. Label the control High Limit.
    4. Place a round LED, located on the Controls>>LEDs palette, on the front panel. Label the indicator Warning.
    5. Place a numeric indicator from the Controls>>Numeric Indicators palette, on the front panel. Label the indicator High Value.
    6. Right-click the chart display and select Visible Items>>Digital Display from the shortcut menu to display the digital values.
  3. Select File>>Save As to save the VI as Temperature Control.vi in the C:\Exercises\LabVIEW Basics I directory.

1.B) Block Diagram

  1. Modify the block diagram as shown Figure 2. Enlarge the While Loop to create space for the new items.
    Figure 2
    Figure 2 (tempcontrolbd.png)
    1. case.png Place the Case structure, located on the Functions>>Execution Control palette, on the block diagram. Wire the Analysis control to theselector terminal. Click the decrement or increment button to select the True case.
    2. greaticon.png Place two Greater? functions, located on the Functions>>Arithmetic & Comparison>>Express Comparison palette, on the block diagram. This function returns True if the temperature exceeds High Limit. Otherwise, the function returns False.
    3. selecttherm.png Place the Select function, located on the Functions>>Arithmetic & Comparison>>Express Comparison palette, on the block diagram. This function returns the greater of the two input values.
    4. Wire the True case as shown in Figure 2.
    5. Click the decrement or increment button to select the False case.
  2. Complete the False case of the Case Structure, shown in Figure 3.
    Figure 3
    Figure 3 (tempcontrolfalse.png)
    1. Right-click the tunnel that connects to the Warning Indicator and select Create>>Constant. Use the Operating tool to change the Boolean constant toFalse.
    2. Right-click the tunnel that connects to the High Value indicator and select Create>>Constant. Enter -99999 for the value of the constant.
  3. Save the VI. You will use this VI later in the course.

1.C) Run the VI

  1. Display the front panel, type 80 in High Limit, and run the VI. If ANALYSIS is off, the VI turns off the Warning LED and displays a value of -99999 for High Value. IfANALYSIS is on, the VI turns on the Warning LED when the temperature is above High Limit and displays the current High Value.
  2. Close the VI.

Content actions

GIVE FEEDBACK:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers

Followers