Save Trace Data VBA for E5061B Operation Manual

Agilent E5061B Network Analyzers
Save Trace Data VBA for E5061B
Operation Manual
Rev. 01.00
February 2011
Version
A.01.00
Date
2011.02.22
Revision history
Initial release
Contents
1 Main window ························································································································· 1
Save type ····························································································································· 3
2
2.1 Common ································································································································ 3
2.2 CSV File ································································································································ 3
2.3 MATLAB® format··················································································································· 5
2.4 CITIFile ································································································································ 6
1 Main window
Figure 1. Main window of the Save Trace Data VBA macro
①Display the directory selection dialog box.
②Show the directory of the file to save.
③Input the file name (Channel number and the file extension is automatically assigned. Refer to the following
for details).
④Display the screen keyboard.
⑤Select the save type from the following.
CSV File (Refer to 2.2 CSV File)
MATLAB format (Refer to 2.3 MATLAB® format)
CITIFile (Refer to 2.4 CITIFile)
⑥Select the Contents from the following.
Active Trace: Save the Active trace of Active channel.
Active Channel/All Traces: Save all traces of Active channel.
Displayed Channel/All Traces: Save all traces of all allocated channels.
⑦Select the array type to be saved (Multiple selections are available).
Corrected Data: Data array that are corrected the errors. Output data is shown with the Real/Imaginary
format.
Corrected Memory: Memory array that are corrected the errors.
Formatted Data: Data array that formats the corrected data. It is as same as the data shown on the screen.
Formatted Memory: Formatted memory array.
For detail, refer to Figure 2 “Data processing flowchart”, and “Data processing” in E5061B online help.
⑧Save the data. After saving is done correctly, program is ended with the beep sound.
(Note) If the same file name is in the folder, an overwrite warning is shown.
⑨Cancel the operation and end the program.
1
⑩Display this help file.
Figure 2. Data processing flowchart
2
2
Save type
2.1 Common
The x-axis of the measurement results are changed according to sweep type. In the case of the sweep type
is “power sweep”, the x-axis is “power”. If you choose the “DC bias sweep”, the x-axis is “DC bias”. And
when the fault location function is turned on, the x-axis is changed to a time domain.
2.2 CSV File
This mode saves the data as Comma Separated Value format.
If your analyzer is the E5061B-3L5, the “input impedance T(R)” and “input attenuator T(R)” settings are
saved for each trace.
If your analyzer has option 005 impedance measurement function, “impedance method” setting is saved for
each trace. If you save the s-parameter measurement result, the “impedance method” becomes “N/A”.
Sample case: Saved data with CSV format.
"E5061B MY49100053 A.02.00"
Model# S/N
FW version
"Thursday, February 03, 2011"
Date
"10:50 AM"
Time
"Channel",1
Channel number
"Title Label","ON","Test"
Title label
"Power",0
Power level [dBm]
"IFBW",30000
IFBW [Hz]
"SweepType","LIN"
Sweep type
"Correction","ON"
Correction status
"Port Extension","OFF"
Port extension status
"Trace number","Parameter","Format","Correction type","Equation editor","Data math","Gating","Electrical
delay(s)","Phase offset(deg)","Fault location","Parameter conversion","Smoothing","SRL"
The following status or values are shown from the left.
"Trace1","S11","MLOG","NONE","OFF","NORM","OFF","0","0","OFF","OFF","OFF","OFF"
"Trace2","S11","MLOG","NONE","OFF","NORM","OFF","0","0","ON","OFF","OFF","OFF"
"Impedance Method","Input Impedance T","Input Impedance R","Input Attenuator T","Input Attenuator R"
"N/A","1000000","1000000","20","20"
"N/A","1000000","1000000","20","20"
Frequency,Time,Tr1_S11_Fmt_data_Re,Tr1_S11_Fmt_data_Im,Tr2_S11_Fmt_data_Re,…Note1
+1.00000000000E+005,-1.00000000000E-008,+5.99332146938E-003,+0.00000000000E+00,…Note2
+1.50995000000E+007,-9.90000000000E-009,+6.38082309703E-003,+0.00000000000E+000,…
+3.00990000000E+007,-9.80000000000E-009,-1.85860734710E-004,+0.00000000000E+000,…
+4.50985000000E+007,-9.70000000000E-009,+7.13683092446E-004,+0.00000000000E+000,…
+6.00980000000E+007,-9.60000000000E-009,+2.51042941474E-003,+0.00000000000E+000,…
3
Note 1: Frequency
Time
Tr1
S11
Corr_data
Corr_mem
Fmt_data
Fmt_mem
Re
Im
The x-axis data for frequency domain.
The x-axis data for time domain. (If you turn on the fault location function)
Trace number.
S parameter.
Data array that are corrected the errors.
Memory array that are corrected the errors.
Formatted data array.
Formatted memory array.
Real value in array.
Imaginary value in array.
Note2:
All measured frequency (power, DC Bias or Time) and the selected array is saved.
Note3:
File name is automatically assigned as follows,
Input filename + “_” + Channel number + “.csv”
Sample: TraceData_001.csv)
4
2.3 MATLAB® format
This mode saves the data as Comma Separated Value format with MATLAB® compatible header.
“%” is added at the header.
If your analyzer is the E5061B-3L5, the “input impedance T(R)” and “input attenuator T(R)” settings are
saved for each trace.
If your analyzer has option 005 impedance measurement function, “impedance method” setting is saved for
each trace. If you save the s-parameter measurement result, the “impedance method” becomes “N/A”.
Sample case: Saved data with MATLAB format.
%"E5061B MY49100149 A.02.00"
%"Thursday, February 03, 2011"
%"10:46 AM"
%"Channel",1
%"Title Label","OFF",""
%"Power",10
%"IFBW",30000
%"SweepType","LOG"
%"Correction","OFF"
%"Port Extension","OFF"
%"Trace number","Parameter","Format","Correction type","Equation editor","Data math","Gating","Electrical
delay(s)","Phase offset(deg)","Fault location","Parameter conversion","Smoothing","SRL"
%"Trace1","|Z|","MLIN","GPRT","OFF","NORM","OFF","0","0","OFF","OFF","OFF","OFF"
%"Trace2","Theta-z","PHAS","GPRT","OFF","NORM","OFF","0","0","OFF","OFF","OFF","OFF"
%"Trace3","TR","REAL","GPRT","OFF","NORM","OFF","0","0","OFF","OFF","OFF","OFF"
%"Trace4","TR","REAL","GPRT","OFF","NORM","OFF","0","0","OFF","OFF","OFF","OFF"
%"Impedance Method","Input Impedance T","Input Impedance R","Input Attenuator T","Input Attenuator R"
%"GSH","50","50","0","20"
%"GSH","50","50","0","20"
%"N/A","50","50","0","20"
%"N/A","50","50","0","20"
%Frequency,Tr1_|Z|_Corr_data_Re,Tr1_|Z|_Corr_data_Im,Tr1_|Z|_Fmt_data_Re,
+1.00000000000E+001,+4.54692584952E-001,+1.76989354691E+000,+1.82736655168E+000,…
+1.07956418464E+001,-2.61986179008E+000,+2.46563568033E+000,+3.59764299330E+000,…
+1.15912836928E+001,+1.16861252940E-001,-1.31912947756E+000,+1.32429571132E+000,…
+1.23869255392E+001,-1.43535837247E+000,+1.28340339723E-001,+1.44108462632E+000,…
+1.31825673856E+001,+7.11334717499E-001,+1.01865685084E+000,+1.24244068674E+000,…
Note: File name is automatically assigned as follows,
Input filename + “_” + Channel number + “.dat”
Sample: TraceData_001.dat)
5
2.4 CITIFile
This mode saves the data as CITIfile version A.01.00 format.
Note: The channel data that is selected the power sweep and DC Bias sweep are not saved.
Sample case: Saved data with CITIFile format.
CITIFILE A.01.00
CITIFile version number.
#E5061B MY49100053 A.02.00
Model#, S/N and FW version number.
#FORMAT TR1 PLIN
#FORMAT TR2 PLOG
Trace number data format.
#FORMAT TR3 POL
(It is displayed when formatted data or formatted memory is selected.)
#FORMAT TR4 SWR
#FORMAT TR5 REAL
NAME FORMATTED
Note1
VAR FREQ MAG 5
5:NOP (the number of points)
DATA S[1,1] RI
DATA S[2,1] RI
S[1,1]: Measurement parameter of trace 1.
DATA S[1,2] RI
“RI” is always displayed as format.
DATA A[1] RI
DATA R1[1] RI
SEG_LIST_BEGIN
Note2
SEG 100000 3000000000 5
SEG_LIST_END
BEGIN
Note3
+8.81008756698E-001,-5.37583705873E+001
+9.35340379449E-002,+2.42290239557E+000
+8.83310861554E-001,-5.31041567686E+001
+9.37124399125E-002,+3.41131468381E+000
+8.85604328325E-001,-5.24505221679E+001
END
BEGIN
-2.57763742830E+000,+1.33199363937E+002
-7.98005659457E+001,+1.72394549289E+002
-7.16567085987E+001,-6.17466331593E+001
…
END
Note 1: Name keyword
Corrected Data : NAME DATA
Corrected Memory : NAME MEMORY
Formatted Data : NAME FORMATTED
Formatted Memory : NAME FORMATTED_ MEMORY
Note 2: Output data is changed based on the Sweep type.
Lin Freq: SEG_LIST_BEGIN keyword
Log Freq: VAR_LIST_BEGIN keyword
6
Segment: VAR_LIST_BEGIN keyword
Power Sweep: Power sweep is not saved.
DC Bias Sweep: DC Bias sweep is not saved.
Note3: BEGIN keyword
Output the array data that is selected between “BEGIN” and “END”. Real part and Imaginary
part is divided by comma.
Note 4: File name is automatically assigned as follows, based on the selection at Define data saves.
Corrected Data: File name + “.D” + channel number (Sample:TraceData.D1)
Corrected Memory: File name + “.SM” + channel number (Sample:TraceData.SM1)
Formatted Data: File name + “.F” + channel number (Sample:TraceData.F1)
Formatted Memory: File name + “.FM” + channel number (Sample:TraceData.FM1)
7