NI Signal Generators Help (NI-FGEN 18.1)

Edition Date: April 2018

Part Number: 370524V-01

»View Product Info
Download Help (Windows Only)

ViStatus niFgen_DefineUserStandardWaveform (ViSession vi, ViConstString channelName, ViInt32 waveformSize, ViReal64[] waveformDataArray);


Defines a user waveform for use in either Standard Function or Frequency List output mode.

To select the waveform, set the waveform parameter to NIFGEN_VAL_WFM_USER with either the niFgen_ConfigureStandardWaveform or the niFgen_CreateFreqList function.

The waveform data must be scaled between –1.0 and 1.0. Use the amplitude parameter in the niFgen_ConfigureStandardWaveform function to generate different output voltages.

Note  You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_FUNC or NIFGEN_VAL_OUTPUT_FREQ_LIST before calling this function.


Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString Specifies the channel name for which you want to define a user standard waveform.

Default Value: "0"

waveformSize ViInt32 Specifies the size of the waveform in samples.

Default Value: 16384
waveformDataArray ViReal64[] Specifies the array of data you want to use for the new arbitrary waveform. The array must have at least as many elements as the value that you specify in waveformSize.

You must normalize the data points in the array to be between –1.00 and +1.00.

Default Value: None

Return Value

Name Type Description
status ViStatus Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You can examine the status code from each call to an NI-FGEN function to determine if an error occurred. To obtain a text description of the status code, call the niFgen_error_message function. To obtain additional information about the error condition, call the niFgen_GetError function. To clear the error information from NI-FGEN, call the niFgen_ClearError function.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


Not Helpful