RFmxVNA_SParamsFetchYData
- Updated2025-04-08
- 2 minute(s) read
Fetches the S-Parameter data for all RFMXVNA_ATTR_SPARAMS_FORMAT types.
Syntax
int32 __stdcall RFmxVNA_SParamsFetchYData(niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, float32 y1[], float32 y2[], int32 arraySize, int32 *actualArraySize)
Remarks
Use "sparam<n>" as the selector string to read results from this function.
For different RFMXVNA_ATTR_SPARAMS_FORMAT, the data is returned as follows:
SParam Format | Y1 | Y2 |
---|---|---|
Magnitude (0) | Magnitude of the S-Parameter data | Empty array |
Phase (1) | Phase of the S-Parameter data | Empty array |
Complex (2) | Real part of the complex S-Parameter data | Imaginary part of the complex S-Parameter data |
SWR (3) | Standing wave ratio computed from the S-Parameter data | Empty array |
Smith Impedance (4) | Real part of the complex impedance computed from the S-Parameter data | Imaginary part of the complex impedance computed from the S-Parameter data |
Smith Admittance (5) | Real part of the complex admittance computed from the S-Parameter data | Imaginary part of the complex admittance computed from the S-Parameter data |
Polar (6) | Magnitude of the S-Parameter data | Phase of the S-Parameter data |
Parameters
Name | Direction | Type | Description |
---|---|---|---|
instrumentHandle | [in] | niRFmxInstrHandle | This parameter specifies the RFmx session refnum. |
selectorString | [in] | char | This parameter specifies a selector string comprising of the signal name, result name, and S-Parameter number. If you do not specify the signal name, the default signal instance is used. If you do not specify the result name, the default result instance is used. Example: You can use the RFmxVNA_BuildSParameterString function to build the selector string. |
timeout | [in] | float64 | This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement.A value of -1 specifies that the function waits until the measurement is complete. The default value is 10. |
y1 | [out] | float32 | This parameter returns Y1 data array. You can refer to the function description for interpreting Y data based on RFMXVNA_ATTR_SPARAMS_FORMAT type. |
y2 | [out] | float32 | This parameter returns Y2 data array. You can refer to the function description for interpreting Y data based on RFMXVNA_ATTR_SPARAMS_FORMAT type. |
arraySize | [in] | int32 | Specifies the size of the array. Set the arraySize parameter to 0 to get the size of all the arrays in the actualArraySize parameter. |
actualArraySize | [out] | int32 * | Returns the actual size of the array, if you pass NULL to all output array parameters, and set the arraySize parameter to 0. |
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 RFmxVNA_GetError function.
The general meaning of the status code is as follows:
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |