Sample Program - Agilent Technologies 4288A Programming Manual

1khz/1mhz capacitance meter
Table of Contents

Advertisement

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
Lines 40 to 60
Lines 80 to 90
Lines 100 to 120
Lines 140 to 150
Lines 160 to 180
Line 230
Example 5-1
Detecting the completion of measurement using SRQ (srq_meas.bas)
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180 Meas_wait:
190 Meas_end:
200
210
56
Sets the GPIB address.
Stops the trigger system and sets the trigger mode to the internal
trigger.
Enables bit 4 of the operation status event register and enables bit 7 of
the status byte register.
Clears the status byte register and operation status event register.
Sets the branch destination of the SRQ interrupt and enables the SRQ
interrupt.
Starts up the trigger system once to start the measurement and waits
for the completion of the measurement.
Displays "Measurement Complete" message.
DIM Buff$[9]
ASSIGN @Agt4288a TO 717
!
OUTPUT @Agt4288a;":INIT:CONT OFF"
OUTPUT @Agt4288a;":ABOR"
OUTPUT @Agt4288a;":TRIG:SOUR INT"
!
OUTPUT @Agt4288a;":STAT:OPER:ENAB 16"
OUTPUT @Agt4288a;"*SRE 128"
OUTPUT @Agt4288a;"*CLS"
OUTPUT @Agt4288a;"*OPC?"
ENTER @Agt4288a;Buff$
!
ON INTR 7 GOTO Meas_end
ENABLE INTR 7;2
OUTPUT @Agt4288a;":INIT"
PRINT "Waiting..."
GOTO Meas_wait
OFF INTR 7
PRINT "Measurement Complete"
END
Chapter 5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents