Waveform Generation with CompactRIO

Publish Date: Mar 30, 2016 | 6 Ratings | 4.33 out of 5 | Print

Overview

Engineers who develop and test automotive electronics, avionics, communication systems and other similar systems often need to measure and simulate components that generate analog waveforms. The LabVIEW FPGA Module is a tool that you can use to create custom waveform generation hardware for test and measurement systems. Unlike dedicated waveform generators, Reconfigurable I/O (RIO) hardware that is defined by LabVIEW FPGA allows you to customize the waveform generation and behavior for your application. While the other RIO devices are capable of generating waveforms, we will focus this tutorial on using CompactRIO which is a customizable, rugged, and portable hardware solution for waveform generation. This tutorial describes how to generate four types of waveforms, linear, non-linear, periodic, and arbitrary using the LabVIEW FPGA Module and CompactRIO hardware. Additionally, it discusses the use of good programming practices to create scalable, maintainable, and robust FPGA code. The accompanying example programs are great starting points to develop a customized waveform generator for your specific application.

Table of Contents

  1. Linear Waveform Generation
  2. Non-Linear Waveform Generation
  3. Periodic Waveform Generation
  4. Arbitrary Waveform Generation

1. Linear Waveform Generation

A linear waveform is a waveform that can be defined by an equation with a linear slope. Linear waveforms can be described by two points, a start and end point, and any points located on the line connecting these two points. These waveforms can be output on a point-by-point basis with CompactRIO analog output modules. A visual representation of a linear waveform can be seen in the following graph.



We are able to generate linear waveforms with the LabVIEW FPGA Module and CompactRIO using many different methods. The tutorials and example programs linked below address many key aspects of linear waveform generation including: (1)storing waveforms in arrays and (2)utilizing linear interpolation to minimize the number of waveform points that must be stored on the FPGA. Also, an algorithm is discussed in the tutorial that allows the user to define an output waveform by only the start point, the end points and the number of desired output values between these two values.

A non-linear waveform is any waveform that cannot be defined by an equation with a linear slope. Non-linear waveforms can be described with an equation and can be output on a point-by-point basis with CompactRIO analog output modules. Non-linear waveforms can be sampled at a given rate and represented by individual points. An example of a nonlinear waveform is shown below.




Non-linear waveform generation encompasses many different waveforms. This tutorial addresses common methods that can be used to output non-linear waveforms. Array storage is discussed as well as utilizing the FPGA memory for waveform storage. The tutorial focuses on using the Look-Up Table 1D VI in the LabVIEW FPGA Module to store and index through non-linear waveforms on the FPGA. It also includes a discussion of simulating thermocouples on the FPGA. Non-linear waveforms include a wide range of waveforms including periodic waveforms and arbitrary waveforms. There are special features in the LabVIEW FPGA Module that allow the user to perform unique operations on these two types of non-linear waveforms. Each of these waveforms is addressed in separate tutorials to accent some of the features available in the LabVIEW FPGA Module that are available for waveform generation.

A periodic waveform is a waveform that repeats itself at regular intervals. The unit of regularity in a periodic waveform is called its cycle. The waveform shown below is a periodic sine wave that has a cycle of 50 samples. Periodic waveforms do not have to be sinusoidal and can be arbitrarily complex within the defined cycle.


We are able to generate periodic waveforms with CompactRIO hardware and the LabVIEW FPGA Module using several different methods. The first method involves the use of the LabVIEW FPGA Sine Generator Express VI. By using this Express VI, we can quickly develop an FPGA program, download it to the target hardware, and have a fully functional sinusoidal waveform generator with frequency, amplitude, and offset controls. The second method takes advantage of advanced functions of the LabVIEW FPGA Module, reading and writing to FPGA memory. This advanced functionality allows us to load arbitrarily complex cycles of a periodic waveform to the FPGA memory. The tutorial linked below outlines these two methods of periodic waveform generation in detail. The example programs are a demonstration of a sinusoidal waveform generator that uses the Sine Generator Express VI and a periodic waveform generator that uses the FPGA onboard memory.

An arbitrary waveform is a user-defined waveform that must be specified point-by-point. Because of this, arbitrary waveforms provide nearly limitless flexibility. An arbitrary waveform can be of any shape imaginable within the restrictions of the hardware that is generating the signal. These restrictions include horizontal and vertical resolutions and the clock update rate. Since arbitrary waveforms are defined point-by-point, the more update points that define the waveform, the higher the resolution of the output signal. Below is a custom-created arbitrary waveform that is a concatenation of sine, square, triangle, and sawtooth waveforms. Each waveform segment has 100 update points for a total of 400 points.




By using arbitrary waveforms, engineers and scientists are able to generate unique waveform signals that are specific to their applications. Most often, arbitrary waveforms are designed to simulate “real world” signals. It is possible to integrate glitches, drift, noise and other anomalies on an arbitrary waveform that a device under test will encounter when it leaves the lab or manufacturing floor. We are able to generate arbitrary waveforms with CompactRIO hardware by taking advantage of an advanced functionality of the LabVIEW FPGA module, reading and writing to FPGA memory. This advanced functionality allows us to load large, unique waveforms to the FPGA memory and output the waveform according to a hardware-timed update clock. The tutorial and example program linked below outline the creation of an arbitrary waveform generator that uses the FPGA onboard memory.

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit