<?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 Strings and FileI/O</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2004/06/22 11:56:37 GMT-5</md:created>
  <md:revised>2004/07/16 15:28:19.691 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>VI</md:keyword>
  </md:keywordlist>

  <md:abstract/>
</metadata>

  <content>
    <exercise id="e1">
      <problem>
	<para id="e1p1">
	  Build a VI that generates a 2D array of 
	  <m:math>
	    <m:apply>
	      <m:cartesianproduct/>
	      <m:apply>
		<m:times/>
		<m:cn>3</m:cn>
		<m:ci>rows</m:ci>
	      </m:apply>
	      <m:apply>
		<m:cn>100</m:cn>
		<m:ci>columns</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math> of random numbers and writes the data transposed
	  to a spreadsheet file. Add a header to each column. Use the
	  high-level File I/O VIs located on the <code>File I/O</code>
	  palette.
	</para>
	<note type="tip">
	  Use the <code>Write Characters To File</code> VI to write
	  the header and the <code>Write To Spreadsheet File</code> VI
	  to write the numeric data to the same file.
	</note>
	<para id="e1p2">
	  Save the VI as <code>More Spreadsheets.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 converts tab-delimited spreadsheet strings
	  to comma-delimited spreadsheet strings, that is, spreadsheet
	  strings with columns separated by commas and rows separated
	  by end of line characters. Display both the tab-delimited
	  and comma-delimited spreadsheet strings on the front panel.
	</para>
	<note type="tip">
	  Use the <code>Search and Replace String</code> function.
	</note>
	<para id="e2p2">
	  Save the VI as <code>Spreadsheet Converter.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="m12262">Temperature Logger VI</cnxn> so
	  the VI does not create a new file each time you run the
	  VI. Append the data to the end of the existing
	  <code>temp.dat</code> file that the <code>Temperature Logger
	  VI</code> created. Run the VI several times and use a word
	  processor application to confirm that the VI appended new
	  temperature readings.
	</para>
	<note type="tip">
	  Delete the <code>Format Into File</code> function and
	  replace it with the <code>Format Into String</code> and
	  <code>Write File</code> functions. Use the <code>pos
	  mode</code> and <code>pos offset</code> parameters of the
	  <code>Write File</code> function to move the current file
	  mark.
	</note>
	<para id="e3p2">
	  Select <code>File&gt;&gt;Save As</code> to save the VI as
	  <code>Temperature Logger 2.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>

  </content>
  
</document>
