Example Code

How to programmatically read variable names and descriptions in Compact RIO Scan Mode

    Software

  • LabVIEW Real-Time Module

Code and Documents

Attachment

Overview

This example demonstrates how to programmatically read variable names and descriptions in Compact RIO Scan Mode.

 

Description

When we have a CompactRIO (cRIO) in a project and we are using the Scan Interface (Scan Engine) for the modules, it is always good to rename the channels (IO) with names meaningful to our application. These names can be extremely useful during logging or during data presentation to the user. Here is a way to extract these names programatically and also extract the descriptions as well!

Note: (IO descriptions are accessible statically by right-clicking on the IO of the module, and going into its Properties. In the Description section you can check "Enable Description" and add information for that IO)

 

Requirements

 Software

  • LabVIEW Full or Professional Development System 2012 (or compatible)
  • LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • Compact RIO (e.g. 9074 or compatible)
  • Any C Series module (e.g. NI 9211 and NI 9474 or compatible)

 

Steps to Implement or Execute Code

  1. Download and extract the attached file "Extract C Series IO Names in Scan Mode LV2012 NIVerified.zip"
  2. Close all open LabVIEW projects
  3. Open Project "Extract C Series IO Names in Scan Mode LV2012 NIVerified.lvproj"
  4. Follow the instructions in Front Panel and Block Diagram of "Extract C Series IO Names in Scan Mode LV2012 NIVerified.vi" and run the program

 

Additional Information or References

Project:

Project.png

 

VI:

Extract C Series IO Names in Scan Mode LV2012 NIVerified.vi - Front Panel.png

 

Extract C Series IO Names in Scan Mode LV2012 NIVerified.vi - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

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

Comments
sahpe
Active Participant
Active Participant
on

If you need these lists as 1D arrays instead of 2D then this is a simple tweak! Have a look at "IO info 2.vi" for an example on the names.

sahpe
Active Participant
Active Participant
on

If you need an array of all of the values on a single module, then this will help:

NI Scan Engine Advanced I/O Access