Getting Started
3
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
65
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
Summary of Contents for InfiniiVision 3000 X-Series
Page 1: ...s1 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Page 30: ...30 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Page 54: ...54 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 68: ...68 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 218: ...218 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 6 Root Commands...
Page 242: ...242 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Page 280: ...280 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Page 288: ...288 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Page 340: ...340 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 15 FUNCtion Commands...
Page 358: ...358 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 16 HARDcopy Commands...
Page 378: ...378 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 18 MARKer Commands...
Page 446: ...446 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 19 MEASure Commands...
Page 564: ...564 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 23 POWer Commands...
Page 842: ...842 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 29 TIMebase Commands...
Page 1054: ...1054 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 35 Error Messages...
Page 1076: ...1076 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 36 Status Reporting...
Page 1232: ...1232 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide Index...