54
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
3
Getting Started
Reading Query Results into String Variables
The output of the instrument may be numeric or character data depending
on what is queried. Refer to the specific command descriptions in
, “Commands by Subsystem,” starting on page 111 for the
formats and types of data returned from queries.
The following example shows numeric data being returned to a string
variable:
myScope.WriteString ":CHANnel1:RANGe?"
Dim strQueryResult As String
strQueryResult = myScope.ReadString
MsgBox "Range (string):" + strQueryResult
After running this program, the controller displays:
Range (string): +40.0E+00
Reading Query Results into Numeric Variables
The following example shows numeric data being returned to a numeric
variable:
myScope.WriteString ":CHANnel1:RANGe?"
Dim varQueryResult As Variant
strQueryResult = myScope.ReadNumber
MsgBox "Range (variant):" + CStr(varQueryResult)
After running this program, the controller displays:
Range (variant): 40
Reading Definite-Length Block Query Response Data
Definite- length block query response data allows any type of
device- dependent data to be transmitted over the system interface as a
series of 8- bit binary data bytes. This is particularly useful for sending
large quantities of data or 8- bit extended ASCII codes. The syntax is a
pound sign (#) followed by a non- zero digit representing the number of
digits in the decimal integer. After the non- zero digit is the decimal
integer that states the number of 8- bit data bytes being sent. This is
followed by the actual data.
For example, for transmitting 1000 bytes of data, the syntax would be:
N O T E
Express String Variables Using Exact Syntax
In Visual Basic, string variables are case sensitive and must be expressed exactly the same
each time they are used.
Summary of Contents for InfiniiVision 7000A Series
Page 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Page 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Page 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Page 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...