About Source Power Cal

getSourcePowerCalDataEx Method


Note: This method replaces getSourcePowerCalData Method

Retrieves (as variant data type) source power calibration data, if it exists, from the channel.

If the channel is sweeping the source backwards, then the first data point is the highest frequency value; the last data point is the lowest. Use the Get X-Axis Values command to return the X-axis values in the displayed order.

Note: This method returns a variant which is less efficient than methods available on the ISourcePowerCalData interface

 VB Syntax

data = chan.getSourcePowerCalDataEx (buffer, srcPort)


(Type) - Description


(variant) – Array to store the data.


(object) – A Channel object


(enum NASourcePowerCalBuffer) - The requested source power cal data buffer.

0 - naCorrectionValues  Last iteration of Cal data

1 - naPriorIterationCorrectionValues  Prior iteration of Cal data. This argument can be used to determine the final power reading at each point of the power cal, for a cal that did not pass tolerance limits.  

The following formula can be used to determine the power reading (in dB):

Power reading = Target power at the source port + specified power cal offset value + ‘prior’ iteration corr value – actual power corr value.

The "actual" value in this equation is returned with naCorrectionValues.


(long integer) – The source port for which calibration data is being requested.

Note: If the port is defined by a string name, such as an external source, a balanced port, or one of the Source 2 outputs on the 2-port 2-source PNA-x model, then you must use chan.getPortNumber to translate the string into a port number. To learn more see Remotely Specifying a Source Port.

Return Type

Variant array – automatically dimensioned to the size of the data.


Not Applicable


Dim varData As Variant
Const port1 As Long = 1
varData = chan.getSourcePowerCalDataEx (naCorrectionValues, port1)
'Print the data

For i = 0 to chan.NumberOfPoints - 1
Print varData(i)
Next i

C++ Syntax

HRESULT getSourcePowerCalDataEx(tagNASourcePowerCalBuffer bufSelect, long sourcePort, VARIANT *pData);



Last Modified:

March 17, 2010

Added Prior argument


Added note for string names


Updated for PNA-X source port names