<?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>Timed Temperature VI</name>
  <metadata>
  <md:version>**new**</md:version>
  <md:created>2004/06/23 11:57:43.401 GMT-5</md:created>
  <md:revised>2004/07/14 09:17:36.154 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="harika">
      <md:firstname>Harika</md:firstname>
      
      <md:surname>Basana</md:surname>
      <md:email>ilsai@rice.edu</md:email>
    </md:maintainer>
    <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="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract>To read a temperature once every second for one minute.</md:abstract>
</metadata>

  <content>
    <exercise id="e1">
      <problem>
	<para id="delete_me">
	  Complete the following steps to build a VI that uses the
	  Thermometer VI to read a temperature once every second for a
	  duration of one minute.
	</para>
	
	<section>
	  <name>Front Panel </name>
	  
	  <list id="santa1" type="enumerated">
	    <item> Open a blank VI and build the front panel shown in
	      <cnxn target="fig2"/>.
	      <figure id="fig2">
		<media type="image/png" src="timedtempfp.png"/>
	      </figure>
	      
	      <list id="santa11" type="enumerated">

		<item>
		  Place a <code>thermometer</code>, located on the
		  <code>Controls&gt;&gt;Numeric Indicators </code> palette, on
		  the front panel. This provides a visual indication of
		  the temperature reading. 
		</item>

		<item> 
		  Place a <code>numeric indicator</code>, located on the
		  <code> Controls&gt;&gt;Numeric Indicators </code> palette, on
		  the front panel. Label this indicator <code>Seconds
		    Elapsed</code>. Right-click the indicator and select
		  <code> Representation&gt;&gt;I32 </code> from the shortcut
		  menu.
		</item>
	      </list>
	    </item>
	  </list>
	</section>

	<section>
	  <name> Block Diagram </name>

	  <list id="santa2" type="enumerated">
	    <item> Build the block diagram shown in <cnxn target="fig1"/>.
	      <figure id="fig1">
		<media type="image/png" src="timedtempbd.png"/>
	      </figure>
	      <list id="smnfl" type="named-item">
		
		<item> 
		  <media type="image/png" src="forloop.png"/> 
		  Place a <code>For Loop</code>, located on the <code>
		    Functions&gt;&gt;All Functions&gt;&gt;Structures </code> palette, on
		  the block diagram. Right-click the <code>Loop
		    Count</code> terminal in the upper left corner of the
		  <code>For Loop</code> and select <code>Create
		    Constant</code> from the shortcut menu. Type
		  <code>60</code> in the constant to set the <code>For
		    Loop</code> to repeat 60 times.
		</item>

		<item> 
		  <media type="image/png" src="tempicon.png"/>  
		  Place the <code>Thermometer</code> VI on the block
		  diagram. Select <code>Functions&gt;&gt;All Functions&gt;&gt;Select a
		    VI</code> and navigate to <code>C:\Exercises\LabVIEW
		    Basics I\Thermometer.vi</code>to place the VI. This VI
		  reads the temperature from the DAQ device. Right-click
		  the <code>Temp Scale</code> input and select
		  <code>Create&gt;&gt;Constant</code> from the shortcut
		  menu. Use a <code>False</code> constant for Fahrenheit
		  or a <code>True</code> constant for Celsius.  <note> If
		    you do not have a DAQ device with a temperature sensor
		    on Channel 0, use the <code>(Demo) Thermometer</code> VI
		    instead.
		  </note>
		</item> 

		<item> 
		  <media type="image/png" src="waitms.png"/>
		  Place the <code>Wait Until Next ms Multiple</code>
		  function, located on the <code>Functions&gt;&gt;All
		    Functions&gt;&gt;Time &amp; Dialog</code> palette, on the
		  block diagram. Right-click the input and select
		  <code>Create&gt;&gt;Constant</code> from the shortcut
		  menu. Enter a value of <code>1000</code> to set the wait
		  to every second.  </item>

		<item> 
		  <media type="image/png" src="incremicon.png"/>
		  Place the <code>Increment</code> function, located
		  on the <code>Functions&gt;&gt;Arithmetic &amp;
		    Comparison&gt;&gt;Express Numeric </code> palette, on the
		  block diagram. This function adds one to the
		  iteration terminal output.
		</item>
	      </list>
	    </item>

	    <item> 	
	      Save this VI as <code>Timed Temperature.vi</code> in the
	      <code>C:\Exercises\LabVIEW Basics I</code> directory.
	    </item>

	    <item> 
	      Run the VI. The first reading might take longer than one
	      second to retrieve if the computer needs to configure the
	      DAQ device.  
	    </item>

	    <item> 
	      If time permits, complete the following optional and
	      challenge steps, otherwise close the VI.  
	    </item>
	  </list>
	</section>

	<section>
	  <name> Optional </name>
	  <list id="santa3" type="enumerated">

	    <item> 
	      Build a VI that generates random numbers in a
	      <code>While Loop</code> and stops when you click a stop
	      button on the front panel.
	    </item>

	    <item> 
	      Save the VI as <code>General While Loop.vi</code> in the
	      <code>C:\Exercises\LabVIEW Basics I</code> directory.
	    </item>
	  </list>
	</section>

	<section>
	  <name> Challenge </name>
	  <list id="santa4" type="enumerated">

	    <item> 
	      Modify the <code>General While Loop</code> VI to stop when
	      the stop button is clicked or when the <code>While
		Loop</code> reaches a number of iterations specified by a
	      front panel control.
	    </item>

	    <item> 
	      Select <code>File&gt;&gt;Save As</code> to save the VI as
	      <code>Combo While-For Loop.vi</code> in the
	      <code>C:\Exercises\LabVIEW Basics I</code> directory.
	    </item>
	  </list>
	</section>
      </problem>
    </exercise>
  </content>
</document>
