Converting an NI-DAQmx VI into a cRIO-904x LabVIEW Project

Publish Date: Jan 03, 2018 | 0 Ratings | 0.00 out of 5 | Print | Submit your review

Table of Contents

  1. Overview
  2. Software Installation Order
  3. Finding an NI-DAQmx Shipping Example
  4. Converting into a CompactRIO LabVIEW Project
  5. View Additional cRIO-904x Controller Resources

1. Overview

This tutorial describes how to convert an existing NI-DAQmx shipping example into a LabVIEW project to be used with a cRIO-904x target. The shipping example we will be using is the Voltage - Continuous Input VI.

 

Back to Top

2. Software Installation Order

For this tutorial we have installed LabVIEW FPGA to be able to show the FPGA target in the LabVIEW FPGA project. We have also installed the compatible CompactRIO driver that provides support for the cRIO-904x and have left the default option of installing NI-DAQmx installed. See below for the installation order:

  1. LabVIEW 2017 SP1 or later
  2. LabVIEW Real-Time Module 2017 or later
  3. LabVIEW FPGA Module 2017 SP1 or later
  4. CompactRIO 17.6 or later

 

Back to Top

3. Finding an NI-DAQmx Shipping Example

Once a compatible version of NI-DAQmx is installed, the NI-DAQmx shipping examples will be installed on your system and you can locate them through the NI Example Finder.

  1. After you have launched LabVIEW click on Help>> Find Examples…  on the LabVIEW Getting Started toolbar. <image>
  2. The NI Example Finder will open in a new window. The Example Finder has hundreds of examples to help you get started with your application.  You can browse the examples by task, or use the search tool to find examples that have been tagged with your keywords.

    Remain on the default Browse tab and browse according to Task. Navigate to Hardware Input and Output>> DAQmx>> Analog Input. Select the "Voltage - Continuous Input.vi" to open the VI and view. Note there are many other NI-DAQmx examples available that can be leveraged to quickly create a new cRIO-904x DAQmx application.

    Note that there are some cRIO-904x shipping examples Hardware Input and Output>> CompactRIO>> Chassis Specific>> cRIO-904x that can be used as a guide.

 

Back to Top

4. Converting into a CompactRIO LabVIEW Project

Begin by creating a new project in LabVIEW, where you will manage your code and hardware resources.

  1. Create a new project in LabVIEW by selecting File » New Project
  2. To add your CompactRIO system to the project, right-click on the Project item at the top of the tree and select New » Targets and Devices…
  3.  This dialog allows you to discover systems on your network or add offline systems. Expand the Real-Time CompactRIO folder, select your cRIO-904x system, and click OK. Note: If your system is not listed, LabVIEW could not detect it on the network. Ensure that your system is properly configured with a valid IP address in Measurement & Automation Explorer. If your system is on a remote subnet, you can also select to manually enter the IP address.
  4. To add the Voltage - Continuous Input.vi to the LabVIEW project, right-click the cRIO-904x target and select Add>> File... which will open the file explorer.

    NI-DAQmx examples will install by default to and can be found here:
    C:\Program Files (x86)\National Instruments\LabVIEW <xxxx>\examples\DAQmx
  5. (on x32 OS the default file path will be C:\Program Files\National Instruments\LabVIEW <xxxx>\examples\DAQmx).

  6.  Ensure that the modules configured to be used in the NI-DAQmx task of the Voltage - Continuous Input.vi are in Real-Time (NI-DAQmx) mode by moving them under the Real-Time Resources project item. Also ensure that any changes in programming mode are deployed to the target.
  7. Open the VI and configure your physical channel controls/ constants for the appropriate module and channels.
  8.  

  9. Configure any other settings and run your VI.

 

Back to Top

5. View Additional cRIO-904x Controller Resources

To continue learning, check out the additional resources on cRIO-904x Controller Getting Started Guide.

 

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit