Chapter 4
Programming
NI PXIe-5450 User Manual
4-12
ni.com
C Example
Call the
niFgen_ConfigureChannels
function with
channels
set to the
channel or channels you want to configure. Valid values are non-negative
integers. For example, 0 is the only valid value on devices with one
channel, while devices with two channels support values of 0 and 1. You
can specify more than one channel by inserting commas between values
(for example, “0,1”).
Configure Output Mode
The Configure Output Mode step determines the type of waveforms that
will be generated by your device. Options include standard waveforms,
arbitrary waveforms, arbitrary sequences, frequency lists, and scripts.
Refer to the Features Supported topic for your device for more information
about the type of output modes it supports.
Configure Standard Function Mode
Standard Function output mode allows you to generate standard function
waveforms such as sine, square, triangle, etc.
LabVIEW Example
The procedure below provides the basic steps required to configure
Standard Function mode. For a more detailed example of the use of
Standard Function mode in LabVIEW, refer to the Fgen Basic Standard
Function.vi example for LabVIEW.
1.
Call the niFgen Configure Output Mode VI. Set
Output Mode
to
Standard Function.
2.
Choose the type of waveform you would like to generate and set the
Waveform
parameter of the niFgen Configure Standard Waveform VI
to the waveform you have chosen.
C Example
The procedure below provides the basic steps required to configure
Standard Function mode. For a more detailed example of the use of
Standard Function mode in C, refer to the BasicStandardFunction example
for CVI.
1.
Call the
niFgen_configureOutputMode
function. Set
outputMode
to
NIFGEN_VAL_OUTPUT_FUNC
.
2.
Choose the type of waveform you would like to generate and set the
waveform
parameter of the
niFgen_configureStandardWaveform
function to the waveform
you have chosen.