
Agilent B1500A/B1505A Programming Guide, Edition 11 3-79
Programming Examples
CV (DC Bias) Sweep Measurements
session.WriteString("WMDCV 2, 1" & vbLf) ’68
session.WriteString("WTDCV " & hold & "," & delay & "," & s_delay & vbLf)
session.WriteString("WDCV " & t(1) & ",1," & vg1 & "," & vg2 & "," & nop1 & vbLf)
session.WriteString("MM 18," & t(1) & vbLf)
session.WriteString("IMP 100" & vbLf)
session.WriteString("LMN 1" & vbLf)
session.WriteString("RC " & t(1) & "," & range & vbLf)
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("TSR" & vbLf)
session.WriteString("XE" & vbLf)
session.WriteString("*OPC?" & vbLf) : rep = session.ReadString(1 + 2) ’79
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("NUB?" & vbLf) : rep = session.ReadString(3 + 2)
If rep <> nop1 * 6 Then session.WriteString("DZ" & vbLf) : GoTo Check_nop ’83
Dim mret As String = session.ReadString(16 * 6 * nop1 + 2) ’6*nop1 data +
terminator
For i = 0 To nop1 - 1
st(i * 2) = Mid(mret, i * 16 * 6 + 16 * 1 + 1, 3)
st(i * 2 + 1) = Mid(mret, i * 16 * 6 + 16 * 2 + 1, 3)
st_mon(i * 2) = Mid(mret, i * 16 * 6 + 16 * 3 + 1, 3)
st_mon(i * 2 + 1) = Mid(mret, i * 16 * 6 + 16 * 4 + 1, 3)
tm(i) = Val(Mid(mret, i * 16 * 6 + 4, 12))
md(i * 2) = Val(Mid(mret, i * 16 * 6 + 16 * 1 + 4, 12))
md(i * 2 + 1) = Val(Mid(mret, i * 16 * 6 + 16 * 2 + 4, 12))
mon(i * 2) = Val(Mid(mret, i * 16 * 6 + 16 * 3 + 4, 12))
mon(i * 2 + 1) = Val(Mid(mret, i * 16 * 6 + 16 * 4 + 4, 12))
sc(i) = Val(Mid(mret, i * 16 * 6 + 16 * 5 + 4, 12))
data(j, i) = Chr(13) & Chr(10) & sc(i) & "," & md(i * 2) * 1000000000000.0 & ","
& st(i * 2)
data(j, i) = data(j, i) & "," & md(i * 2 + 1) * 1000000.0 & "," & st(i * 2 + 1)
data(j, i) = data(j, i) & "," & mon(i * 2) * 1000 & "," & st_mon(i * 2)
data(j, i) = data(j, i) & "," & mon(i * 2 + 1) & "," & st_mon(i * 2 + 1) & ","
& tm(i)
Next i ’101
Line Description
68 to 78 Sets the measurement condition, resets the time stamp, and performs the measurement.
68 Sets the automatic abort function to ON, and sets the post measurement output value to vg1.
69 Sets the MFCMU sweep output timing.
70 Sets the MFCMU DC bias sweep output.
79 to 83 Waits until the measurement is completed. After that, if an error is detected, forces 0 V and
goes to Check_err. Also if the number of returned data is not correct, forces 0 V and goes to
Check_nop.
85 to 101 Stores the returned data into the mret string variable. Finally, stores the measured data into
the data array.
Comentarios a estos manuales