Setup Noise Figure Port Mapping


This program demonstrates how to change source and receive ports when measuring noise figure. It assumes that option 029 ("Fully Corrected Noise Figure") is installed.

If only option 028 ("Noise figure measurements using standard receivers") is installed, switching ports is simpler, since only one noise receiver selection is available.

This program 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 NF.vbs. Learn how to setup and run the macro.

See Also

Noise Figure Object

Create and Cal a NoiseFigure Measurement

See Other COM Example Programs

option explicit

' Noise receiver enumerations

dim naStandardReceiver, naNoiseReceiver

' standard PNA receiver

naStandardReceiver = 0  

' dedicated noise receiver (option 029 only)

naNoiseReceiver = 1

dim pna, windowNum, channelNum

set pna = CreateObject("Agilentpna835x.application")

windowNum = 1

channelNum = 1

pna.Reset

' Create Noise Figure measurement

dim noise,noiseChan,noiseConfig

set noise = pna.CreateCustomMeasurementEx(channelNum, "Noise Figure Cold Source", "NF", windowNum)

set noiseChan = pna.ActiveChannel

' provides access to noise-specific channel properties

set noiseConfig = noiseChan.CustomChannelConfiguration  

'To change from the default input/output port settings of

' source port = PNA1, receive port = PNA2,

' you must first change the noise receiver,

' then select the desired ports.

dim srcPort, rcvPort

' set port mapping to source port = PNA3, receive port = PNA4

srcPort = 3

rcvPort = 4

' use PNA receiver for noise measurements

noiseConfig.NoiseReceiver = naStandardReceiver  

noiseConfig.SetPortMap srcPort, rcvPort

' To revert back to using the noise receiver, the source

' and receive ports must be set to their default values

' BEFORE switching to the noise receiver.  

' Otherwise, a COM exception will be thrown.

' restore defaults: source=PNA1, receiver=PNA2

noiseConfig.SetPortMap 1,2      

' use dedicated noise receiver for noise measurements

noiseConfig.NoiseReceiver = naNoiseReceiver