Sending Multiple Queries And Reading Results - Keysight Technologies InfiniiVision 4000 X Series Programmer's Manual

Hide thumbs Also See for InfiniiVision 4000 X Series:
Table of Contents

Advertisement

Number of Digits
That Follow
#800001000<1000 bytes of data><terminator>
Number of Bytes
to be Transmitted
Figure 2 Definite-length block response data
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)
Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide
Actual Data
3
Getting Started
87

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the InfiniiVision 4000 X Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Infiniivision mso-x 4034aInfiniivision mso-x 4054aInfiniivision mso-x 4032aInfiniivision mso-x 4022aInfiniivision mso-x 4104aInfiniivision mso-x 4154a ... Show all

Table of Contents