niTuner_setAttenuation
Function Prototype
int niTuner_setAttenuation (int taskID, int refLevel, int mixerLevel, double *attenuation, double *scaleFactor);
Purpose
This function sets the RF signal attenuation to the specified mixer and reference levels. See the attenuation page for more information.
refLevel must be 50 dBm. mixerLevel must be 0 and (refLevel - 50 dBm). Set the levels in accordance with the following formula:
(reference level - 50) mixer level Min (reference level, 0 dBm) reference level
Note If new center frequencies of less than 15 MHz are specified after a call to this function, attenuation is automatically adjusted. This may add an additional 10 dB attenuation. See the attenuation page for more information. |
Parameters
Name | Type | Description |
taskID | int | The Task ID obtained from niTuner_init that identifies the session of a particular device. |
refLevel | int | Specifies the desired reference level for the RF input signal. See the attenuation page for more information. The default value is 0 dBm. |
mixerLevel | int | Specifies the desired mixer level for the RF input signal. A value greater than 1000 specifies that NI-TUNER automatically chooses a mixerLevel based on the specifed refLevel. Mixer levels influence noise and distortion factors:
|
attenuation | double * | Returns the actual attenuation applied to the original input signal in dB. |
scaleFactor | double * | Returns the scale factor. The scale factor is defined as the PXI-5600 input signal amplitude divided by the PXI-5600 output signal amplitude. |
Return Value
Returns the status of the function. To see an explanation of common error and warning codes, see Error and Status Codes. To see a text explanation of the status code, call niTuner_errorHandler.