
Agilent B1500A/B1505A Programming Guide, Edition 11 3-97
Programming Examples
C-f Sweep Measurements
session.WriteString("DV " & t(0) & ",0,0,0.1,0" & vbLf) ’35
session.WriteString("DV " & t(2) & ",0,0,0.1,0" & vbLf)
session.WriteString("SSP " & t(1) & ", 4" & vbLf) ’CMU to SCUU output
session.WriteString("ACT 0, 2" & vbLf) ’auto, 2 samples
Dim rbx As Integer ’40
rbx = MsgBox("Do you want to perform Phase compensation?", vbYesNo, "")
If rbx = vbYes Then
MsgBox("Open measurement terminal. Then click OK.", vbOKOnly, "")
Console.WriteLine("Wait a minute . . ." & Chr(10))
session.WriteString("ADJ " & t(1) & ",1" & vbLf)
session.WriteString("ADJ? " & t(1) & vbLf) : err = session.ReadString(1 + 2)
If err <> 0 Then session.WriteString("ERR? 1" & vbLf) : err =
session.ReadString(4 + 2) : session.WriteString("DZ" & vbLf) : GoTo Check_err
End If
session.WriteString("ACV " & t(1) & "," & osc_level & vbLf) ’50
rbx = MsgBox("Do you want to perform Open correction?", vbYesNo, "")
If rbx = vbYes Then
session.WriteString("CLCORR " & t(1) & ",1" & vbLf) ’clears frequency list
For i = 0 To nop1 - 1
freq = f1 + i * (f2 - f1) / (nop1 - 1)
session.WriteString("CORRL " & t(1) & "," & freq & vbLf)
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
Next i
MsgBox("Open measurement terminal. Then click OK.", vbOKOnly, "")
Console.WriteLine("Wait a minute . . ." & Chr(10) & vbLf)
session.WriteString("DCORR " & t(1) & ",1,100," & ref_cp & "," & ref_g & vbLf)
session.WriteString("CORR? " & t(1) & ",1" & vbLf) : err = session.ReadString(1
+ 2)
If err <> 0 Then session.WriteString("ERR? 1" & vbLf) : err =
session.ReadString(4 + 2) : session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("CORRST " & t(1) & ",1,1" & vbLf) ’open correction ON
session.WriteString("CORRST " & t(1) & ",2,0" & vbLf) ’short correction OFF
session.WriteString("CORRST " & t(1) & ",3,0" & vbLf) ’load correction OFF
End If ’69
Line Description
35 to 36 Applies 0 V to the drain and source terminals.
37 to 38 Makes the SCUU connection path, and sets the A/D converter of the MFCMU.
40 to 48 Displays a message box that asks if you perform the phase compensation. If you click
Yes, the phase compensation will be performed. It will take about 30 seconds.
50 Sets the oscillator level of the MFCMU output signal.
52 to 69 Displays a message box that asks if you perform the open correction. If you click Yes,
the open correction will be performed. It does not need a long time. The short
correction and the load correction are not performed in this example.
Comentários a estes Manuais