Chapter 4
Programming
©
National Instruments Corporation
4-15
NI PXIe-5450 User Manual
Choose one of the following two options for creating your arbitrary
sequence:
Option 1
—Allow NI-FGEN to configure the size and allocated space of
your waveform.
1.
Call the niFgen Create Waveform (poly) VI. This VI creates a
waveform the size of the data you provide.
2.
Call the niFgen Create Arbitrary Sequence VI or the niFgen Create
Advanced Arb Sequence VI.
3.
Call the niFgen Configure Arbitrary Sequence VI to configure the gain
and offset of the sequence of waveforms.
Option 2
—Manually configure the size and allocated space of your
waveform.
1.
Call the niFgen Allocate Waveform VI to specify the size of the
waveform to allocate in the onboard memory of the signal generator
2.
Call the niFgen Write Waveform (poly) VI to write waveform data to
the onboard memory you allocated in step 3.
3.
Call the niFgen Create Arbitrary Sequence VI or the niFgen Create
Advanced Arb Sequence VI.
4.
Call the niFgen Configure Arbitrary Sequence VI to configure the gain
and offset of the sequence of waveforms.
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 Sequence mode in C, refer to the BasicArbitrarySequence or the
ArbitrarySequence examples for CVI.
1.
Call the
niFgen_ConfigureOutputMode
function with
outputMode
to
NIFGEN_VAL_OUTPUT_SEQ
.
2.
(Optional) Call the
niFgen_ClearArbMemory
function to clear any
previously created arbitrary waveforms, sequences, and scripts 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.