Agilent Technologies B1500A Servisní příručka Strana 247

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 598
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 246
Agilent B1500A/B1505A Programming Guide, Edition 11 3-69
Programming Examples
High-Speed Spot C Measurements
session.WriteString("IMP 100" & vbLf) ’60
session.WriteString("LMN 1" & vbLf)
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("DCV " & t(1) & "," & dc_bias & vbLf)
session.WriteString("TSR" & vbLf)
session.WriteString("TTC " & t(1) & "," & range & vbLf)
session.WriteString("TSQ" & vbLf)
Dim mret As String = session.ReadString(16 * 5 + 2) ’5 data + terminator ’69
Dim tret As String = session.ReadString(15 + 2) ’1 data + terminator
Dim tcal As String = Mid(mret, 4, 12)
tret = Mid(tret, 4, 12)
mt = Val(tret) - Val(tcal)
st(0) = Mid(mret, 16 * 1 + 1, 3)
st(1) = Mid(mret, 16 * 2 + 1, 3)
st_mon(0) = Mid(mret, 16 * 3 + 1, 3)
st_mon(1) = Mid(mret, 16 * 4 + 1, 3)
md(0) = Val(Mid(mret, 16 * 1 + 4, 12))
md(1) = Val(Mid(mret, 16 * 2 + 4, 12))
mon(0) = Val(Mid(mret, 16 * 3 + 4, 12))
mon(1) = Val(Mid(mret, 16 * 4 + 4, 12))
data(j, i) = Chr(13) & Chr(10) & md(0) * 1000000000000.0 & "," & st(0) & "," &
md(1) * 1000000.0 & "," & st(1)
data(j, i) = data(j, i) & "," & mon(0) * 1000 & "," & st_mon(0) & "," & mon(1) &
"," & st_mon(1) & "," & mt
session.WriteString("DZ" & vbLf) ’85
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Check_err: ’89
session.WriteString("EMG? " & err & vbLf) : msg = session.ReadString(256)
MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
End Sub
Line Description
60 to 67 Sets the measurement condition, resets the time stamp, and performs the high-speed
spot C measurement.
69 to 83 Stores the returned data into the mret and tret string variables. Finally, stores the
measured data into the data array.
85 to 87 Applies 0 V from all channels. And transfers the data stored in the data variable to the
save_data subprogram (see Table 3-1). And the subprogram will save the data into a
CSV file specified by the fname variable and displays the data on a message box.
89 to 91 Displays a message box to show an error message if the error is detected.
Zobrazit stránku 246
1 2 ... 242 243 244 245 246 247 248 249 250 251 252 ... 597 598

Komentáře k této Příručce

Žádné komentáře