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

  • 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 261
3-84 Agilent B1500A/B1505A Programming Guide, Edition 11
Programming Examples
Pulsed Spot C Measurements
session.WriteString("MM 19," & t(1) & vbLf) ’63
session.WriteString("IMP 100" & 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) : err = session.ReadString(1 + 2) ’70
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
Dim mret As String = session.ReadString(16 * 3 + 2) ’3 data + terminator ’74
mt = Mid(mret, 4, 12)
st(0) = Mid(mret, 16 * 1 + 1, 3)
st(1) = Mid(mret, 16 * 2 + 1, 3)
md(0) = Val(Mid(mret, 16 * 1 + 4, 12))
md(1) = Val(Mid(mret, 16 * 2 + 4, 12))
data(j, i) = Chr(13) & Chr(10) & md(0) * 1000000000000.0 & "," & st(0) & "," &
md(1) * 1000000.0 & "," & st(1) & "," & mt
session.WriteString("DZ" & vbLf) ’82
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Check_err: ’86
session.WriteString("EMG? " & err & vbLf) : msg = session.ReadString(256)
MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
End Sub
Line Description
63 to 69 Sets the measurement condition, resets the time stamp, and performs the measurement.
70 to 72 Waits until the measurement is completed. If an error is detected, applies 0 V and goes to
Check_err.
74 to 80 Stores the returned data into the mret string variable. Finally, stores the measured data
into the data array.
82 to 84 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.
86 to 88 Displays a message box to show an error message if the error is detected.
Zobrazit stránku 261
1 2 ... 257 258 259 260 261 262 263 264 265 266 267 ... 597 598

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

Žádné komentáře