
1-26 Programming Guide
Preparing for Use ESG Family Signal Generators
Getting Started with SCPI
Standard Notation
This section uses several forms of notation that have specific meaning:
Command
Mnemonics Many commands have both 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 type is a shorthand to
document both 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 interface. Words in angle brackets have
much more rigidly defined meaning than words shown in ordinary text.
For example, this section uses the word “message” to talk about messages
generally. But the bracketed words <program message> indicate a
precisely defined element of SCPI. If you need them, you can find the exact
definitions of words such as <program message> in a syntax diagram.
How to Use Examples
Programming with SCPI 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 responses are handled in your application.
Command Examples
Command examples look 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 such as <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 719":FREQuency:CW?"
Command examples do not show message terminators because they are used at the end of
every program message. See “Details of Commands and Responses” on page 1-35 for more
information about message terminators.
Comentários a estes Manuais