niRFSA_GetDeembeddingSparameters
- Updated2025-10-14
- 2 minute(s) read
Returns the S-parameters used for de-embedding a measurement on the selected port.
Syntax
ViStatus _VI_FUNC niRFSA_GetDeembeddingSparameters(ViSession vi, ni complex number f64 *sparameters, ViInt32 sparametersArraySize, ViInt32 *numberOfSparameters, ViInt32 *numberOfPorts)
Remarks
This includes interpolation of the parameters based on the configured carrier frequency. This function returns an empty array if no de-embedding is done.
If you want to call this function just to get the required buffer size, you can pass 0 for S-parameter Size and VI_NULL for the S-parameters buffer.
The port orientation for the returned S-parameters is normalized to NIRFSA_VAL_PORT2_TOWARDS_DUT.
Supported Devices: PXIe-5830/5831/5832/5840/5841/5842/5860
Parameters
| Name | Direction | Type | Description |
|---|---|---|---|
| vi | [in] | ViSession | Identifies your instrument session. vi is obtained from the niRFSA_Init or niRFSA_InitWithOptions function. |
| sparameters | [out] | ni complex number f64 * | Returns an array of S-parameters. The S-parameters are returned in the following order: s11, s12, s21, s22. |
| sparametersArraySize | [in] | ViInt32 | Specifies the size of the array that is returned by the sparameters output. |
| numberOfSparameters | [out] | ViInt32 * | Returns the number of S-parameters. |
| numberOfPorts | [out] | ViInt32 * | Returns the number of S-parameter ports. The sparameter array is always n x n, where span n is the number of ports. |
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 NI-RFSA 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 niRFSA_GetError function. To clear the error information from NI-RFSA, call the niRFSA_ClearError function. The general meaning of the status code is as follows:
Value | Meaning |
|---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |