Agilent Technologies B1500A Service Manual Page 37

  • Download
  • Add to my manuals
  • Print
  • Page
    / 598
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 36
Agilent B1500A/B1505A Programming Guide, Edition 11 1-19
Programming Basics
Getting Started
To Read Sweep Measurement Data
For the sweep measurements, the measurement data will be put into the data output
buffer after every step measurement. You can read the data as shown below. The
examples use the VISA COM library and Microsoft Visual Basic .NET language.
For the data output format, see “Data Output Format” on page 1-25.
To read data after sweep measurement
This way waits for the measurement completion by using the *OPC? command
after the XE command, and reads the sweep data (all step measurement data) at
once after the sweep measurement is completed. For the specific example, see
Table 3-5 on page 3-19.
Example:
B1500.WriteString("FMT 5,0" & vbLf) ’terminator=comma
B1500.WriteString("XE" & vbLf)
B1500.WriteString("*OPC?" & vbLf)
rep = B1500.ReadString(1 + 2) ’Response+CRLF
ret_val = B1500.ReadString(16 * nop)
For i = 0 To nop - 1 ’nop=number of sweep steps
head = Mid(ret_val, 16 * i + 1, 3)
mdata = Val(Mid(ret_val, 16 * i + 4, 12))
ddata = "Data = " & mdata & ", Header = " & head
Console.WriteLine(ddata)
Next i
To read data after every step measurement
This way starts to read the data after the XE command. You do not need to wait
for the sweep measurement completion. So you can check the result data before
the sweep measurement is completed. For the specific example, see Table 3-6 on
page 3-22.
Example:
B1500.WriteString("FMT 5,0" & vbLf) ’terminator=comma
B1500.TerminationCharacter = Chr(44) ’Chr(44)=comma
B1500.TerminationCharacterEnabled = True ’enables comma
B1500.WriteString("XE" & vbLf)
For i = 0 To nop - 1 ’nop=number of sweep steps
ret_val = B1500.ReadString(3 + 12 + 1)
head = Left(ret_val, 3)
mdata = Val(Mid(ret_val, 4, 12))
ddata = "Data = " & mdata & ", Header = " & head
Console.WriteLine(ddata)
Next i
Page view 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 597 598

Comments to this Manuals

No comments