niFgen_DefineUserStandardWaveform
ViStatus niFgen_DefineUserStandardWaveform (ViSession vi, ViConstString channelName, ViInt32 waveformSize, ViReal64[] waveformDataArray);
Purpose
Defines a user waveform for use in either Standard Function output mode 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 to generate different output voltages.
Note You must set outputMode to NIFGEN_VAL_OUTPUT_FUNC or NIFGEN_VAL_OUTPUT_FREQ_LIST using the niFgen_ConfigureOutputMode function before calling this function. |
Parameters
Input | ||
Name | Type | Description |
vi | ViSession | Identifies your instrument session. vi is obtained from the niFgen_init or the niFgen_InitWithOptions 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 arbitrary waveform you want to create.
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:
|