Agilent Technologies 6843A Structure of a SCPI Message, Including Common Commands, Using Queries

Models: 6811B 6813B 6834B 6843A 6814B

1 187
Download 187 pages 38.86 Kb
Page 20
Image 20
Including Common Commands

2 - Introduction to Programming

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:TRIGger 7.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 ac source. Otherwise a Query Interrupted error will occur and the unreturned data will be lost.

Coupled Commands

When commands are coupled it means that the value sent by one command is affected by the settings of the other commands. The following commands are coupled in the ac source:

υthe voltage, voltage offset, and function shape commands

υthe step, pulse, and list commands that control output voltages, voltage offsets, and function shapes

υthe pulse commands that program the width, duty cycle, period, and the hold parameter

υthe voltage range and current limit commands in some ac source models

As explained later in Chapter 4, the order in which data is sent by these coupled commands can be important when more than one parameter is changed.

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.

ABORt<newline>

VOLTage?<newline>

The message unit may include a parameter after the header. The parameter usually is numeric, but it can be a string:

VOLTage 20<newline>

VOLTage MAX<newline>

20

Page 20
Image 20
Agilent Technologies 6843A, 6834B Structure of a SCPI Message, Including Common Commands, Using Queries, Coupled Commands