Chapter 2
NI 5450 Overview
NI PXIe-5450 User Manual
2-20
ni.com
Tip
The flexibility to write waveform data to channels either separately or simultaneously
is especially useful when configuring applications for I/Q generation.
To write waveform data to an individual channel, begin by allocating space
for waveform data by calling the niFgen Allocate Waveform or niFgen
Allocate Named Waveform VI or the
niFgen_AllocateWaveform
or
niFgen_AllocateNamedWaveform
function. Once you have allocated
the waveform data, call the appropriate niFgen Write Waveform (poly) VI
or one of the niFgen Write Waveform functions with the
Channel Name
parameter set to “0” or “1” and the
Waveform Name
or
waveformHandle
parameter set to the name of the waveform previously allocated. You can
repeat these steps to write waveform data to another channel.
To write waveform data to both channels at once, you must first interleave
the data. Once the data is interleaved, call the niFgen Write Waveform
(poly) VI or one of the niFgen Write Waveform functions with the
Channel
parameter set to “0,1”.
Interleaved Waveform Data
In order to write data to multiple channels on the same device
simultaneously, the data must be interleaved.
Interleaved samples prioritize samples before channels, such that the array
lists the first sample from every channel in the task, then the second sample
from every channel, up to the last sample from every channel.
Note
When interleaved waveform data is allocated, one sample includes data on multiple
channels. Therefore, the allocation size of interleaved data, in bytes, is equal to (number of
channels being used)
×
(the number of samples on each channel)
×
2.
Channel 0—Sample 1
Channel 1—Sample 1
Channel 0—Sample 2
Channel 1—Sample 2
...
Channel 0—Sample
N
Channel 1—Sample
N