Perform a Simple Source Power Cal

M9370A / M9371A / M9372A / M9374A / M9375A

Perform a Simple Source Power Cal


This example performs a Source Power Cal using ONE USB Power Sensor, already connected to the PNA.

A measurement must first be set up with desired frequency range, power, and so forth, ready to be calibrated.

The SCPI commands in this example are sent over a COM interface using the SCPIStringParser object. You do NOT need a GPIB connection to run this example.

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 it on the PNA hard drive as spc.vbs.

Learn how to setup and run the macro.

See Source Power Cal SCPI commands

See Other SCPI Example Programs

'Performs a source power cal on channel 1 - port 1 using a USB power sensor

'This example assumes ONE USB power sensor is connected to the PNA

Dim app

Dim scpi

Dim sensor

' Create / Get the PNA application.

Set app = CreateObject("AgilentPNA835x.Application")

Set scpi = app.ScpiStringParser

scpi.parse "SYST:PRES"

'set power accuracy tolerance and iterations

scpi.parse "SOUR1:POW1:CORR:COLL:ITER:NTOL 0.1"

scpi.parse "SOUR1:POW1:CORR:COLL:ITER:COUN 15"

'set power sensor settling tolerance

scpi.parse "SOUR1:POW1:CORR:COLL:AVER:NTOL 0.1"

scpi.parse "SOUR1::POW1:CORR:COLL:AVER:COUN 15"

'set offset value for amp or attenuation

scpi.parse "SOUR1:POW1:CORR:OFFS 0 DB"

'show source power cal dialog

scpi.parse "SOUR1:POW1:CORR:COLL:DISP ON"

'read the usb power sensor ID string

sensor=scpi.parse("SYST:COMM:USB:PMET:CAT?")

'specify that sensor

scpi.parse "SYST:COMM:PSEN usb," + sensor

'do the measurement

scpi.parse "SOUR1:POW1:CORR:COLL:ACQ PMR,"ASENSOR""

'save the source cal and create an R-Channel response calset

scpi.parse "SOUR:POW:CORR:COLL:SAVE RREC"


Last Modified:

16-Jul-2010

Fixed typo

26-Feb-2009

MX New topic