<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="None">
  <name>Temperature Control VI</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2004/06/24 09:41:17 GMT-5</md:created>
  <md:revised>2004/07/16 15:20:12.376 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="mshiralkar05">
      <md:firstname>Malan</md:firstname>
      
      <md:surname>Shiralkar</md:surname>
      <md:email>mshiralkar05@hotmail.com</md:email>
    </md:maintainer>
    <md:maintainer id="harika">
      <md:firstname>Harika</md:firstname>
      
      <md:surname>Basana</md:surname>
      <md:email>ilsai@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>National Instruments</md:keyword>
    <md:keyword>LabVIEW</md:keyword>
    <md:keyword>VI</md:keyword>
    <md:keyword>exercise</md:keyword>
  </md:keywordlist>

  <md:abstract>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.
</md:abstract>
</metadata>
  <!--When CNXML 0.6 comes out, this module will need to be revised to
  include para in the items indicated-->
  <content>
    <exercise id="e1">
      <problem>
	<section id="s1">
	  <name>Front Panel</name>
	  <list id="s1l1" type="enumerated">
	    <item>
	      Open the <cnxn document="m12235">Temperature Running Average
		VI</cnxn>.
	    </item>
	    <item>
	      Modify the front panel as shown in <cnxn target="s1l1f1"/>.
	      <figure id="s1l1f1">
		<media type="image/png" src="tempcontrol.png"/>
	      </figure>
	      <list id="s1l1l1" type="enumerated">
		<item>
		  Place a horizontal smooth box, located on the
		  <code>Controls&gt;&gt;All Controls&gt;&gt;Decorations</code>
		  palette, on the front panel. This decoration visibly
		  groups the <code>Analysis</code> items.
		</item>
		<item>
		  Create a duplicate of the <code>Power</code> Boolean
		  switch. Label the new switch
		  <code>ANALYSIS</code>. Right-click the switch and select
		  <code>Mechanical Action&gt;&gt;Switch When Pressed</code> from
		  the shortcut menu.
		</item>
		<item>
		  Place a numeric control, located on the
		  <code>Controls&gt;&gt;Numeric Controls</code> palette, on the
		  front panel. Label the control <code>High Limit</code>.
		</item>
		<item>
		  Place a round LED, located on the
		  <code>Controls&gt;&gt;LEDs</code> palette, on the front
		  panel. Label the indicator <code>Warning</code>.
		</item>
		<item>
		  Place a numeric indicator from the
		  <code>Controls&gt;&gt;Numeric Indicators</code> palette, on
		  the front panel. Label the indicator <code>High
		    Value</code>.
		</item>
		<item>
		  Right-click the chart display and select <code>Visible
		    Items&gt;&gt;Digital Display</code> from the shortcut menu to
		  display the digital values.
		</item>
	      </list>
	    </item>
	    <item>
	      Select <code>File&gt;&gt;Save As</code> to save the VI as
	      <code>Temperature Control.vi</code> in the
	      <code>C:\Exercises\LabVIEW Basics I</code> directory.
	    </item>
	  </list>
	</section>
	<section id="s2">
	  <name>Block Diagram</name>
	  <list id="s2l1" type="enumerated">
	    <item>
	      Modify the block diagram as shown <cnxn target="s2l1f1"/>. Enlarge the <code>While Loop</code> to
	      create space for the new items.
	      <figure id="s2l1f1">
		<media type="image/png" src="tempcontrolbd.png"/>
	      </figure>
	      <list id="s2l1l1" type="enumerated">
		<item>
		    <media type="image/png" src="case.png"/>
		  Place the <code>Case</code> structure,
		  located on the <code>Functions&gt;&gt;Execution Control</code>
		  palette, on the block diagram. Wire the
		  <code>Analysis</code> control to the
		  <code>selector</code> terminal. Click the
		  <code>decrement</code> or <code>increment</code> button
		  to select the <code>True</code> case.
		</item>
		<item>
		    <media type="image/png" src="greaticon.png"/>
		  Place two <code>Greater?</code>
		  functions, located on the <code>Functions&gt;&gt;Arithmetic
		    &amp; Comparison&gt;&gt;Express Comparison</code> palette, on
		  the block diagram. This function returns
		  <code>True</code> if the temperature exceeds <code>High
		    Limit</code>. Otherwise, the function returns
		  <code>False</code>.
		</item>
		<item>
		    <media type="image/png" src="selecttherm.png"/>
		  Place the <code>Select</code>
		  function, located on the <code>Functions&gt;&gt;Arithmetic
		  &amp; Comparison&gt;&gt;Express Comparison</code> palette,
		  on the block diagram. This function returns the
		  greater of the two input values.
		</item>
		<item>
		  Wire the True case as shown in <cnxn target="s2l1f1"/>.
		</item>
		<item>
		  Click the <code>decrement</code> or
		  <code>increment</code> button to select the
		  <code>False</code> case.
		</item>
	      </list>
	    </item>
	    <item>
	      Complete the <code>False</code> case of the <code>Case
		Structure</code>, shown in <cnxn target="s2l1f2"/>.
	      <figure id="s2l1f2">
		<media type="image/png" src="tempcontrolfalse.png"/>
	      </figure>
	      <list id="s2l1l2" type="enumerated">
		<item>
		  Right-click the tunnel that connects to the
		  <code>Warning Indicator</code> and select
		  <code>Create&gt;&gt;Constant</code>. Use the
		  <code>Operating</code> tool to change the Boolean
		  constant to <code>False</code>.
		</item>
		<item>
		  Right-click the tunnel that connects to the <code>High
		    Value</code> indicator and select
		  <code>Create&gt;&gt;Constant</code>. Enter <code>-99999</code>
		  for the value of the constant.
		</item>
	      </list>
	    </item>
	    <item>
	      Save the VI. You will use this VI later in the course.
	    </item>
	  </list>
	</section>
	<section id="s3">
	  <name>Run the VI</name>
	  <list id="s3l1" type="enumerated">
	    <item><!--needs para-->
	      <!--para-->
	      Display the front panel, type <code>80</code> in
	      <code>High Limit</code>, and run the VI.
	      <!--para-->
	      If <code>ANALYSIS</code> is off, the VI turns off the
	      <code>Warning</code> LED and displays a value of
	      <code>-99999</code> for <code>High Value</code>.
	      <!--para-->

	      If <code>ANALYSIS</code> is on, the VI turns on the
	      <code>Warning</code> LED when the temperature is above
	      <code>High Limit</code> and displays the current
	      <code>High Value</code>.
	    </item>
	    <item>
	      Close the VI.
	    </item>
	  </list>
	</section>
      </problem>
    </exercise>

  </content>
  
</document>
