Configures the nominal attenuation and the RFmx driver setting.

Syntax

int32 __stdcall RFmxInstr_CfgRFAttenuation(niRFmxInstrHandle instrumentHandle, char channelName[], int32 rfAttenuationAuto, float64 rfAttenuationValue)

Remarks

Supported devices: PXIe-5663/5663E, PXIe-5665, PXIe-5668

Parameters

NameDirectionTypeDescription
instrumentHandle[in]niRFmxInstrHandle

This parameter identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.

channelName[in]char[]

This parameter specifies a Selector String comprising of the signal name. You do not need to use a selector string, if you want to configure this parameter for all signal instances.

Example:

"signal::sig1"

You can use the personality specific Build String function to build the selector string.

rfAttenuationAuto[in]int32

This parameter specifies whether RFmx computes the RF attenuation.

If you set this parameter to True, RFmx automatically chooses an attenuation setting based on the reference level configured on the personality.

The default value is True.

Name

Value

Description

RFMXINSTR_VAL_RF_ATTENUATION_AUTO_FALSE

0 (0x0)

Specifies that the RFmx driver uses the value configured using RFMXINSTR_ATTR_RF_ATTENUATION_VALUE attribute.

RFMXINSTR_VAL_RF_ATTENUATION_AUTO_TRUE

1 (0x1)

Specifies that the RFmx driver computes the RF attenuation.

rfAttenuationValue[in]float64

This parameter specifies the nominal attenuation setting for all attenuators before the first mixer in the RF signal chain. This value is expressed in dB.

If you set the RF Attenuation Auto parameter to True, RFmx chooses an attenuation setting automatically.

Returns

Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. Examine the status code from each call to an RFmx function to determine if an error has occurred.

To obtain a text description of the status code and additional information about the error condition, call the RFmxInstr_GetError function.

The general meaning of the status code is as follows:

Value

Meaning

0

Success

Positive Values

Warnings

Negative Values

Errors