Use an Existing Power Cal During an SMC Cal

This example shows how to use an existing Source Power Cal instead of the power cal that is performed during an SMC calibration. To run this program without modification, you need the following:

Error Messages

This VBScript (*.vbs) program can be run as a macro in the PNA. To do this, copy the following code into a text editor file such as Notepad and save on the PNA hard drive as SMC.vbs. Learn how to setup and run the macro.

See Also

SMC Type Object

ImportDataSet Method

See Other COM Example Programs

Dim App

Set App = CreateObject("AgilentPNA835x.Application")


Dim Meas

Set Meas = App.ActiveMeasurement


App.CreateCustomMeasurementEx 1, "Scalar Mixer/Converter","SC21"

'Other valid strings that can be specified to create a measurement with a parameter

'other than'"SC21" are: "S11", "S22", "IPwr", and "OPwr"

Set Meas = App.ActiveMeasurement

'You can perform mixer setup here or

'recall a previous mixer setup from the PNA Hard drive.

' This is how the mixer could be configured through the IMixer interface

Dim mix

Set mix = Meas  ' reference to IMixer object

mix.ActiveXAxisRange = 0  ' 0 = mixINPUT (Input frequency range)

' Alternatively, recall a previous mixer setup from the PNA Hard drive

Meas.LoadFile "c:\users\public\network analyzer\documents/Mixer/MyMixer.mxr"

app.activechannel.numberofpoints = 21

Dim CalMgr

Set CalMgr = App.GetCalManager


Set SMC = CalMgr.CreateCustomCal("SMC")

SMC.Initialize 1, 1

SMC.ConnectorType(1) = "APC 3.5 male"

SMC.ConnectorType(2) = "APC 3.5 female"

SMC.CalKitType(1) = "N4691-60004 ECal"

SMC.CalKitType(2) = "N4691-60004 ECal"

' Import power cal data from an existing SMC calset.


'Omit the isolation part of the 2-port cal (default behavior).

SMC.OmitIsolation = 1

'Turn on auto orientation for the ECal (default behavior).

SMC.AutoOrient = 1

Dim steps

steps = SMC.GenerateSteps

For i = 1 To steps

  MsgBox SMC.GetStepDescription(i)

  SMC.AcquireStep i


Dim calset

calset = SMC.GenerateErrorTerms

Msgbox("SMC Cal Complete!")

Last Modified:


Updated for A.09.33


Added error msg notes