Introduction to SCPI

Program and Response Messages

The communication between the system

One or more program message units

controller and the SCPI instruments con-

(commands) may be sent within a simple

nected to the GPIB takes place through

program message, see Fig. 3-6.

Program and Response Messages. A Pro-

 

 

gram Message is a sequence of one or

 

;

more commands sent from the controller

 

 

to an instrument. Conversely, a Response

< P r o g r a m M e s s a g e U n it >

Message is the data from the instrument

 

 

to the controller.

Fig 3-6

Syntax of a terminated

 

 

 

Program Message.

 

C o n t r o l l e r

D e v i c e

 

 

 

 

 

 

C o m m a n d s

 

 

 

 

 

 

 

 

 

 

 

P r o g r a m M e s s a g e s

￿ is the pmt (program message

 

 

 

 

 

 

 

 

The

 

 

 

 

 

 

 

 

 

 

 

 

 

Q u e r i e s

 

 

 

 

 

 

 

 

 

terminator) and it must be one of the fol-

 

 

 

R eposn s ege

Ms e s s a

 

 

 

 

 

 

 

 

lowing codes:

 

 

 

 

 

 

 

 

Figure 3-4Program and response messages.

The GPIB controller instructs the device through program messages. The device will only send responses when explicitly requested to do so; that is, when the con- troller sends a query. Queries are recog- nized by the question mark at the end of the header, for example: *IDN? (requests the instrument to send identity data).

Syntax and Style

￿Syntax of Program Messages

A command or query is called a program message unit. A program message unit consists of a header followed by one or more parameters, as shown in Figure 3-5 .

￿

NL^END

This is <new line>

 

 

code sent concur-

 

 

rently with the

 

 

END message on

 

 

the GPIB.

 

NL

This is the <new

 

 

line> code.

 

<dab>^END

This is the END

 

 

message sent

 

 

concurrently with

 

 

the last data byte

 

 

<dab>.

 

 

 

￿NL is the same as the ASCII LF (<line feed> = ASCII 10decimal ). The END message is sent via the EOI-line of the GPIB.

The ^ character stands for ‘at the same time as’.

,

< H e a < S p>a c< eP >a r a m e t e r >

Figure 3-5Syntax of a Program

Message Unit.

Program and Response Messages 3-7

Page 27
Image 27
Fluke PM6681R, PM6685R manual Program and Response Messages, Syntax and Style, Syntax of Program Messages