Configures the Reference Clock and the frequency reference source.

Syntax

int32 __stdcall RFmxDemod_CfgFrequencyReference(niRFmxInstrHandle instrumentHandle, char channelName[], char frequencyReferenceSource[], float64 frequencyReferenceFrequency)

Remarks

This function is a wrapper over the RFmx Instruments API, and calls the RFmxInstr_CfgFrequencyReference function.

Parameters

NameDirectionTypeDescription
instrumentHandle[in]niRFmxInstrHandle

Identifies the RFmx session. You can obtain this parameter from the RFmxDemod_Initialize function.

channelName[in]char[]

Set this parameter to "" (empty string) or NULL.

frequencyReferenceSource[in]char[]

Specifies the frequency reference source.

Value

Description

RFMXDEMOD_VAL_ONBOARD_CLOCK_STR ("Onboard Clock")

PXIe-5663/5663E: The RFmx driver locks the PXIe-5663/5663E to the PXIe-5652 LO source onboard clock. Connect the REF OUT2 connector (if it exists) on the PXIe-5652 to the PXIe-5622 CLK IN terminal. On versions of the PXIe-5663/5663E that lack a REF OUT2 connector on the PXIe-5652, connect the REF IN/OUT connector on the PXIe-5652 to the PXIe-5622 CLK IN terminal.
PXIe-5665: The RFmx driver locks the PXIe-5665 to the PXIe-5653 LO source onboard clock. Connect the 100 MHz REF OUT terminal on the PXIe-5653 to the PXIe-5622 CLK IN terminal.
PXIe-5644R/5645R/5646R, PXIe-5840: The RFmx driver locks the device to its onboard clock.

RFMXDEMOD_VAL_REF_IN_STR ("RefIn")

PXIe-5663/5663E: Connect the external signal to the PXIe-5652 REF IN/OUT connector. Connect the REF OUT2 connector (if it exists) on the PXIe-5652 to the PXIe-5622 CLK IN terminal.
PXIe-5665: Connect the external signal to the PXIe-5653 REF IN connector. Connect the 100 MHz REF OUT terminal on the PXIe-5653 to the PXIe-5622 CLK IN connector. If your external clock signal frequency is set to a frequency other than 10 MHz, set the frequencyReferenceFrequency parameter according to the frequency of your external clock signal.
PXIe-5644R/5645R/5646R, PXIe-5840: The RFmx driver locks the device to the signal at the external REF IN connector.

RFMXDEMOD_VAL_PXI_CLK_STR ("PXI_Clk")

PXIe-5644R/5645R/5646R, PXIe-5663/5663E/5665, PXIe-5840: The RFmx driver locks the PXIe-5644R/5645R/5646R, PXIe-5663/5663E/5665 to the PXI backplane clock.

RFMXDEMOD_VAL_CLK_IN_STR ("ClkIn")

PXIe-5663/5663E: The RFmx driver locks the PXIe-5663/5663E to an external 10 MHz signal. Connect the external signal to the PXIe-5622 CLK IN connector, and connect the PXIe-5622 CLK OUT connector to the FREQ REF IN connector on the PXIe-5652.
PXIe-5665: The RFmx driver locks the PXIe-5665 to an external 100 MHz signal. Connect the external signal to the PXIe-5622 CLK IN connector, and connect the PXIe-5622 CLK OUT connector to the REF IN connector on the PXIe-5653. Set the frequencyReferenceFrequency parameter to 100 MHz.
PXIe-5644R/5645R/5646R, PXIe-5840: This configuration does not apply to the PXIe-5644R/5645R/5646R.

frequencyReferenceFrequency[in]float64

Specifies the Reference Clock rate, in Hz, when the frequencyReferenceSource parameter is set to RFMXDEMOD_VAL_CLK_IN_STR or RFMXDEMOD_VAL_REF_IN_STR.

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 RFmxDemod_GetError function.

The general meaning of the status code is as follows:

Value

Meaning

0

Success

Positive Values

Warnings

Negative Values

Errors