<?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>Using the Instrument I/O Assistant Exercise</name>
  <metadata>
  <md:version>**new**</md:version>
  <md:created>2004/06/16 12:02:24.464 GMT-5</md:created>
  <md:revised>2004/06/17 11:44:32.632 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="mshiralkar05">
      <md:firstname>Malan</md:firstname>
      
      <md:surname>Shiralkar</md:surname>
      <md:email>mshiralkar05@hotmail.com</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="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>Instrument I/O</md:keyword>
    <md:keyword>Instrument I/O Assistant</md:keyword>
    <md:keyword>exercise</md:keyword>
  </md:keywordlist>

  <md:abstract>In this exercise, the objective is to build a VI that uses the Instrument I/O Assistant to communicate with a GPIB interface. Complete the following steps to build a VI that acquires data from the NI Instrument Simulator.</md:abstract>
</metadata>

  <content>
    <exercise id="e1">
      <problem>
	<section id="s1">
	  <name>Front Panel</name>
	  <list id="s1l1" type="enumerated">
	    <item>
	      Open a blank VI.
	    </item>
	    <item>
	      The front panel in <cnxn target="s1l1f1"/> will result
	      from building the block diagram.
	      <figure id="s1l1f1">
		<media type="image/jpg" src="IIOAfp.png"/>
	      </figure>
	    </item>
	  </list>
	</section>
	<section id="s2">
	  <name>Block Diagram</name>
	  <list id="s2l1" type="enumerated">
	    <item>
	      Display and build the block diagram shown in <cnxn target="s2l1f1"/>.
	      <figure id="s2l1f1">
		<media type="image/jpg" src="IIOAbd.png"/>
	      </figure>
	      <list id="s2l1l1" type="enumerated">
		<item>
		    <media type="image/jpg" src="ioassist.png"/>
		  Place the <code>Instrument I/O
		  Assistant</code> Express VI, located on the
		  <code>Functions&gt;&gt;Input</code> palette, on the block
		  diagram. Complete the following steps to configure
		  the Express VI in the <code>Instrument I/O
		  Assistant</code> dialog box.
		  <list id="s2l1l1l1" type="enumerated">
		    <item>
		      Select <code>devsim</code> from the <code>Select
		      an instrument</code> pull-down menu and select
		      <code>VISA Code Generation</code> from the
		      <code>Code generation type</code> pull-down
		      menu.
		    </item>
		    <item>
		      Click the <code>Add Step</code> button. Click
		      <code>Query and Parse</code> to write and read
		      from the Instrument Simulator.
		    </item>
		    <item>
		      Type <code>*IDN?</code> as the command, select
		      <code>\n</code> as the <code>Termination
		      character</code>, and click the <code>Run this
		      step</code> button. If no error warning appears
		      in the lower half of the dialog box, this step
		      has successfully completed.
		    </item>
		    <item>
		      To parse the data received, click the <code>Auto
		      parse</code> button.  Notice that
		      <code>Token</code> now appears in the
		      <code>Outputs</code> pane on the left side of
		      the dialog box. This value represents the string
		      returned from the identification query. Rename
		      <code>Token</code> by typing <code>ID
		      String</code> in the <code>Token name</code>
		      text box.
		    </item>
		    <item>
		      Click the <code>Add Step</code> button. Click
		      <code>Query and Parse</code>. Type
		      <code>MEAS:DC?</code> as the command and click
		      the <code>Run this step</code> button.
		    </item>
		    <item>
		      To parse the data received, click the <code>Auto
		      parse</code> button. The data returned is a
		      random numeric value. Rename <code>Token</code>
		      by typing <code>Voltage</code> in the
		      <code>Token name</code> text box.
		    </item>
		    <item>
		      Click the <code>OK</code> button to exit the
		      <code>I/O Assistant</code> and return to the
		      block diagram.
		    </item>
		  </list>
		</item>
		<item>
		  Right-click the <code>ID String</code> output and
		  select <code>Create&gt;&gt;Indicator</code> from the
		  shortcut menu.
		</item>
		<item>
		  Right-click the <code>Voltage</code> output and
		  select <code>Create&gt;&gt;Indicator</code> from the
		  shortcut menu.
		</item>
		<item>
		  Wire the <code>Error Out</code> output to the
		  <code>Simple Error Handler</code> VI.
		</item>
	      </list>
	    </item>
	    <item>
	      Display the front panel and run the VI. Resize the
	      string indicator if necessary.
	    </item>
	    <item>
	      Save the VI as <code>Read Instrument Data.vi</code> in
	      the <code>C:\Exercises\LabVIEW Basics I</code>
	      directory.
	    </item>
	    <item>
	      Right-click the <code>I/O Assistant</code> and select
	      <code>Open Front Panel</code>. Click the
	      <code>Convert</code> button when asked if you want to
	      convert to a subVI.
	    </item>
	    <item>
	      View the code generated by the <code>I/O
	      Assistant</code>. Where is the command
	      <code>*IDN?</code> written to the Instrument Simulator?
	      Where is the voltage being read?
	    </item>
	    <item>
	      Select <code>File&gt;&gt;Exit</code> to exit the subVI. Do not
	      save changes.
	    </item>
	  </list>
	</section>
      </problem>
    </exercise>
  </content>
  
</document>
