AnsweredAssumed Answered

Getting phase plot and writing data into a file

Question asked by randysl on Apr 14, 2011
Latest reply on Apr 14, 2011 by randysl
Hi all,

I'm using E8361A network analyzer and I want to write a macro which generates plots for A/B measurement and obtain the phase difference of the signal. I used following code (collected from the help file)

Dim app
Dim scpi
Dim response
' Create / Get the PNA application.
Set app = CreateObject("AgilentPNA835x.Application")
Set scpi = app.ScpiStringParser

scpi.Execute("SYST:FPRESET")
response = scpi.Execute("*OPC?")
msgbox("response :" & response)

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

scpi.Execute("CALCulate:PARameter:DELete:ALL")
scpi.Execute("CALCulate:PARameter 'CH1_AB',AB")

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

scpi.Execute("SENSe:SWEep:TYPE CW")
scpi.Execute("SENSe:FREQuency 5 GHZ")
scpi.Execute("SENSe:SWEep:POINts 801")
scpi.Execute("SENSe:BWIDth 1 KHZ")


This code works fine and generates the A/B magnitude plot. I got couple of questions...

1. how should I get the phase plot with this macro

2. Is there any technique to read the measured phase value at a particular point on the trace into a variable of the vbscript code?

3. Can I generate a text file and write a variable value into that file using the vbscript?

thanks a lot,
regards,
randysl  

Outcomes