From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Programmatically determine serial numbers for your FlexRIO card and adapter module

Code and Documents

Attachment

Overview:

This program allows you to determine the serial numbers for you FlexRIO cards and adapter modules from your Windows or RT application.

Description

The FlexRIO platform combines the power of FPGA programming in LabVIEW with adapter modules for a variety of test applications. Often times it is useful to keep information about the actual hardware involved in performing a test. Therefore, the ability to programmatically access the hardware serial numbers for both parts of a FlexRIO can be helpful when developing a test system.


As of LabVIEW 2011 SP1 and NI FlexRIO Adapter Module Support 2.2.1 there are no VIs included on the Functions palette to achieve this functionality. However, VIs are included in vi.lib that will work. To find them, navigate to:

<LabVIEW>\vi.lib\FlexRIO

where <LabVIEW> reflects the root location for your LabVIEW installation.

The particular VIs of interest are FlexRIO_Host_QueryAttribute_U32.vi and FlexRIO_Host_EEPROMRead32.vi. To get the serial number for the PXI FPGA card portion of the FlexRIO use FlexRIO_Host_QueryAttribute_U32.vi and to retrieve the serial number of the FAM use FlexRIO_Host_EEPROMRead32.vi with an address of 4. These VIs can only be used in a host VI and cannot be used at the FPGA level.

Steps to Execute Code

  1. Open FlexRIO Serials.vi
  2. Select the RIO device target you wish to communicate with
  3. Run the VI

Requirements

Software

LabVIEW 2011 SP1, FPGA Module

Hardware

FlexRIO R series card, Flex RIO Adapter Module

VI Snippet:

FlexRIO Serials.png

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

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

Contributors