HeartBeatRate/Software/test/preamp-test/documentation/myRIO Project Documentation...

541 lines
21 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<title>myRIO Project</title>
<style>
<!--
/***************************************************/
/* MINIMAL STYLES */
/* The following section defines styles that every HTML Help project should need. */
/* Specifies White Background color */
body {
background-color: #FFFFFF;
font-family: Verdana, sans-serif;
font-size: 8pt;
color: #000000;
}
/* The default style of P is red to alert you that you need to apply a style class, such as Body. */
P { margin-top:6.00pt; margin-bottom:6.00pt;}
BR { font-size:4.00pt; }
/* Use H1 for all topic headings. */
H1 { margin-top:3.00pt; margin-bottom:3.00pt; font-size:150%; font-weight:bold; }
/* Use H2 for second-level headings. */
H2 { margin-top:9.00pt; margin-bottom:3.00pt; font-size:125%; font-weight:bold; }
/* Use H3 for third-level headings. */
H3 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }
/* Use H4 for fourth-level headings. */
H4 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }
/* H5 and H6 have the same definition as H4 because you should not need this level of heading in one topic. If you need to use H5 or H6, consider breaking up your topic into more than one topic. */
H5 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }
H6 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }
/* Use the Body style class for normal paragraphs. */
P.Body { }
/* Use the Anchor style class for graphic references on a line by themselves. */
P.Anchor { font-size:125%; }
/* Use the Indent style classes to indent a paragraph. If you need to indent text below a list item, use <br><br> to start the new paragraph within the same set of <li></li> tags. If you need to indent a list within another list, nest the indented list within the first list's set of <ol></ol> or <ul></ul> tags. */
P.Indent1 { margin-left:12.00pt; margin-bottom:3.00pt; }
P.Indent2 { margin-left:24.00pt; margin-bottom:3.00pt; }
P.Indent3 { margin-left:36.00pt; margin-bottom:3.00pt; }
P.Indent4 { margin-left:48.00pt; margin-bottom:3.00pt; }
P.Indent5 { margin-left:60.00pt; margin-bottom:3.00pt; }
/* Use the LI style for all list items. */
LI { margin-top:3.00pt; margin-bottom:3.00pt; }
/* Use the OL style for numbered lists. You do not have to type the number for each list item in a numbered list. */
OL { margin-left:22.00pt; margin-top:3.00pt; margin-bottom:3.00pt; text-indent:0pt; list-style-type: decimal; }
/* Use the OL style for numbered lists. Nested lists will use the bullet types according to the nesting scheme below */
ol ol {list-style-type:lower-alpha}
ol ol ol {list-style-type:decimal}
ol ol ol ol {list-style-type:lower-alpha}
ol ol ol ol ol {list-style-type:decimal}
ol ol ol ol ol ol {list-style-type:lower-alpha}
ol ol ol ol ol ol ol {list-style-type:decimal}
ol ol ol ol ol ol ol ol {list-style-type:lower-alpha}
/* Use the EquationNum style class for numbered lists of equations. You do not have to type the number for each list item in a numbered list. */
OL.EquationNum { margin-left:36.00pt; text-indent:0pt; list-style-type: decimal; }
/* Use the List-abc style class for lettered lists. You do not have to type the letter for each list item in a lettered list. */
OL.List-abc { margin-left:22.00pt; text-indent:0pt; list-style-type:lower-alpha; }
/* Use the UL style for bulleted lists. You do not have to type the bullet for each list item in a bulleted list. */
UL { margin-left:22.00pt; text-indent:0pt; margin-top:3.00pt; margin-bottom:3.00pt; list-style-type: disc; }
/* Use the UL style for bulleted lists. Nested lists will use the bullet types according to the nesting scheme below. */
ul ul {list-style-image: none;list-style-type: circle}
ul ul ul {list-style-image:none;list-style-type:disc}
ul ul ul ul {list-style-image: none;list-style-type: circle}
ul ul ul ul ul {list-style-image:none;list-style-type:disc}
ul ul ul ul ul ul {list-style-image: none;list-style-type: circle}
ul ul ul ul ul ul ul {list-style-image:none;list-style-type:disc}
ul ul ul ul ul ul ul ul ul{list-style-image: none;list-style-type: circle}
/* Use the List-Box style class for bulleted lists with boxes instead of bullets. You do not have to type the box for each list item in a box list. */
UL.List-Box { list-style-image: none;list-style-type: square}
Table { font-size:100%; }
/* Use the Borderless style class for tables that do not need borders, such as for 2-column or 3-column lists with no headings. */
Table.Borderless { border:none; }
/* Use the Bordered style class for tables that need borders. */
Table.Bordered { border-width: 1pt; border-style: solid; border-color: #000000; border-collapse: collapse; }
/* Use the TD style for table cells in Borderless or Borderless-Wide tables. */
TD { vertical-align:top; padding:3px; }
/* Use the Bordered style class for table headings and cells in Bordered or Bordered-Wide tables. */
.Bordered { border-width: 1pt; border-style: solid; border-color: #000000; }
/* Use the Icon style class for table cells that contain note, caution, warning, or tip icons, or LabVIEW datatype terminals. */
TD.Icon { width:40px; }
/* Use the TH style for table heading cells in Borderless or Borderless-Wide tables. */
TH { font-weight:bold; padding:3px; }
/* Use the Left-Align style class for table headings and cells that you want to left align instead of center align. */
.Left-Align { text-align:left; }
/***************************************************/
/* CHARACTER FORMATS */
/* The following section defines character formats that every HTML Help project should need. */
/* CHARACTER FORMATS Updated to conform with the CSE HTML Validator Pro */
/* The following section defines character formats that every HTML Help project should need. */
/* Use the Dark-Red format for warnings or cautions. */
.Dark-Red { color: #800000 }
/* Use the Monospace format for code or syntax examples. */
.Monospace { font-family: Courier New; font-size: 100%; }
/* Use the Monospace-Bold format for messages and responses that the computer automatically prints to the screen. */
.Monospace-Bold { font-family: Courier New; font-weight: bold; font-size: 100%; }
/* Use the Monospace-Italic format to denote text that is a placeholder for a word or value that the user must supply. */
.Monospace-Italic { font-family: Courier New; font-style: italic; font-size: 100%; }
/* small class */
.smallFont { font-size:87.5%; }
/* Bold class */
.Bold { font-weight: bold; }
/* Italic class */
.Italic { font-style: italic; }
/* Use the Platform format to denote a specific platform. */
.Platform { color: #0000FF; font-weight: bold; }
/* Use the Symbol format for characters not in the Verdana character set. Use this format sparingly. When possible, you should use the correct ASCII code for the symbol or use a graphic to recreate the symbol. */
.Symbol { font-family: Symbol; }
/* Use the Red-text format to call attention to text that needs information added or edited by techcomm */
.Red-text {color: #FF0000;}
/* Use the Green-Underline format for the green defintion in the conventions topic */
.Green-Underline {color: #007700; text-decoration : underline;}
/* Use the glossButton format for the glossary buttons used in the glossary topic */
.glossButton { font-size:12px; color:black; }
/* Use for text sections and hyphenated words that should not break at line wraps */
.nobreak{white-space:nowrap}
/* Use for template instructions. */
.instructions{color:red; font-style:italic}
/*Use for words and text sections that do not need to be localized */
.DNL { }
/* The following styles define the color of links. */
a:link { color: #007700 }
a:visited { color: #7F007F }
a:link:hover { color: #FF0000 }
a:link:active { color: #FF0000 }
/***************************************************
** Forms */
form { margin-top:0pt; margin-bottom:3pt; color:black; }
select { font-size:100%; color:black; }
/*******************************************************
** Margins **
** Use these styles for block-level elements inside tables cells or list items where you do not want extra padding at the top or bottom of a cell. */
.noTopMargin { margin-top:0pt;}
.noBottomMargin { margin-bottom:0pt;}
/***************************************************
** CODE STYLES **
** The following section defines styles that you need to format entire sections of code or syntax examples. If you have just a few words you need to format as a code or syntax example, use the Monospace character format. */
P.Code { margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New; }
P.Code1 { margin-left:12.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New; }
P.Code2 { margin-left:24.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New; }
P.Code3 { margin-left:36.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New; }
-->
</style>
<script type="text/javascript"> // define hyperlinks and function for launching a URL in a browser
function WWW(url)
{
var urlWindow;
urlWindow = window.open(url, "New", "directories=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes");
}
</script>
</HEAD>
<body>
<h1>myRIO Project</h1>
<p class="Body">You can use the <strong>myRIO Project</strong> template as a starting point for creating myRIO applications with the myRIO default FPGA personality. With the <strong>myRIO Project</strong> template, you can easily access myRIO I/O channels and onboard devices without making major modifications to the structure of the application.</p>
<h2>Table of Contents</h2>
<p class="Body"><a href="#system_req">System Requirements</a></p>
<p class="Body"><a href="#understand_comp">Understanding the Components of This Template</a></p>
<p class="Body"><a href="#run_tsp">Running This Template</a></p>
<p class="Body"><a href="#mod_tsp">Modifying This Template</a></p>
<p class="Body"><a href="#add_resources">Related Information</a></p>
<hr>
<a name="system_req">
<h2>System Requirements</h2></a>
<h3>Development System</h3>
<ul>
<li>LabVIEW Full or Professional Development System</li>
<li>LabVIEW Real-Time Module</li>
<li>LabVIEW myRIO Toolkit</li>
</ul>
<h3>Hardware</h3>
<ul>
<li>myRIO</li>
</ul>
<a name="understand_comp">
<h2>Understanding the Components of This Template</h2></a>
<p class="Body">This template uses a Flat Sequence structure that executes frames from left to right.</p>
<img src="myRIO_Project_Diagram.gif" alt="">
<p class="Body">The Flat Sequence structure in this template executes the following frames from left to right:</p>
<ol>
<li><strong>Initialize</strong>&#8212;Initializes the myRIO, variables, and user interface elements, such as controls and indicators. Initializing code depends on your application needs.</li>
<li><strong>Acquire and process data</strong>&#8212;Acquires data from the myRIO and processes the data for presentation. The While Loop repeats code until you click <strong>Stop</strong> or an error occurs.</li>
<li><strong>Close</strong>&#8212;Closes user interface elements and variables, and resets the myRIO output values to zero before the application exits. Closing code is optional.</li>
</ol>
<a name="run_tsp">
<h2>Running This Template</h2></a>
<ol>
<li>In the <strong>Project Explorer</strong> window, navigate to your myRIO target and open the Main VI.</li>
<li>Click <strong>Run</strong>. This application acquires acceleration data from the onboard accelerometer and displays changes to acceleration values in a waveform chart.</li>
<li>Rotate or shake the myRIO and observe the changes of the X, Y, and Z acceleration values.</li>
<li>Click <strong>Stop</strong> to stop the application.</li>
</ol>
<a name="mod_tsp">
<h2>Modifying This Template</h2></a>
<p class="Body">The following table summarizes the design decisions you must make when modifying this template.</p>
<table class="Bordered">
<tr class="Bordered">
<th class="Bordered">Design Decision</th>
<th class="Bordered">Design Example</th>
<th class="Bordered">Detailed Information</th></tr>
<tr class="Bordered">
<td class="Bordered">How do you want to control the order of execution in your application?</td>
<td class="Bordered">You want data to flow as desired without using the Flat Sequence structure.</td>
<td class="Bordered"><a href="#control_execution_order">Controlling the Order of Execution</a></td></tr>
<tr class="Bordered">
<td class="Bordered">What data does your application need to initialize?</td>
<td class="Bordered">You want your application to open a file for logging.</td>
<td class="Bordered"><a href="#initialize">Adding Initialization Code</a></td></tr>
<tr class="Bordered">
<td class="Bordered">Which myRIO I/O channels does your application need to access?</td>
<td class="Bordered">You want your application to control the DIO channels on the myRIO.</td>
<td class="Bordered"><a href="#data_acquisition">Modifying the Data Acquisition and Processing Code</a></td></tr>
<tr class="Bordered">
<td class="Bordered">What executions does your application need to complete before exiting?</td>
<td class="Bordered">You want your application to close references to make memory resources available.</td>
<td class="Bordered"><a href="#close">Adding Closing Code</a></td></tr>
<tr class="Bordered">
<td class="Bordered">How does your application handle errors?</td>
<td class="Bordered">You want your application to report errors at the end of the execution flow.</td>
<td class="Bordered"><a href="#error_handling">Modifying Error Handling</a></td></tr>
</table>
<a name="control_execution_order"></a><h3>Controlling the Order of Execution</h3>
<p class="Body">This template uses the Flat Sequence structure to control data flow. The data leaves each frame as the frame finishes executing. This template uses the Flat Sequence structure to demonstrate the purpose of the code in each frame.</p>
<p class="Body"><strong>Note</strong>&nbsp;&nbsp;Do not overuse the Flat Sequence structure for controlling the execution order because the Flat Sequence structure prohibits parallel operations.</p>
<p class="Body">When you modify this template, you can remove the Flat Sequence structure and establish data dependency between nodes. For example, wiring the <strong>error in</strong> and <strong>error out</strong> clusters through nodes controls the data to flow from one node to another.</p>
<a name="initialize"></a><h3>Adding Initialization Code</h3>
<p class="Body">This template initializes the <strong>error in</strong> cluster to specific values. You can add code to initialize your user interface and the myRIO. For example, you may want to initialize the data to specific values or to open a file for logging.</p>
<a name="data_acquisition"></a><h3>Modifying the Data Acquisition and Processing Code</h3>
<p class="Body">This template uses the Accelerometer Express VI to read the acceleration values from the onboard accelerometer and uses a waveform chart to display the acceleration values.</p>
<p class="Body">You can add code to acquire data from the myRIO and process the data based on your application needs. The myRIO Toolkit provides Express VIs and Low Level VIs for you to access I/O channels and the onboard devices.</p>
<a name="close"></a><h3>Adding Closing Code</h3>
<p class="Body">This template uses the Reset VI to reset the onboard accelerometer. You must use the Reset VI after the completion of all operations with the myRIO I/O channels. Otherwise, the Reset VI might return unexpected results.</p>
<p class="Body">You can add code that executes after the data acquisition and processing completes but before the application exits. Closing code commonly accomplishes the following tasks:</p>
<ul>
<li>Frees memory by closing any open references</li>
<li>Flushes any buffers in use</li>
<li>Resets the myRIO</li>
</ul>
<a name="error_handling"></a><h3>Modifying Error Handling</h3>
<p class="Body">By default, if an error occurs in the Accelerometer Express VI, this template stops. If you do not want the error to stop your application, you can remove the OR function and wire the <strong>Stop</strong> control directly to the conditional terminal of the While Loop. The <strong>error in</strong> and <strong>error out</strong> clusters pass error information from the beginning of the VI to the end and report the error at the end of the execution flow.</p>
<a name="add_resources">
<h2>Related Information</h2></a>
<p class="Body">Refer to the <em>LabVIEW Help</em>, available by selecting <strong>Help&#0187;LabVIEW Help</strong> from LabVIEW, for information about LabVIEW concepts or objects used in this sample project. You also can use the <strong>Context Help</strong> window to learn basic information about LabVIEW objects as you move the cursor over each object. To display the <strong>Context Help</strong> window in LabVIEW, select <strong>Help&#0187;Show Context Help</strong>.</p>
<p class="Body">Refer to the myRIO sample projects, available from the <strong>Create Project</strong> dialog box, for examples of adapting this template to more complex applications.</p>
<hr>
<h2>Legal Information</h2>
<!--Copyright-->
<p><strong>Copyright</strong></p>
<p>&#0169; 2013&ndash;2015 National Instruments. All rights reserved.</p>
<p>Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.</p>
<p>National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.</p>
<p><strong>End-User License Agreements and Third-Party Legal Notices</strong></p>
<p>You can find end-user license agreements (EULAs) and third-party legal notices in the following locations after installation:</p>
<ul>
<li>Notices are located in the <span class="Monospace">&lt;National Instruments&gt;\_Legal Information</span> and <span class="Monospace">&lt;National Instruments&gt;</span> directories.</li>
<li>EULAs are located in the <span class="Monospace">&lt;National Instruments&gt;\Shared\MDF\Legal\license</span> directory.</li>
<li>Review <span class="Monospace">&lt;National Instruments&gt;\_Legal Information.txt</span> for information on including legal information in installers built with NI products.</li>
</ul>
<p><strong>U.S. Government Restricted Rights</strong></p>
<p>If you are an agency, department, or other entity of the United States Government (&quot;Government&quot;), the use, duplication, reproduction, release, modification, disclosure or transfer of the technical data included in this manual is governed by the Restricted Rights provisions under Federal Acquisition Regulation 52.227-14 for civilian agencies and Defense Federal Acquisition Regulation Supplement Section 252.227-7014 and 252.227-7015 for military agencies.</p>
<p><strong>IVI Foundation Copyright Notice</strong></p>
<p><span class="DNL">Content from the IVI specifications reproduced with permission from the IVI Foundation.</span></p>
<p><span class="DNL">The IVI Foundation and its member companies make no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The IVI Foundation and its member companies shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.</span></p>
<!--Trademarks-->
<p><strong>Trademarks</strong></p>
<p>Refer to the <em><span class="DNL">NI Trademarks and Logo Guidelines</span></em> at <a href="http://digital.ni.com/express.nsf/bycode/rdtrad" target="_blank"><span class="DNL">ni.com/trademarks</span></a> for information on <span class="DNL">National Instruments</span> trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies.</p>
<!--Patents-->
<p><strong>Patents</strong></p>
<p>For patents covering the National Instruments products/technology, refer to the appropriate location: <strong>Help&#0187;Patents</strong> in your software, the <span class="Monospace">patents.txt</span> file on your media, or the <em>National Instruments Patent Notice</em> at <a href="http://digital.ni.com/express.nsf/bycode/rdlv17" target="_blank">ni.com/patents</a>.</p>
</body>
</html>