Example Code

Check USB Flash Drive Memory Usage on cRIO

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.

    Hardware

  • CompactRIO/SingleboardRIO

    Software

  • LabVIEW Real-Time Module
  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This VI demonstrates how to check the size and memory usage of a flash drive connected to the USB port of a cRIO.

Description

The Get Volume Info function is used to obtain information about the USB flash drive. Flash drives connected to a cRIO's USB port are recognized as the "u:\" drive.

Steps to Implement or Execute Code

  1. Unzip the attached file for your version of LabVIEW
  2. Open the Usbdrivetest.lvproj project
  3. Right-click on the RT CompactRIO Target in the Project Explorer window and select Properties
  4. Enter the IP address of your cRIO with USB flash drive inserted
  5. Click OK
  6. Open and run usbtest.vi

Requirements

Software

LabVIEW Development System 2009 "or compatible"

LabVIEW Real-Time Module 2009 "or compatible"

NI-RIO 3.3.1 "or compatible"

Hardware

cRIO controller with USB slot

USB flash drive

Additional Information or References

fpusbtest.png

bdusbtest.png

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

National Instruments
Applications Engineer

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

Contributors