Continuously Reading to and Writing from an RTDX Channel
Overview
This tutorial describes how to send and receive buffers of data, like a waveform, to and from an RTDX channel.
Note: This tutorial uses the DSP Test Integration Toolkit, which is no longer officially supported by NI, but you can
download the VIs that were included in this toolkit.
Table of Contents
Continuously running RTDX VIs in LabVIEW
When communicating with a DSP device using RTDX, you may want to send continuous and complete buffers of data, not merely one point. Using RTDX provides you real-time response for DSP code behavior. To get real-time information from code, it is important that you keep the DSP code running and that the LabVIEW interface remains running. This can be accomplished by placing RTDX code inside a while loop. Continuously sending data using RTDX
With the RTDX tools provided by the DSP Test Integration Toolkit, you can send scalar or array values. Once you complete a single write to the specified RTDX channel, you can continue to update the RTDX channel by placing the RTDX VIs inside a while loop, as shown in Figure 1. Wire a Basic Function Generator (Functions>>Analyze>>Waveform Generation) to an RTDX Write Array VI for the appropriate data type and place that code inside a while loop to send a continuous signal, such as a sine wave, to an RTDX channel. The VI will send a continuous signal, each data set one after another. This functionality is utilized in the Gain example that ships with the toolkit.
You also can use the LabVIEW Point By Point VIs to send signals such as a sine wave directly to an RTDX channel one point at a time. You might see some distortion of the sine wave when implemented this way since the timing of each point in the sine wave is based on the software timing. In a windows operating system, this may not always be repeatable.
Continuously receiving data using RTDX
Receiving data continuously from an RTDX channel is very similar to writing data. Placing RTDX code in a while loop allows LabVIEW to continuously receive data from the specified RTDX channel. After the data is received, use LabVIEW Analysis VIs for any further signal processing, as shown in Figure 2.
Related Links:
LabVIEW DSP Test Integration Toolkit for TI DSP Evaluation Version
More Tutorials and Example Code
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). National Instruments does not support this tutorial or guarantee its quality in any way. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).


