Using Queries; Structure Of A Scpi Message - Ametek 2003RP User And Programming Manual

Ac power source
Table of Contents

Advertisement

The entire message would be:
SOUR:VOLT:RANG 150;LEV 115.
The message terminator after LEVel 115 returns the path to the root.
Note: The 2003RP interface buffer is limited to 45 characters + [LF]. As such, compound
commands should be used with care to make sure they do not exceed this message length
limit.
Moving Among Subsystems
In order to combine commands from different subsystems, you need to be able to restore the
active path to the root. You do this with the root specifier (:). For example, you could set the
output frequency to 60 Hz and set the display mode to frequency.
FREQ 60
DISP:MODE 0
Because the root specifier resets the command parser to the root, you can use the root
specifier and do the same thing in one message:
FREQ 60;:DISP:MODE 0
Including Common Commands
You can combine common commands with system commands in the same message. Treat
the common command as a message unit by separating it with a semicolon (the message
unit separator). Common commands do not affect the active header path; you may insert
them anywhere in the message.
VOLTage 115;*ESE 255
OUTPut 0;*RCL 2

9.3 Using Queries

Observe the following precautions with queries:
Set up the proper number of variables for the returned data.
Read back all the results of a query before sending another command to the AC source.
Otherwise a Query Error will occur and the non-returned data will be lost.

9.4 Structure of a SCPI Message

SCPI messages consist of one or more message units ending in a message terminator. The
terminator is not part of the syntax, but implicit in the way your programming language
indicates the end of a line (such as a newline or end-of-line character).
The Message Unit
The simplest SCPI command is a single message unit consisting of a command header (or
keyword) followed by a message terminator.
FREQuency?<newline>
VOLTage?<newline>
The message unit may include a parameter after the header. The parameter usually is
numeric:
VOLTage 20<newline>
OUTPut 1<newline>

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents