Skip to content

NI RFmx Instruments Calibration

Alex Starche edited this page Mar 1, 2022 · 2 revisions

Calibration

RFmxInstr_SelfCalibrate

int32 __stdcall RFmxInstr_SelfCalibrate( niRFmxInstrHandle instrumentHandle, char selectorString[], int32 stepsToOmit );

Purpose

Self-calibrates the NI-RFSA device and associated modules that support self-calibration. If self-calibration completes successfully, the new calibration constants are stored immediately in the nonvolatile memory of the module. On a MIMO session, this VI self-calibrates all NI-RFSA devices and associated modules that support self-calibration. Refer to the specifications document for your device for more information about how often to self-calibrate. For more information about Self Calibrate, refer to the niRFSA Self Cal function topic for your device in the NI RF Vector Signal Analyzers Help.

Note For PXIe-5644/5645/5646, RFmx internally closes the RFSA session, performs self-calibration and opens a new session for the same device. If the RFSA session has been accessed from RFmx, using the RFmxInstr_GetNIRFSASession function before calling the RFmxInstr_SelfCalibrate function, the RFSA session will become invalid upon calling the RFmxInstr_SelfCalibrate function.
Supported devices: PXIe-5663/5663E/5665/5668, PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841

Parameters

Input
Name Type Description
instrumentHandle niRFmxInstrHandle Identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.
selectorString char[] Specify an empty string as the value of this parameter.
stepsToOmit int32 Specifies which calibration steps to skip during the self-calibration process. The default value is an empty array, which indicates that all calibration steps are performed. The only valid value for PXIe-5820/5830/5831/5832/5840/5841 is an empty array.
RFMXINSTR_VAL_SELF_CAL_STEP_PRESELECTOR_ALIGNMENT (1) Omits the Preselector Alignment step. If you omit this step and the niRFSA Is Self Cal Valid VI indicates the calibration data for this step is invalid, the preselector alignment specifications are not guaranteed. This step applies only to the PXIe-5605/5606.
RFMXINSTR_VAL_SELF_CAL_STEP_GAIN_REFERENCE (2) Omits the Gain Reference step. If you omit this step and the niRFSA Is Self Cal Valid VI indicates the calibration data for this step is invalid, the absolute accuracy of the device is not guaranteed.
RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS (4) Omits the IF Flatness step. If you omit this step and the niRFSA Is Self Cal, valid VI indicates the calibration data for this step is invalid, the IF flatness specifications are not guaranteed.
RFMXINSTR_VAL_SELF_CAL_STEP_DIGITIZER_SELF_CAL (8) Omits the Digitizer Self Cal step. If you omit this step and the niRFSA Is Self Cal Valid VI indicates the calibration data for this step is invalid, the absolute accuracy of the device is not guaranteed.
RFMXINSTR_VAL_SELF_CAL_STEP_LO_SELF_CAL (10) Omits the LO Self Cal step. If you omit this step and the niRFSA Is Self Cal Valid VI indicates the calibration data for this step is invalid, the LO PLL may fail to lock.
RFMXINSTR_VAL_SELF_CAL_STEP_AMPLITUDE_ACCURACY (20) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_RESIDUAL_LO_POWER (40) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_IMAGE_SUPPRESSION (80) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_SYNTHESIZER_ALIGNMENT (100) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_DC_OFFSET (200) Not used by this function.

Return Value

Name Type Description
status int32 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

RFmxInstr_SelfCalibrateRange

int32 __stdcall RFmxInstr_SelfCalibrateRange( niRFmxInstrHandle instrumentHandle, char selectorString[], int32 stepsToOmit, float64 minimumFrequency, float64 maximumFrequency, float64 minimumReferenceLevel, float64 maximumReferenceLevel );

Purpose

Self-calibrates all configurations within the specified frequency and reference level limits. If there is an open session for NI-RFSG for your device, it may remain open but cannot be used while this function runs. NI recommends that no external signals are present on the RF In port while the calibration is taking place. For more information about Self Calibrate Range, refer to the niRFSA Self Calibrate Range function topic for your device in the NI RF Vector Signal Analyzers Help. On a MIMO session, this function self-calibrates all NI-RFSA devices and associated modules that support self-calibration.

Supported devices: PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841

Note This function does not update self-calibration date and temperature. Self-calibration range data is not saved to your device if you restart the system.

Parameters

Input
Name Type Description
instrumentHandle niRFmxInstrHandle Identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.
selectorString char[] Specify an empty string as the value of this parameter.
stepsToOmit int32 Specifies which calibration steps to skip during the self-calibration process. The default value is an empty array, which indicates that all calibration steps are performed.
RFMXINSTR_VAL_SELF_CAL_STEP_PRESELECTOR_ALIGNMENT (1) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_GAIN_REFERENCE (2) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS (4) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_DIGITIZER_SELF_CAL (8) Not used by this function.
RFMXINSTR_VAL_SELF_CAL_STEP_LO_SELF_CAL (10) Omits the LO Self Cal step. If you omit this step and the niRFSA Is Self Cal Valid VI indicates the calibration data for this step is invalid, the LO PLL may fail to lock.
RFMXINSTR_VAL_SELF_CAL_STEP_AMPLITUDE_ACCURACY (20) Omits the Amplitude Accuracy step. If you omit this step, the absolute accuracy of the device is not adjusted.
RFMXINSTR_VAL_SELF_CAL_STEP_RESIDUAL_LO_POWER (40) Omits the Residual LO Power step. If you omit this step, the Residual LO Power performance is not adjusted.
RFMXINSTR_VAL_SELF_CAL_STEP_IMAGE_SUPPRESSION (80) Omits the Image Suppression step. If you omit this step, the Residual Sideband Image performance is not adjusted.
RFMXINSTR_VAL_SELF_CAL_STEP_SYNTHESIZER_ALIGNMENT (100) Omits the VCO Alignment step. If you omit this step, the LO PLL will not get adjusted.
RFMXINSTR_VAL_SELF_CAL_STEP_DC_OFFSET (200) Omits the DC Offset step.
minimumFrequency float64 Specifies the minimum frequency for the custom self calibration range. This value is expressed in Hz.
Note: For the PXIe-5830/5831/5832, only the applicable ports within the specified frequency range are calibrated.
maximumFrequency float64 Specifies the maximum frequency for the custom self calibration range. This value is expressed in Hz.
minimumReferenceLevel float64 Specifies the minimum reference level for the custom self calibration range. This value is expressed in dBm.
maximumReferenceLevel float64 Specifies the maximum reference level for the custom self calibration range. This value is expressed dBm.

Return Value

Name Type Description
status int32 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

RFmxInstr_IsSelfCalibrateValid

int32 __stdcall RFmxInstr_IsSelfCalibrateValid( niRFmxInstrHandle instrumentHandle, char selectorString[], int32* selfCalibrateValid, int32* validSteps );

Purpose

Indicates calibration steps that contain valid calibration data. To omit steps with valid calibration data from self-calibration, you can pass the Valid Steps parameter to the Steps To Omit parameter of the RFmx_SelfCalibrate function. On a MIMO session, use the Selector String parameter to get the self-calibration validity for a specific MIMO port.

Supported Devices: PXIe-5663/5663E/5665/5668

Parameters

Input
Name Type Description
instrumentHandle niRFmxInstrHandle Identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.
selectorString char[]

Specifies a Selector String comprising of a MIMO port on a MIMO session.


example:
""
"port::myrfsa1/0"

You can use the RFmxInstr_BuildPortString2 function to build the selector string.

selfCalibrateValid int32* Returns true if all the calibration data is valid and false if any of the calibration data is invalid.
validSteps int32* Returns valid steps. Note: If two or more calibration steps are valid, this parameter returns a bitwise-OR combination of the calibration steps. For example, if both RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS and RFMXINSTR_VAL_SELF_CAL_STEP_LO_SELF_CAL steps are valid, RFmx returns the following value: RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS
RFMXINSTR_VAL_SELF_CAL_STEP_PRESELECTOR_ALIGNMENT (1) Indicates the Preselector Alignment calibration data is valid. This step generates coefficients to align the preselector across the frequency range for your device.
RFMXINSTR_VAL_SELF_CAL_STEP_GAIN_REFERENCE (2) Indicates the Gain Reference calibration data is valid. This step measures the changes in gain since the last external calibration was run.
RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS (4) Indicates the IF Flatness calibration data is valid. This step measures the IF response of the entire system for each of the supported IF filters.
RFMXINSTR_VAL_SELF_CAL_STEP_DIGITIZER_SELF_CAL (8) Indicates the Digitizer Self Cal calibration data is valid. This step calls for digitizer self-calibration if the digitizer is associated with the RF downconverter.
RFMXINSTR_VAL_SELF_CAL_STEP_LO_SELF_CAL (10) Indicates the LO Self Cal calibration data is valid. This step calls for LO self-calibration if the LO source module is associated with the RF downconverter.

Return Value

Name Type Description
status int32 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

Calibration Utility

RFmxInstr_GetSelfCalibrateLastDateAndTime

int32 __stdcall RFmxInstr_GetSelfCalibrateLastDateAndTime( niRFmxInstrHandle instrumentHandle, char selectorString[], int64 selfCalibrateStep, CVIAbsoluteTime* timestamp );

Purpose

Returns the date and time of the last successful self-calibration. On a MIMO session, use the Selector String parameter to get the last successful self-calibration date and time for a specific MIMO port.

Supported Devices: PXIe-5644/5645/5646, PXIe-5663/5663E/5665/5668, PXIe-5820/5830/5831/5832/5840/5841

Note For PXIe-5644/5645/5646 devices, you must select RFMXINSTR_VAL_SELF_CAL_STEP_IMAGE_SUPPRESSION for the selfCalibrateStep parameter.

Parameters

Input
Name Type Description
instrumentHandle niRFmxInstrHandle Identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.
selectorString char[]

Specifies a Selector String comprising of a MIMO port on a MIMO session.


example:
""
"port::myrfsa1/0"

You can use the RFmxInstr_BuildPortString2 function to build the selector string.

selfCalibrateStep int64 Specifies the self-calibration step to query for the last successful self-calibration date and time data.
RFMXINSTR_VAL_SELF_CAL_STEP_PRESELECTOR_ALIGNMENT (1) Selects the Preselector Alignment self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_GAIN_REFERENCE (2) Selects the Gain Reference self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS (4) Selects the IF Flatness self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_DIGITIZER_SELF_CAL (8) Selects the Digitizer Self Cal self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_LO_SELF_CAL (10) Selects the LO Self Cal self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_AMPLITUDE_ACCURACY (20) Selects the Amplitude Accuracy self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_RESIDUAL_LO_POWER (40) Selects the Residual LO Power self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_IMAGE_SUPPRESSION (80) Selects the Image Suppression self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_SYNTHESIZER_ALIGNMENT (100) Selects the Synthesizer Alignment self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_DC_OFFSET (200) Selects the DC Offset self-calibration step.
Output
Name Type Description
timestamp CVIAbsoluteTime* Returns the date and time of the last successful self-calibration in the NI-BTF format. Use the utility functions RFmxInstr_ValuesFromTimestamp or RFmxInstr_TimestampFromValues to convert to or from seconds.

Return Value

Name Type Description
status int32 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

RFmxInstr_GetSelfCalibrateLastTemperature

int32 __stdcall RFmxInstr_GetSelfCalibrateLastTemperature( niRFmxInstrHandle instrumentHandle, char selectorString[], int64 selfCalibrateStep, float64* temperature );

Purpose

Returns the temperature at the last successful self-calibration. On a MIMO session, use the Selector String parameter to get the last successful self-calibration temperature for a specific MIMO port.

Supported Devices: PXIe-5644/5645/5646, PXIe-5663/5663E/5665/5668, PXIe-5820/5830/5831 (IF only)/5832 (IF only)/5840/5841

Note For PXIe-5644/5645/5646 devices, you must select RFMXINSTR_VAL_SELF_CAL_STEP_IMAGE_SUPPRESSION for the selfCalibrateStep parameter.

Parameters

Input
Name Type Description
instrumentHandle niRFmxInstrHandle Identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.
selectorString char[]

Specifies a Selector String comprising of a MIMO port on a MIMO session.


example:
""
"port::myrfsa1/0"

You can use the RFmxInstr_BuildPortString2 function to build the selector string.

selfCalibrateStep int64 Specifies the self-calibration step to query for the last successful self-calibration temperature data.
RFMXINSTR_VAL_SELF_CAL_STEP_PRESELECTOR_ALIGNMENT (1) Selects the Preselector Alignment self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_GAIN_REFERENCE (2) Selects the Gain Reference self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_IF_FLATNESS (4) Selects the IF Flatness self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_DIGITIZER_SELF_CAL (8) Selects the Digitizer Self Cal self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_LO_SELF_CAL (10) Selects the LO Self Cal self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_AMPLITUDE_ACCURACY (20) Selects the Amplitude Accuracy self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_RESIDUAL_LO_POWER (40) Selects the Residual LO Power self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_IMAGE_SUPPRESSION (80) Selects the Image Suppression self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_SYNTHESIZER_ALIGNMENT (100) Selects the Synthesizer Alignment self-calibration step.
RFMXINSTR_VAL_SELF_CAL_STEP_DC_OFFSET (200) Selects the DC Offset self-calibration step.
Output
Name Type Description
temperature float64* Returns the temperature at the last self-calibration. This value is expresed in degree Celsius.

Return Value

Name Type Description
status int32 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

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