Skip to content

NI FGEN Configure Onboard Signal Processing Functions

Palash Khare edited this page Jun 3, 2021 · 1 revision

Configure Onboard Signal Processing Functions

niFgen_ConfigureCustomFIRFilterCoefficients

ViStatus niFgen_ConfigureCustomFIRFilterCoefficients (ViSession vi, ViConstString channelName, ViInt32 numberofCoefficients, ViReal64[] coefficientsArray);

Purpose

Sets the FIR filter coefficients used by the onboard signal processing block. The values are coerced to the closest settings achievable by the signal generator.

Refer to the FIR Filter topic for your device in the NI Signal Generators Help for more information about FIR filter coefficients. This function is supported only for the NI 5441.

Note:  The signal generator must not be in the Generating state when you call this function.

Parameters

Input
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 configure the operation mode.

Defined Value: "0"

numberofCoefficients ViInt32 Specifies the number of coefficients. The NI 5441 requires 95.
coefficientsArray ViReal64[] Specifies the array of data the onboard signal processor uses for the FIR filter coefficients. For the NI 5441, provide a symmetric array of 95 coefficients to this parameter. The array must have at least as many elements as the value that you specify in the numberOfCoefficients parameter in this function.

The coefficients should range between –1.00 and +1.00.

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

niFgen_GetFIRFilterCoefficients

ViStatus niFgen_GetFIRFilterCoefficients (ViSession vi, ViConstString channelName, ViInt32 arraySize, ViReal64[] coefficientsArray, ViInt32* numberofCoefficientsRead);

Purpose

Returns the FIR filter coefficients used by the onboard signal processing block. These coefficients are determined by NI-FGEN and based on the FIR filter type and corresponding attribute (Alpha, Passband, BT) unless you are using the custom filter. If you are using a custom filter, the coefficients returned are those set with the niFgen_ConfigureCustomFIRFilterCoefficients function coerced to the quantized values used by the device.

To use this function, first call an instance of the niFgen_GetFIRFilterCoefficients function with the coefficientsArray parameter set to VI_NULL. Calling the function in this state returns the current size of the coefficientsArray as the value of the numberOfCoefficientsRead parameter. Create an array of this size, and call the niFgen_GetFIRFilterCoefficients function a second time, passing the new array as the coefficientsArray parameter and the size as the arraySize parameter. This second function call populates the array with the FIR filter coefficients.

Refer to the FIR Filter topic for your device in the NI Signal Generators Help for more information about FIR filter coefficients. This function is supported only for the NI 5441.

Default Value: None

Parameters

Input
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 configure the operation mode.

Defined Value: "0"

arraySize ViInt32 Specifies the size of the coefficient array
coefficientsArray ViReal64[] Specifies the array of data the onboard signal processor uses for the FIR filter coefficients. For the NI 5441, provide a symmetric array of 95 coefficients to this parameter. The array must have at least as many elements as the value that you specify in the numberOfCoefficients parameter in this function.

The coefficients should range between –1.00 and +1.00.
numberofCoefficientsRead ViInt32[] Specifies the array of data containing the number of coefficients you want to read.

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

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally