RF Record and Playback Reference Example for LabWindows/CVI
Overview
This example demonstrates streaming RF data to and from disk using the Win32 API in the LabWindows/CVI environment.
Downloads
Filename: rf_record_playback_cvi.zip
This example program demonstrates the NI PXI-5661 and PXIe-5663 streaming baseband IQ data to disk and the PXIe-5672 and PXIe-5673 streaming baseband IQ from disk.
This example is not supported on PXI-5660, PXI-5670 or PXI-5671.
Maximum IQ rate is system dependant and is limited by bus, hard drive and processor speed. Using both playback and recording functionality at the same time is not supported.
Minimum Required Software:
LabWindows/CVI 8.0
Spectral Measurements Toolkit 2.3
NI-RFSA 2.1
NI-RFSG 1.4
This program makes use of CVI multi-thread functions to spawn producer and consumer threads. The producer reads data from file in the Playback use case or from a Vector Signal Analyzer in the Record use case and then passes it to a shared memory buffer.
The consumer thread reads the data from the buffer and writes it to disk in the Record use case or writes it to a Vector Signal Generator in the Playback use case.
When recording data to a file the application also saves an .ini file at the same path with configuration data that adjusts the VSG gain to play waveforms at the same level they were recorded at.
When playing back a file select 'Use saved .ini file for parameters' to use the saved configuration data. The .ini file must be in the same directory as the recorded binary file.
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM 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/).
