<?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>Additional Exercises for Making Decisions in a VI</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2004/06/28 12:46:40 GMT-5</md:created>
  <md:revised>2004/07/16 15:21:56.801 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>exercise</md:keyword>
    <md:keyword>Formula Node</md:keyword>
    <md:keyword>Select</md:keyword>
    <md:keyword>Case</md:keyword>
  </md:keywordlist>

  <md:abstract/>
</metadata>

  <content>
    <exercise id="e1">
      <problem>
	<para id="e1p1">
	  Build a VI that uses the <code>Formula Node</code> to
	  calculate the following equations:
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mi>1</m:mi>
		</m:msub></m:ci>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:power/>
		  <m:ci>x</m:ci>
		  <m:cn>3</m:cn>
		</m:apply>
		<m:apply>
		  <m:power/>
		  <m:ci>x</m:ci>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:cn>5</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mi>2</m:mi>
		</m:msub></m:ci>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:ci>m</m:ci>
		  <m:ci>x</m:ci>
		</m:apply>
		<m:ci>b</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</para>
	<para id="e1p2">
	  Use only one <code>Formula Node</code> for both equations
	  and use a semicolon (<code>;</code>) after each equation in
	  the node.
	</para>
	<para id="e1p3">
	  Save the VI as <code>Equations.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="e2">
      <problem>
	<para id="e2p1">
	  Build a VI that functions like a calculator. On the front
	  panel, use numeric controls to input two numbers and a
	  numeric indicator to display the result of the operation
	  (<code>Add</code>, <code>Subtract</code>,
	  <code>Divide</code>, or <code>Multiply</code>) that the VI
	  performs on the two numbers. Use a slide control to specify
	  the operation to perform.
	</para>
	<para id="e2p2">
	  Save the VI as <code>Calculator.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="e3">
      <problem>
	<para id="e3p1">
	  Modify the <cnxn document="m12246">Square Root VI</cnxn> so the VI
	  performs all calculations and condition checking using the
	  <code>Formula Node</code>.
	</para>
	<para id="e3p2">
	  Select <code>File&gt;&gt;Save As</code> to save the VI as
	  <code>Square Root 2.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="e4">
      <problem>
	<para id="e4p1">
	  Build a VI that has two inputs, <code>Threshold</code> and
	  <code>Input Array</code>, and one output, <code>Output
	  Array</code>. <code>Output Array</code> contains values from
	  <code>Input Array</code> that are greater than
	  <code>Threshold</code>.
	</para>
	<para id="e4p2">
	  Save the VI as <code>Array Over Threshold.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
	<para id="e4p3">
	  Create another VI that generates an array of random numbers
	  between 0 and 1 and uses the <code>Array Over Threshold
	  VI</code> to output an array with the values greater than
	  0.5.
	</para>
	<para id="e4p4">
	  Save the VI as <code>Using Array Over Threshold.vi</code> in
	  the <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
  </content>
  
</document>
