Agilent Technologies 4288A Programming Manual page 79

1khz/1mhz capacitance meter
Table of Contents

Advertisement

Sample program
Example 6-7 shows a sample program to read out the measured result using the data buffer.
This program is stored on the sample program disk under the filename "data_buf.bas."
This program executes measurement 50 times, reads out the results of the 50 measurements
in batch using data buffer 3, and then displays this information.
The program is detailed below.
Lines 40 to 50
Line 70
Line 90
Lines 110 to 120
Lines 140 to 150
Line 170
Line 190
Lines 220 to 230
Lines 270 to 310
Lines 350 to 410
Lines 470 to 530
Lines 550 to 610
Example 6-7
Reading out measured result using data buffer (data_buf.bas)
10
20
30
40
50
60
70
80
90
100
110
120
130
140
Chapter 6
Sets the GPIB address.
Assigns the number of measurements to be fed into the data buffer (50
times) to the Point variable.
Sets the data transfer format to the binary format.
Turns ON the trigger system continuous startup and sets the trigger
mode to the GPIB trigger.
Reads out the ON/OFF state of the comparator function and assigns it
to the Comp_flag variable.
If the Comp_flag value is 1 (the comparator function is ON), redefines
the size of the array data so that the number of data items for each
measurement is 4.
If the Comp_flag value is not 1 (the comparator function is OFF),
redefines the size of the array data so that the number of data items for
each measurement is 3.
Sets the number of measurements to be fed into the data buffer to
'Point' and makes the setup feed the measured result into the data
buffer.
Repeats the measurement until data buffer 3 becomes full.
Reads out data buffer 3.
If the Comp_flag value is 1 (the comparator function is ON), displays
the measurement status, measured primary parameter value, measured
secondary parameter value, and comparator sorting result.
If the Comp_flag value is not 1 (the comparator function is OFF),
displays the measurement status, measured primary parameter value,
and measured secondary parameter value.
DIM Buff$[9],Digit$[1],Read_form$[9],Num_of_byte$[9],Img$[50]
REAL Data(1:1000,1:4)
INTEGER Point,Comp_flag,Cond_reg
ASSIGN @Binary TO 717;FORMAT OFF
ASSIGN @Agt4288a TO 717
!
Point=50
!
OUTPUT @Agt4288a;":FORM REAL"
!
OUTPUT @Agt4288a;":INIT:CONT ON"
OUTPUT @Agt4288a;":TRIG:SOUR BUS"
!
OUTPUT @Agt4288a;":CALC:COMP?"
Reading Out Measured Result
Reading Out Measured Result
77

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents