56
Chapter 5
Starting (Triggering) Measurement and Waiting for Completion of Measurement
Waiting For Completion Of Measurement (detecting completion of
measurement)
Sample program
Example 5-1 shows a sample program to detect the completion of measurement using an
SRQ. This program is stored on the sample program disk under the filename
“srq_meas.bas.”
This program stops the trigger system, sets up SRQ, and then starts up the trigger system
once. When an SRQ of the completion of the measurement occurs, it displays a
“Measurement Complete” message and finishes.
The program is detailed below.
Line 20
Sets the GPIB address.
Lines 40 to 60
Stops the trigger system and sets the trigger mode to the internal
trigger.
Lines 80 to 90
Enables bit 4 of the operation status event register and enables bit 7 of
the status byte register.
Lines 100 to 120 Clears the status byte register and operation status event register.
Lines 140 to 150 Sets the branch destination of the SRQ interrupt and enables the SRQ
interrupt.
Lines 160 to 180 Starts up the trigger system once to start the measurement and waits
for the completion of the measurement.
Line 230
Displays “Measurement Complete” message.
Example 5-1
Detecting the completion of measurement using SRQ (srq_meas.bas)
10
DIM Buff$[9]
20
ASSIGN @Agt4288a TO 717
30
!
40
OUTPUT @Agt4288a;":INIT:CONT OFF"
50
OUTPUT @Agt4288a;":ABOR"
60
OUTPUT @Agt4288a;":TRIG:SOUR INT"
70
!
80
OUTPUT @Agt4288a;":STAT:OPER:ENAB 16"
90
OUTPUT @Agt4288a;"*SRE 128"
100
OUTPUT @Agt4288a;"*CLS"
110
OUTPUT @Agt4288a;"*OPC?"
120
ENTER @Agt4288a;Buff$
130
!
140
ON INTR 7 GOTO Meas_end
150
ENABLE INTR 7;2
160
OUTPUT @Agt4288a;":INIT"
170
PRINT "Waiting..."
180 Meas_wait:
GOTO Meas_wait
190 Meas_end:
OFF INTR 7
200
PRINT "Measurement Complete"
210
END
Summary of Contents for 4288A
Page 18: ...16 Chapter1 Making Effective Use of This Manual How To Use This Manual ...
Page 212: ...210 AppendixA Manual Changes Manual Changes ...
Page 248: ...246 AppendixB Information for Replacing 4278A with 4288A Comparison of Interfaces ...
Page 258: ...256 AppendixC Status Reporting System Using the Status Reporting System ...
Page 288: ...286 Index Index ...