
Getting Started
3
Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide
59
The "8" states the number of digits that follow, and "00001000" states the
number of bytes to be transmitted.
The VISA COM library's ReadIEEEBlock and WriteIEEEBlock methods
understand the definite- length block syntax, so you can simply use
variables that contain the data:
' Read oscilloscope setup using ":SYSTem:SETup?" query.
myScope.WriteString ":SYSTem:SETup?"
Dim varQueryResult As Variant
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
' Write learn string back to oscilloscope using ":SYSTem:SETup" command:
myScope.WriteIEEEBlock ":SYSTem:SETup ", varQueryResult
Sending Multiple Queries and Reading Results
You can send multiple queries to the instrument within a single command
string, but you must also read them back as a single query result. This can
be accomplished by reading them back into a single string variable,
multiple string variables, or multiple numeric variables.
For example, to read the :TIMebase:RANGe?;DELay? query result into a
single string variable, you could use the commands:
myScope.WriteString ":TIMebase:RANGe?;DELay?"
Dim strQueryResult As String
strQueryResult = myScope.ReadString
MsgBox "Timebase range; delay:" + strQueryResult
When you read the result of multiple queries into a single string variable,
each response is separated by a semicolon. For example, the output of the
previous example would be:
Timebase range; delay: <range_value>;<delay_value>
To read the :TIMebase:RANGe?;DELay? query result into multiple string
variables, you could use the ReadList method to read the query results
into a string array variable using the commands:
myScope.WriteString ":TIMebase:RANGe?;DELay?"
Dim strResults() As String
strResults() = myScope.ReadList(ASCIIType_BSTR)
MsgBox "Timebase range: " + strResults(0) + ", delay: " + strResults(1)
Figure 2
Definite-length block response data
AXSDRNEC@S@SDQLHM@SNQ
"BST@K%@S@
/TLADQNE#XSDR
SNAD5Q@MRLHSSDC
/TLADQNE%HFHSR
5G@S'NKKNV
Содержание InfiniiVision 2000 X-Series
Страница 1: ...s1 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide...
Страница 24: ...24 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide...
Страница 38: ...38 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 48: ...48 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 62: ...62 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 120: ...120 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 4 Commands Quick Reference...
Страница 206: ...206 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Страница 242: ...242 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Страница 250: ...250 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Страница 270: ...270 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 14 DVM Commands...
Страница 276: ...276 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 15 EXTernal Trigger Commands...
Страница 312: ...312 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 17 HARDcopy Commands...
Страница 332: ...332 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 19 MARKer Commands...
Страница 416: ...416 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 22 POD Commands...
Страница 424: ...424 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 23 RECall Commands...
Страница 446: ...446 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 24 SAVE Commands...
Страница 588: ...588 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 28 TIMebase Commands...
Страница 692: ...692 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 31 WGEN Commands...
Страница 758: ...758 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 34 Error Messages...
Страница 788: ...788 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 36 Synchronizing Acquisitions...
Страница 918: ...918 Agilent InfiniiVision 2000 X Series Oscilloscopes Programmer s Guide 38 Programming Examples...