Agilent Technologies 66319b Video Games User Manual


 
Introduction to Programming - 6
65
Moving Among Subsystems
In order to combine commands from different subsystems, you need to be able to reset the header path to
a null string within a message. You do this by beginning the command with a colon (:), which discards
any previous header path. For example, you could clear the output protection and check the status of the
Operation Condition register in one message by using a root specifier as follows:
OUTPut:PROTection:CLEAr;:STATus:OPERation:CONDition?
The following message shows how to combine commands from different subsystems as well as within
the same subsystem:
VOLTage:LEVel 20;PROTection 28;:CURRent:LEVel 3;PROTection:STATe ON
Note the use of the optional header LEVel to maintain the correct path within the voltage and current
subsystems, and the use of the root specifier to move between subsystems.
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 header path; you may insert them anywhere in the message.
VOLTage:TRIGgered 17.5;:INITialize;*TRG
OUTPut OFF;*RCL 2;OUTPut ON
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 dc source. Otherwise a
Query Interrupted error will occur and the unreturned data will be lost.
Types of SCPI Messages
There are two types of SCPI messages, program and response.
A program message consists of one or more properly formatted SCPI commands sent from the
controller to the dc source. The message, which may be sent at any time, requests the dc source to
perform some action.
A response message consists of data in a specific SCPI format sent from the dc source to the
controller. The dc source sends the message only when commanded by a program message "query."
Figure 6-2 illustrates the SCPI message structure.
The Message Unit
The simplest SCPI command is a single message unit consisting of a command header (or keyword)
followed by a message terminator. The message unit may include a parameter after the header. The
parameter can be numeric or a string.
ABORt<NL>
VOLTage 20<NL>