Example Code

Embedded High Speed Data Logger Reference Design

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Driver

  • NI CompactRIO

Code and Documents

Attachment

Download All

Description

Overview


This document provides a LabVIEW reference design with a focus on embedded high speed monitoring and data logging.

Introduction

Many embedded data loggers include common operations like communications, configuration, acquisition, logging, error recovery, analysis and triggering.  This reference design is one example presenting all these concepts working together and serves as a starting point for application development.

 

Pre-Installation

1.  Install LabVIEW, LabVIEW Real Time and LabVIEW FPGA 2015 or later 

2.  Install NI-RIO 15.0 or later

3.  The reference design package has dependencies with four other VI packages.  These packages are available on the NI Tools Network and if your machine has network access to this repository then these packages will be installed automatically.  Documentation and direct downloads for these packages are provided below.

     A.  NI CompactRIO Waveform Reference Library (v4.1 or later)

     B.  NI GXML (v1.41 or later)

     C.  NI STM (v2.1 or later)

4.  Download and install the ni_arch_ehs_logger package from the downloads section of this document.

 

Getting Started

The Embedded High Speed Data Logger Reference Design installs as a project template.  A project created from this template is a local copy and can be modified without affecting the package libraries.  When LabVIEW first opens begin by clicking the "Create Project" button and select the "Embedded High Speed Data Logger" from the list.  It might help to filter the Sample Projects by "CompactRIO".

Figure 1: Click "Create Project" from LabVIEW's Getting Started Window  

 

Figure 2:  Filter the Project List for "CompactRIO" and Select the Embedded High Speed Data Logger Project

 

Project Layout

The LabVIEW project includes templates for the RT application, the remote applications, and the FPGA firmware.  Figure 3 below shows their locations in the project and the data flow relationships between these components.

Figure 3:  How the Main VIs are Organized in the LabVIEW Project

 

Configuring the cRIO Installation

First the cRIO must have the appropriate software installed.

  1. Open Measurement and Automation Explorer
  2. Find your cRIO system under Remote Systems and expand it
  3. Right click Software and Select Add/Remove Software
  4. Select the latest version of NI-RIO for your desired version of LabVIEW and hit Next>>
  5. Select Network Stream
  6. Select NI-Watchdog
  7. Select NI System Configuration
  8. Hit Next>> and then Next>>

Figure 4: Configured cRIO Target to Run this Reference Design

Next we need to put an XML configuration file onto the cRIO target.

  1. Open [Host] Create Config XML.vi from the LabVIEW project
  2. Run the VI and select a local directory for the EHSDL_Config.xml file.  The name should not be changed.
  3. Move the XML file to /home/lvuser/natinst/LabVIEW Data
  4. Now the [RT] EHS Logger Main.vi is ready to run in either debug mode or as an rtexe

 

Discussion and Feedback

This reference design was created by the NI Systems Engineering group.

We do not regularly monitor Reader Comments posted on this page.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.