Agilent Technologies 4288A Programming Manual page 71

1khz/1mhz capacitance meter
Table of Contents

Advertisement

Reading out measured result in binary transfer format using :FETC? command
Example 6-4
(fetch_b.bas)
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280 Meas_wait:
290 Meas_end:
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
Chapter 6
DIM Buff$[9],Digit$[1],Read_form$[9],Num_of_byte$[9]
REAL Pri_para,Sec_para
REAL Meas_stat,Comp
INTEGER Comp_flag
ASSIGN @Binary TO 717;FORMAT OFF
ASSIGN @Agt4288a TO 717
OUTPUT @Agt4288a;":FORM REAL"
!
OUTPUT @Agt4288a;":INIT:CONT ON"
OUTPUT @Agt4288a;":TRIG:SOUR EXT"
!
OUTPUT @Agt4288a;":CALC:COMP?"
ENTER @Agt4288a;Comp_flag
!
! SRQ setting
!
OUTPUT @Agt4288a;":STAT:OPER:ENAB 16"
OUTPUT @Agt4288a;"*SRE 128"
OUTPUT @Agt4288a;"*CLS"
OUTPUT @Agt4288a;"*OPC?"
ENTER @Agt4288a;Buff$
!
! Triggering and data read
!
ON INTR 7 GOTO Meas_end
ENABLE INTR 7;2
PRINT "Waiting for External Trigger!"
GOTO Meas_wait
OFF INTR 7
OUTPUT @Agt4288a;":FETC?"
ENTER @Agt4288a USING "#,A";Buff$
ENTER @Agt4288a USING "#,A";Digit$
Read_form$="#,"&Digit$&"A"
ENTER @Agt4288a USING Read_form$;Num_of_byte$
IF Comp_flag=1 THEN
ENTER @Binary;Meas_stat,Pri_para,Sec_para,Comp
ELSE
ENTER @Binary;Meas_stat,Pri_para,Sec_para
END IF
ENTER @Agt4288a USING "#,A";Buff$
!
! Display results
!
PRINT USING "15A,X,D";"Meas. status
PRINT USING "15A,X,SD.5DE";"Pri. parameter:",Pri_para
PRINT USING "15A,X,SD.5DE";"Sec. parameter:",Sec_para
IF Comp_flag=1 THEN
PRINT USING "15A,X,K";"Comparator
ELSE
PRINT USING "19A";"Comparator
END IF
END
Reading Out Measured Result
Reading Out Measured Result
:",Meas_stat
:",Comp
: OFF"
69

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents