This example program does the following:
Setup four Impedance Parameters (|Z|, θz, Cp, Rs)
Setup Stimulus (1 MHz to 10 GHz, LOG sweep)
Execute S-Parameter calibration and fixture compensation
Get the measurement result
Learn more about Impedance Analysis
See Other SCPI Example Programs
The following example in Excel VBA will run on E5080B with Impedance Analysis S96041B. The 16198A is also required.
Sub ZA()
Dim StepDesc As String Dim NoOfStep As Integer Dim ReadData() As Double, FreqData() As Double Dim Poin As Integer
'*** The memory area of the resource manager and the instrument I/O are acquired Set ioMgr = New VisaComLib.ResourceManager Set Vna = New VisaComLib.FormattedIO488 '*** Open the instrument. Sets the VISA address. Set Vna.IO = ioMgr.Open("TCPIP0::146.208.119.xxx::hislip0::INSTR") Vna.IO.timeout = 10000 ' TimeOut time should be greater than the measurement time. ' .WriteString "SYSTem:FPReset", True
' Define Parameters .WriteString "DISP:WIND1 ON", True ' Display Window 1 .WriteString "DISP:WIND2 ON", True ' Display Window 2 .WriteString "CALC:MEAS1:DEF 'Z:Impedance Analysis'", True .WriteString "DISP:MEAS1:FEED 1", True .WriteString "CALC:MEAS1:FORM MLIN", True ' Format: Lin Mag .WriteString "DISP:WIND1:TRAC1:Y:SPAC LOG", True ' : Y Scale Log
.WriteString "CALC:MEAS2:DEF 'Z:Impedance Analysis'", True .WriteString "DISP:MEAS2:FEED 1", True .WriteString "CALC1:MEAS2:FORM PHAS", True
.WriteString "CALC:MEAS3:DEF 'Cp:Impedance Analysis'", True .WriteString "DISP:MEAS3:FEED 2", True .WriteString "CALC1:MEAS3:FORM REAL", True
.WriteString "CALC:MEAS4:DEF 'Rs:Impedance Analysis'", True .WriteString "DISP:MEAS4:FEED 2", True .WriteString "CALC1:MEAS4:FORM REAL", True
' Setup for Stimulous .WriteString "SENS:FREQ:STAR 1E6", True .WriteString "SENS:FREQ:STOP 10E9", True .WriteString "SENS:BAND 100", True .WriteString "SENS:SWEEP:TYPE LOG", True .WriteString "SENS:SWEEP:POIN 201", True .WriteString "SENS:SWEEP:MODE HOLD", True .WriteString "SOUR:POW -17", True .WriteString "INIT:CONT OFF", True
CalSets = "Yes" Select Case CalSets Case "No" ' Guided Calibration and Compensation (Smart Cal) .WriteString "SENS:CORR:COLL:GUID:CONN:PORT1 '3.5 mm female'", True .WriteString "SENS:CORR:COLL:GUID:CKIT:PORT1 '85052D_H02-US60140xxx'", True .WriteString "SENS:ZA:FIXT:RESP:FILE 'C:\temp\Fixture_Data_F2A2C16xxx.dat'", True .WriteString "SENS:ZA:FIXT:CKIT:OPEN:C -7.5E-15", True .WriteString "SENS:ZA:FIXT:CKIT:SHOR:L 190E-12", True
.WriteString "SENS:CORR:COLL:GUID:INIT", True .WriteString "SENS:CORR:COLL:GUID:STEP?", True NoOfStep = .ReadNumber
For i = 1 To NoOfStep .WriteString "SENS:CORR:COLL:GUID:DESC? " & i, True StepDesc = .ReadString MsgBox (StepDesc & ", click [OK] button") .WriteString "SENS:CORR:COLL:GUID:ACQ stan" & i, True .WriteString "*OPC?", True NumDmy = .ReadNumber Next i .WriteString "SENS:CORR:COLL:GUID:SAVE", True Case "Yes" ' Import ZA Class CalSet .WriteString "SENS:CORR:CSET:ACT ""CalSet_Z"",1", True ' Apply the Cal Set stimulus values to the channel. End Select
' Measure DUT MsgBox ("Set DUT on the contact board, then click [OK] button to measure")
.WriteString "INITiate:IMMediate", True .WriteString "*OPC?", True NumDmy = .ReadNumber ' Get numbuer of point of the stimulus data. .WriteString ":SENS1:SWE:POIN?", True Poin = .ReadNumber ReDim FreqData(Poin - 1) ReDim ReadData(Poin - 1) ActiveSheet.Range("A11:F1000").Clear ' set data for new sheet ActiveSheet.Cells(10, 1) = "Frequency" ActiveSheet.Cells(10, 2) = "|Z|" ActiveSheet.Cells(10, 3) = "Z Theta" ActiveSheet.Cells(10, 4) = "Cp" ActiveSheet.Cells(10, 5) = "Rs" ' ** Get the frequency data. .WriteString ":CALC:MEAS1:DATA:X?", True FreqData = .ReadList(ASCIIType_R8, ",")
For i = 1 To Poin ActiveSheet.Cells(i + 10, 1) = FreqData(i - 1) Next i
' Get the measurement data. For j = 1 To 4 .WriteString ":CALC1:MEAS" & j & ":DATA:FDAT?", True ReadData = .ReadList(ASCIIType_R8, ",") For i = 1 To Poin ActiveSheet.Cells(i + 10, j + 1).Value = ReadData(i - 1) Next i Next j
.IO.Close End With End Sub |