2 - 10

GETTING STARTED WITH SCPI PROGRAMMING

2.5.1How to make a single shot measurement

The MEASure? query allows you to make a single-shot measurement, and the FETCh? query allows you to fetch more signal characteristics.

PROGRAM EXAMPLE:

*****

’Measure and print the AC-RMS, peak to peak, and amplitude of ’the signal on channel 1.

*****

 

 

 

 

response$ = SPACE$(30)

 

 

CALL Send (0, 8,

"MEASure:AC? (@1)", 1)

Measures the AC-RMS value

CALL Receive (0,

8,

response$, 256)

Reads the AC-RMS value

PRINT "AC-RMS value

 

: "; LEFT$(response$, IBCNT% -1)

CALL Send (0, 8, "FETCh:PTPeak?", 1)

Fetches the Peak-To-Peak value

CALL Receive (0,

8,

response$, 256)

Reads the PTP value

PRINT "Peak-To-Peak

value: "; LEFT$(response$, IBCNT% - 1)

CALL Send (0, 8,

"FETCh:AMPLitude?", 1)

Fetches the amplitude value

CALL Receive (0,

8,

response$, 256)

Reads the amplitude value

PRINT "Amplitude

value

: "; LEFT$(response$, IBCNT% - 1)

2.5.2How to make repeated measurements

The measurement instructions allow you to make repeated measurements. The CONFigure command allows you to configure the instrument, the READ? query allows you to make a measurement, and the FETCh? query allows you to fetch more signal characteristics.

PROGRAM EXAMPLE:

*****

’Measure and print 5x the AC-RMS, peak to peak, and ’amplitude of the signal on channel 1.

*****

 

 

response$ =

SPACE$(30)

 

CALL Send (0, 8, "CONFigure:AC (@1)", 1)

Configures for AC-RMS

FOR i = 1 TO 5

Performs 5 measurements

CALL Send

(0, 8, "READ:AC?", 1)

Initiates AC-RMS reading

CALL Receive (0, 8, response$, 256)

Reads the AC-RMS value

PRINT "AC-RMS: "; LEFT$(response$, IBCNT%-1);

CALL Send (0, 8, "FETCh:PTPeak?", 1)

Fetches the Peak-To-Peak value

CALL Receive (0, 8, response$, 256)

Reads the PTP value

PRINT " /

Peak-To-Peak: "; LEFT$(response$, IBCNT%-1);

CALL Send

(0, 8, "FETCh:AMPLitude?", 1)

Fetches the amplitude value

CALL Receive (0, 8, response$, 256)

Reads the amplitude value

PRINT " /

Amplitude: "; LEFT$(response$, IBCNT%-1)

NEXT i

 

 

Page 19
Image 19
Fluke PM-3384B, PM-3380B, PM-3390B, PM-3370B How to make a single shot measurement, How to make repeated measurements