Getting Started With NI R Series for USB Part 1: Introduction

Updated Sep 16, 2024

Environment

Hardware

  • Multifunction I/O Device
  • Terminal Block

Software

  • LabVIEW
  • LabVIEW FPGA Module

Driver

  • NI-RIO (Legacy)

This tutorial provides step–by-step instructions for setting up your USB R Series device, adding it to a project, and creating an analog input acquisition using a DMA FIFO.
 

Requirements

Software

  •  
  • LabVIEW 2013 or later

  • NI LabVIEW FPGA Module 2013 or later

  • NI-RIO 13.0 or later 
     

Note: NI-RIO 13.0 installs with NI-RIO Device Drivers August 2013 from ni.com/downloads.
 

Make sure the software installation follows this order.
 

  • If you have the hard drive space available on your host computer, you can install Xilinx Compile Tools.
     

    • From DVD 1:

      During installation you can choose to install Compilation Tools for FPGA Devices other than Virtex-||
       

    • Download:

      If you do not have the media, visit ni.com/downloads and search for NI LabVIEW FPGA Module Xilinx Tools.
       

Hardware

    

Figure 1.  USB R Series Hardware Setup
 

    • NI USB-7855R/USB-7856R/USB-7855R OEM/USB-7856R OEM

    • NI SHC68-C68-RDIO2 1m or 2m Cable Part # 156166-01, 156166-02

    • NI SHC68-68-RMIO 1m or 2m Cable Part # 189588-01, 189588-02

    • SCB-68 HSDIO Terminal Block Part # 782914-01

    • SCB-68A Terminal Block Part # 782536-01

Hardware Setup

  1. Connect your SHC68-C68-RDIO2 Cable to Connector0.

  2. Connect your SHC68-68-RMIO Cable to Connector1.

  3. Connect your SCB-68 HSDIO to your SHC68-C68-RDIO2 Cable.

  4. Connect your SCB-68A to your SHC68-68-RMIO cable.

  5. Connect the A type connector of the USB cable to your PC, and the B type connector to the device.

Figure 2. USB Connections
 

  1. Connect power to your USB R Series device and turn on the power switch on the back of the device.

  2. The device now shows up in Measurement & Automation Explorer (MAX) as seen in Figure 3.

 

Figure 3. MAX Tree View
 

Note: If the device shows up in MAX with the standard USB icon ( ), then the NI-RIO driver needs to be installed or repaired. 
 

  1. If the device does not show up in MAX, double check the LEDs on the front panel of the USB R Series device to determine if the device is powered, the USB is ready, and that there are no errors.
     

Table 1. LED Description for USB R Series Devices
 

Now your device is ready to be used in LabVIEW! 
 

Project Setup in LabVIEW

We are going to set up a new project in LabVIEW and acquire data from an analog channel. 
 

  1.  Launch LabVIEW to display the Getting Started Window

 

Figure 4. LabVIEW Getting Started Window
 

  1. Left-click the Create Project button or left-click File»Create Project»Blank Project.

 

Figure 5. Create Project Window

 

  1. In the project window, right-click My Computer»New»Targets and Devices …

You can add the target in one of two ways. If you have the device connected and discovered in MAX, you can use the Existing target or devices option. If you do not have the target connected at the moment, you can use the New target or device option.
 

  1. Select Existing target or device»Discover an existing target(s) or device(s).

 

Figure 6. Add Targets and Devices Window
 

  1. Select New target or device.
     

Figure 7. New target or device selection
 

  1.  Now that the target is added, you need access to the FPGA I/O. Right-click FPGA Target»New»FPGA I/O.
     

Figure 8. Add FPGA I/O
 

  1. Right-click the arrow and click OK. Now your project contains new folders labeled Board I/O, Connector0, and Connector1 as seen in Figure 9.

 

Figure 9. FPGA I/O in LabVIEW Project Explorer
 

  1. Right-click FPGA Target»New»VI.

  2. Left-click File»Save As …»RT MAIN.vi.
     

This is a good starting point for a new project. Now it’s time to implement one of the examples.
 

Data Acquisition

  1. The attached folder Getting Started has a Getting Started – USB R Series.lvproj. The project can also be found through NI Example Finder launched by selecting Help >> LabVIEW Help... or through the path:
     C:\Program Files (x86)\National Instruments\LabVIEW XXXX\examples\R Series\Device Specific\USB Devices\Getting Started\Getting Started - USB R Series.lvproj

Figure 10. Getting Started Project Explorer
 

  1. We are going to focus on the AI Acquisition DMA mode FPGA and HOST VIs.

  2. Compile AI Acquisition DMA mode (FPGA).vi by right-clicking the VI in the Project Explorer»Create Build Specification.

  3. This creates a Build Specification.

  4. Right-click the Build Specification»Build.
     

Figure 11. Create Build Specification
 

  1. There are three options to compile. If you installed the Xilinx Compile Tools, you can use the first option, Use the local compile server.

  2. After you have compiled the AI Acquisition DMA mode (FPGA).vi, you can run the AI Acquisition DMA mode (HOST).vi

  3. Set the resource name to the RIO resource name as seen in MAX. For this example, it would be RIO0.

  4. You can use the Configure AI tab to set up the AI Acquisition and the Read DMA AI tab to see the actual data.
     

Figure 12. Front Panel of AI Acquisition DMA Mode (HOST).vi

 

Congratulations! Your USB R Series device is successfully up and running. For a more in-depth tutorial on using the full functionality of your device, refer to Related Links below.