Example Code

Oversampled Frequency Measurement Reference Example for LabVIEW FPGA

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.

    Software

  • LabVIEW FPGA Module

Code and Documents

Attachment

Description

Overview

This application is an example using cRIO and FPGA to do multi-channel oversampled frequency measurements which are measured over a set time period as a means to increase measurement accuracy.

Description

This application implements 16 counters using two NI cRIO 9401s, a NI cRIO 9014 Controller, and a NI cRIO 9103 Chassis.  It measures the number of rising edge (in cycles) of a TTL signal over a set time period and compares this against the number of cRIO clock pulses from the first rising edge of the TTL signal to the last rising edge within the same time period to calculate the frequency of the signal.  The FPGA code is running at 80 MHz.

 

Also included in oversampledfreq.zip is a video tutorial, which explains the architecture of the application.

 

**The accompanying code represents a very specific use case for NI products. For more general examples, please refer to ni.com/examples, the LabVIEW Example Finder, or the NI driver help files that come with every NI driver.

 

Hardware and Software Requirements

Software

Application Software: LabVIEW Professional Development System 8.5

Driver: NI-RIO 2.3.1

Toolkits and Add-Ons: LabVIEW Real-Time Module 8.5, LabVIEW FPGA Module 8.5

Language(s): LabVIEW

Hardware

Hardware Group: CompactRIO

Hardware Model: cRIO-9014

 

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