Chapter 4
Programming
NI PXIe-5450 User Manual
4-14
ni.com
C Example
The procedure below provides the basic steps required to configure
Arbitrary Waveform mode. For a more detailed example of the use of
Arbitrary Waveform mode in C, refer to the BasicArbitraryWaveform or
the ArbitraryWaveform examples for CVI.
1.
Call the
niFgen_ConfigureOutputMode
function with the
outputMode
parameter to
NIFGEN_VAL_OUTPUT_ARB
.
2.
(Optional) Call the
niFgen_ClearArbWaveform
function. This
clears any previously created arbitrary waveforms from the signal
generator memory.
3.
Call one of the niFgen Create Waveform functions
(
niFgen_CreateWaveformF64
,
niFgen_CreateWaveformI16
,
niFgen_CreateWaveformComplexF64
,
niFgen_CreateWaveformFromFileI16
, or
niFgen_CreateWaveformFromFileHWS
). The function you choose
creates a waveform the size and type of the data you choose.
4.
Call the
niFgen_ConfigureArbWaveform
function to configure the
gain and offset of the waveform.
Configure Arbitrary Sequence Mode
You can use Arbitrary Sequence mode to load multiple waveforms in the
onboard memory of the signal generator.
LabVIEW Example
The procedure below provides the basic steps required to configure
Arbitrary Sequence mode. For more detailed examples of the use of
Arbitrary Sequence mode in LabVIEW, refer to the
Fgen Basic Arb
Sequence.vi
or the
Fgen Arbitrary Sequence.vi
examples for
LabVIEW.
1.
Call the niFgen Configure Output Mode VI with
Output Mode
set to
Arbitrary Waveform.
2.
(Optional) Call the niFgen Clear Arbitrary Memory VI to clear any
previously created arbitrary waveforms, sequences, and scripts from
the signal generator memory.