4-4
Programmer’s Guide
Data Types and Encoding
Data Types
String Data
String data consists of ASCII characters. The string must be enclosed by
a delimiter, either single quotes (
'This is string data.'
) or double
quotes (
“This is also string data.”
). To include the delimiter as a
character in the string, it must be typed twice without any characters in
between. The analyzer always uses double quotes when it returns string
data.
Expression Data
Expression data consists of mathematical expressions that use character
parameters. When expression data is sent to the analyzer, it is always
enclosed in parentheses (such as
(IMPL/CH1SMEM)
or
(IMPL)
). The
analyzer returns expression data enclosed in double quotes.
Block Data
The block data mode is typically used to transfer large quantities of
related data (like a data trace). Blocks can be sent as definite length
blocks or indefinite length blocks — the instrument will accept either
form. The analyzer always returns definite length block data in response
to queries.
Definite Block Length
The general form for a definite block length transfer is:
#<num_digits><num_bytes><data_bytes>
In the definite length block, two numbers must be specified. The single
decimal digit
<num_digits>
specifies how many digits are contained in
<num_bytes>
. The decimal number
<num_bytes>
specifies how many
data bytes will follow in
<data_bytes>
. An example IBASIC (or HP
BASIC) statement to send
ABC+XYZ
as a definite block length parameter
is shown; note that the data block contains seven bytes (
7
) and only one
digit is needed to describe the block length
1
.
OUTPUT 716;"#17ABC+XYZ"
Summary of Contents for 8712ES
Page 11: ...1 1 1 Introduction to GPIB Programming ...
Page 27: ...2 1 2 Synchronizing the Analyzer and a Controller ...
Page 36: ...3 1 3 Passing Control ...
Page 39: ...4 1 4 Data Types and Encoding ...
Page 46: ...5 1 5 Using Status Registers ...
Page 71: ...6 1 6 Trace Data Transfers ...
Page 98: ...6 28 Programmer sGuide Trace Data Transfers Internal Measurement Arrays ...
Page 99: ...7 1 7 Using Graphics ...
Page 105: ...8 1 8 Front Panel Keycodes ...
Page 111: ...9 1 9 Introduction to SCPI ...
Page 129: ...10 1 10 Menu Map with SCPI Commands ...
Page 268: ...12 1 12 SCPI Conformance Information ...
Page 290: ...13 1 13 SCPI Error Messages ...