RFmxInstr_CfgMechanicalAttenuation
- Updated2025-10-13
- 1 minute(s) read
Configures the mechanical attenuation and the RFmx driver attenuation hardware settings.
Syntax
int32 __stdcall RFmxInstr_CfgMechanicalAttenuation(niRFmxInstrHandle instrumentHandle, char channelName[], int32 mechanicalAttenuationAuto, float64 mechanicalAttenuationValue)
Remarks
Supported devices: PXIe-5663/5663E, PXIe-5665, PXIe-5668
Parameters
| Name | Direction | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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. | |||||||||
| mechanicalAttenuationAuto | [in] | int32 | This parameter specifies whether RFmx automatically chooses an attenuation setting based on the hardware settings. The default value is True.
| |||||||||
| mechanicalAttenuationValue | [in] | float64 | This parameter specifies the level of mechanical attenuation for the RF path. This value is expressed in dB. |
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 |