<?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>Cluster Exercise VI</name>
  <metadata>
  <md:version>**new**</md:version>
  <md:created>2004/06/21 11:35:25.682 GMT-5</md:created>
  <md:revised>2004/06/28 15:40:05.640 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>Cluster Exercise VI</md:keyword>
  </md:keywordlist>

  <md:abstract>Create clusters on the front panel and use the Cluster functions to assemble and disassemble clusters.</md:abstract>
</metadata>
  
  <content>
    <exercise id="e1">
      <problem>
	<section id="section1">
	  <name>Front Panel</name>
	  <list id="list1" type="enumerated">
	    <item>
	      Open a blank VI and build the front panel in <cnxn target="f1"/>.
	      <figure id="f1">
		<media type="image/png" src="clusex.png"/>
	      </figure>
	      <list id="list2" type="enumerated">
		<item>     
		  Place a <code>stop</code> button, located on the
		  <code>Controls&gt;&gt;Buttons &amp; Switches</code> palette, a
		  numeric indicator, located on the
		  <code>Controls&gt;&gt;Numeric Indicators</code> palette, and a
		  round LED, located on the <code>Controls&gt;&gt;LEDs</code>
		  palette, on the front panel.
		</item>
		<item>
		  Place a <code>cluster</code>, located on the
		  <code>Controls&gt;&gt;All Controls&gt;&gt;Array &amp; Cluster</code>
		  palette, on the front panel.
		</item>
		<item>      
		  Place a <code>numeric control</code>, located on the
		  <code>Controls&gt;&gt;Numeric Controls</code> palette, two
		  vertical toggle switches, located on the
		  <code>Controls&gt;&gt;Buttons &amp; Switches</code> palette,
		  and a horizontal fill slide, located on the
		  <code>Controls&gt;&gt;Numeric Controls</code> palette, in the
		  cluster.
		</item>
		<item>      
		  Create the <code>Modified Cluster</code> by duplicating
		  the first cluster and relabeling it. Right-click the
		  shell of <code>Modified Cluster</code>, and select
		  <code>Change to Indicator</code> from the shortcut menu.
		</item>
		<item>
		  
		  Copy <code>Modified Cluster</code> and relabel it to
		  create <code>Small Cluster</code>. Remove the second
		  toggle switch and horizontal fill slide
		  indicators. Relabel the <code>numeric indicator</code>
		  to <code>Slide value</code>. Resize the
		  <code>cluster</code> as shown in <cnxn target="f1"/>.
		</item>
	      </list>
	    </item>
	    <item>
	      Verify the cluster order of <code>Cluster</code> and
	      <code>Small Cluster</code>. <code>Modified Cluster</code>
	      should have the same order as <code>Cluster</code>.
	      <list id="list3" type="enumerated">
		<item>      
		  Right-click the boundary of each <code>cluster</code>
		  and select <code>Reorder Controls in Cluster</code> from
		  the shortcut menu.
		</item>
		<item>     
		  Confirm the <cnxn target="f2">cluster orders</cnxn>.
		  <figure id="f2">
		    <media type="image/png" src="clusexord1and2.png"/>
		  </figure>
		</item>
	      </list>
	    </item>
	  </list>
	</section>
	<section id="section2">
	  <name>Block Diagram</name>
	  <list id="list4" type="enumerated">
	    <item>
	      Build the block diagram in <cnxn target="f3"/>.
	      <figure id="f3">
		<media type="image/png" src="clusexbd.png"/>
	      </figure>
	      <list id="list5" type="enumerated">
		<item>
		  <media type="image/png" src="while.png"/> 
		  Place the <code>While Loop</code>, located on the
		  <code>Functions&gt;&gt;All Functions&gt;&gt;Structures</code>
		  palette, on the block diagram.
		</item>
		<item>
		  <media type="image/png" src="unbundicon.png"/>
		  Place the <code>Unbundle</code> function, located on the
		  <code>Functions&gt;&gt;All Functions&gt;&gt;Cluster</code> palette,
		  on the block diagram. This function disassembles
		  <code>Cluster</code>. Wire the input cluster to resize
		  the function automatically.
		</item>
		<item>
		  <media type="image/png" src="bundicon3.png"/>
		  Place the <code>Bundle</code> function, located on the
		  <code>Functions&gt;&gt;All Functions&gt;&gt;Cluster</code> palette,
		  on the block diagram. This function assembles
		  <code>Small Cluster</code>.
		</item>
		<item>
		  <media type="image/png" src="unbundbynameicon.png"/>
		  Place the <code>Unbundle by Name</code> function,
		  located on the <code>Functions&gt;&gt;All
		    Functions&gt;&gt;Cluster</code> palette, on the block
		  diagram. This function returns two elements from
		  <code>Cluster</code>. Resize this function to have two
		  output terminals. If a label name is not correct,
		  right-click the name and select the correct name from
		  the <code>Select Item</code> shortcut menu.
		</item>
		<item>
		  <media type="image/png" src="incremicon.png"/>
		  Place the <code>Increment</code> function, located on
		  the <code>Functions&gt;&gt;All Functions&gt;&gt;Numeric</code>
		  palette, on the block diagram. This function adds one to
		  the value of <code>Numeric</code>.
		</item>
		<item>
		  <media type="image/png" src="not.png"/> 
		  Place the <code>Not</code> function, located on the
		  <code>Functions&gt;&gt;Arithmetic &amp; Comparison&gt;&gt;Express
		    Boolean</code> palette, on the block diagram. This
		  function returns the logical opposite of the value of
		  the <code>Boolean</code> terminal of the <code>Unbundle
		    by Name</code> function.
		</item>
		<item>
		  <media type="image/png" src="bundbynameicon.png"/>
		  Place the <code>Bundle by Name</code> function, located
		  on the <code>Functions&gt;&gt;All Functions&gt;&gt;Cluster</code>
		  palette, on the block diagram. This function replaces
		  the values of <code>Numeric</code> and
		  <code>Boolean</code> <m:math><m:cn>1</m:cn></m:math> in
		  <code>Cluster</code> and creates <code>Modified
		    Cluster</code>. Resize this function to have two input
		  terminals. If a label name is not correct, right-click
		  the name and select the correct name from the
		  <code>Select Item</code> shortcut menu.
		</item>
		<item>
		  Complete the block diagram and wire the objects as shown
		  in <cnxn target="f3"/>.
		</item>
	      </list>
	    </item>
	    <item>
	      Save the VI as <code>Cluster Exercise.vi</code> in the
	      <code>C:\Exercises\LabVIEW Basics I</code> directory.
	    </item>
	  </list>
	</section>
	<section id="section3">
	  <name>Run the VI</name>
	  <list id="list6" type="enumerated">
	    <item>
	      Display the front panel and run the VI.
	    </item>
	    <item>
	      Enter different values in <code>Cluster</code> and run the
	      VI again. Notice how values entered in <code>Cluster</code>
	      affect the <code>Modified Cluster</code> and <code>Small
		Cluster</code> indicators. Is this the behavior you
	      expected?
	    </item>
	    <item>
	      Try changing the cluster order of <code>Modified
		Cluster</code>. Run the VI. How did the changed order affect
	      the behavior?
	    </item>
	    <item>
	      Close the VI. Do not save changes.
	    </item>
	  </list>
	</section>
      </problem>
    </exercise>
  </content>
  
</document>
