From 7:00 PM CST Friday, January 24th - 7:00 PM CST Sunday, January 26th, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Streaming Waveform Data

NI RF Signal Generators Help (NI-RFSG 18.1)

Edition Date: June 2018
Part Number: 371025V-01
View Product Info

Download Help (Windows Only)

NI-RFSG 18.1 Help
NI-RFSG 18.2.1 Help
NI-RFSG 19.1 Help

The following instructions are a guide for configuring your application for streaming. For a programmatic example, refer to RFSG Arbitrary Waveform for LabVIEW or ArbitraryWaveformStreaming.prj for LabWindows/CVI, available using the NI Example Finder.

As an example, we have a 1.6 GB waveform we want to generate and an NI arbitrary waveform generator with 256 MB of onboard memory. This 1.6 GB waveform may be in the host memory, on disk, or data that your application generates dynamically during generation.

  1. Identify the streaming waveform—Set the Streaming Waveform Name property or the NIRFSG_ATTR_STREAMING_WAVEFORM_NAME attribute. Setting this property or attribute ensures that none of your streaming data is overwritten before it is generated. NI-RFSG monitors your progress to ensure that you write fresh data fast enough to keep up with the generation. If your application fails to keep up or attempts to write fresh data over data that has not been generated, NI-RFSG returns an error.

  2. Specify the amount of onboard memory to be used for streaming—Call the niRFSG Allocate Arb Waveform VI or the niRFSG_AllocateArbWaveform function to specify the amount of onboard memory to reserve for streaming. The allocated memory, known as the streaming waveform, serves as a buffer for the streaming process. The size of the waveform you wish to stream must be evenly divisible by the amount of onboard memory allocated for streaming to prevent the streaming waveform from being overwritten before it has generated.

  3. Fill the streaming waveform with initial data—Call the niRFSG Write Arb Waveform VI or the niRFSG_WriteArbWaveform function to write the first part of the waveform data to the streaming waveform in onboard memory.
Tip     When transferring large blocks of waveform data, break the data into smaller blocks and call the niRFSG Write Arb Waveform VI or the niRFSG_WriteArbWaveform function multiple times. The data is appended sequentially. A computer can allocate smaller blocks of a large waveform faster than allocating a single large contiguous block in memory. Depending on the amount of RAM on the computer, transferring ten 16 MB blocks may be faster than transferring one 160 MB block.

  1. Begin generating the waveform—Call the niRFSG Initiate VI or the niRFSG_Initiate function to begin the waveform generation. As the waveform generates, space in the streaming waveform becomes free.

  2. (Optional) Monitor available memory as the waveform generates—Use the Space Available in Streaming Waveform property or the NIRFSG_ATTR_STREAMING_SPACE_AVAILABLE_IN_WAVEFORM attribute to determine how much of the streaming waveform is free for writing new data. As the waveform generates, space becomes available to write more waveform data.

  1. Write a block of waveform data—Call the niRFSG Write Arb Waveform VI or the niRFSG_WriteArbWaveform function to write a new block of waveform data to the streaming waveform in onboard memory.

    If the size of the new block of waveform data is larger than the space available, NI-RFSG waits until sufficient space becomes available or the streaming write time expires. Use the Streaming Write Timeout property or the NIRFSG_ATTR_STREAMING_WRITE_TIMEOUT attribute to change the streaming write time.

  2. Repeat steps 5 and 6 until all waveform data is written.

Average Performance Rates

The following table lists the average data rates possible for PXI Express RF signal generators. Average data transfer rates are highly system dependent. The following table is intended to give you an idea of the average sustainable transfer rates using 16-bit (or 2 byte) samples.

Data Source Data Rate (MB/s) *
Host memory on desktop computer or PXI embedded controller ~524
Desktop IDE or SATA hard drive ~310
* All data rates highly dependent on chipset.
These numbers were obtained using several file I/O optimizations. For more information about this streaming process, refer to Stream to Disk Using Win32 File IO.

Related Topics

NI-RFSG Examples

Improving Streaming Performance


Not Helpful