Standard Notation
This section uses several forms of notation that have sp ecic
meaning.
Command Mnemonics
Many commands have b oth a long and a short form, and you must
use either one or the other (SCPI does not accept a combination
of the two). Consider the
FREQuency
command, for example. The
short form is
FREQ
and the long form is
FREQUENCY
(this notation
style is a shorthand to do cument b oth the long and short form of
commands). SCPI is not case sensitive, so
fREquEnCy
is just as valid
as
FREQUENCY
, but
FREQ
and
FREQUENCY
are the only valid forms of
the
FREQuency
command.
Angle Brackets
Angle brackets indicate that the word or words enclosed represent
something other than themselves. For example,
<new line>
represents the ASCII character with the decimal value 10. Similarly,
<^END>
means that EOI is asserted on the GPIB in
terface. Words
in angle brackets havemuch more rigidly dened meaning than
words used in ordinary text. For example, this section uses the word
\message" to talk ab out messages generally. But the bracketed words
<program message>
indicate a precisely dened element of SCPI.
If you need them, you can nd the exact denitions of words suchas
<program message>
in a syntax diagram.
How to Use Examples
It is imp ortant to understand that programming with SCPI
actually requires knowledge of two languages. You must know
the programming language of your controller (BASIC, C, Pascal)
as well as the language of your instrument (SCPI). The semantic
requirements of your controller's language determine how the SCPI
commands and resp onses are handled in your application.
Command Examples
Command examples lo ok like this:
:FREQuency:CW?
This example tells you to put the string
:FREQuency:CW?
in the
output statement appropriate to your application programming
language. If you encounter problems, study the details of how the
output statement handles message terminators suchas
<new line>
.
If you are using simple
OUTPUT
statements in HP BASIC, this is
taken care of for you. In HP BASIC, you type:
OUTPUT Source;":FREQuency:CW?"
Command examples do not show message terminators b ecause
they are used at the end of every program message. \Details of
1-64 Getting Started Programming