Create an FOM Measurement


All three VBScript examples in this topic create a FOM measurement with the following attributes:

Learn more about Frequency Offset Mode

These programs can be run as a macro in the PNA. To do this, copy the code into a text editor file such as Notepad and save on the PNA hard drive as FOM.vbs. Learn how to setup and run the macro.

See Other SCPI Example Programs

The following example will run on any PNA model with FOM (opt 080). However, these commands have no provisions for internal second source.  It uses Sens:Offset commands introduced before 'enhanced FOM' was released for the A.07.10 release.

' This section gets the PNA application

' starts the scpi parser, and presets the PNA

Set app = CreateObject("AgilentPNA835x.Application")

Set scpi = app.ScpiStringParser

scpi.Execute("SYST:FPRESET")

' Create and turn on window 1

scpi.Execute ("DISPlay:WINDow1:STATE ON")

'Define a measurement name, parameter

scpi.Execute ("CALCulate:PARameter:DEFine:EXT 'MyMeas',S21")

'Associate ("FEED") the measurement name ('MyMeas') to WINDow (1)

'and give the new TRACe a number (1).

scpi.Execute ("DISPlay:WINDow1:TRACe1:FEED 'MyMeas'")

 

scpi.Execute ("SENS:FREQ:START 1e9")

scpi.Execute ("SENS:FREQ:STOP 2e9")

'set the receivers to be 2e9 -> 3e9

scpi.Execute ("SENS:OFFS:OFFS 1e9")

scpi.Execute ("SENS:OFFS ON")

 

The following example can be run ONLY on a PNA with revision A.07.10 or later and has FOM (opt 080). It uses new Sens:FOM commands.

' This section gets the PNA application

' starts the scpi parser, and presets the PNA

Set app = CreateObject("AgilentPNA835x.Application")

Set scpi = app.ScpiStringParser

scpi.Execute("SYST:FPRESET")

' Create and turn on window 1

scpi.Execute ("DISPlay:WINDow1:STATE ON")

'Define a measurement name, parameter

scpi.Execute ("CALCulate:PARameter:DEFine 'MyMeas',S21")

'Associate ("FEED") the measurement name ('MyMeas') to WINDow (1), and give the new TRACe a number (1).

scpi.Execute ("DISPlay:WINDow1:TRACe1:FEED 'MyMeas'")

 

scpi.Execute("SENS:FREQ:START 1e9")

scpi.Execute("SENS:FREQ:STOP 2e9")

'set the receivers to be 2e9 -> 3e9

scpi.Execute("SENS:FOM:RANG3:FREQ:OFFS 1e9")

scpi.Execute("SENS:OFFS ON")

 

 

The following example can be run ONLY on a PNA with a second internal source, has revision A.07.10 or later, and has FOM (opt 080). It uses the internal 2nd source for the fixed LO frequency.

' This section gets the PNA application

' starts the scpi parser, and presets the PNA

Set app = CreateObject("AgilentPNA835x.Application")

Set scpi = app.ScpiStringParser

scpi.Execute("SYST:FPRESET")

' Create and turn on window 1

scpi.Execute ("DISPlay:WINDow1:STATE ON")

'Define a measurement name, parameter

scpi.Execute ("CALCulate:PARameter:DEFine 'MyMeas',S21")

'Associate ("FEED") the measurement name ('MyMeas') to WINDow (1)

'and give the new TRACe a number (1).

scpi.Execute ("DISPlay:WINDow1:TRACe1:FEED 'MyMeas'")

 

scpi.Execute ("SENS:FREQ:START 1e9")

scpi.Execute ("SENS:FREQ:STOP 2e9")

'set the receivers to be 2e9 -> 3e9

scpi.Execute ("SENS:FOM:RANG3:FREQ:OFFS 1e9")

'setup the 2nd source frequencies

scpi.Execute ("SENS:FOM:RANG4:COUP 0")

scpi.Execute ("SENS:FOM:RANG4:FREQ:START 1e9")

scpi.Execute ("SENS:FOM:RANG4:FREQ:STOP 1e9")

'turn off coupling

scpi.Execute ("SOUR:POW:COUP 0")

'set LO power to 10dBm

scpi.Execute ("SOUR:POW3 10")

'turn ON port 3, our LO signal

scpi.Execute ("SOUR:POW3:MODE ON")

scpi.Execute ("SENS:FOM:STAT ON")