Chapter 6
65
Reading Out Measured Result
Reading Out Measured Result
6. R
ead
ing
out
Mea
s
u
re
d
Res
u
lt
Example 6-2
Reading out the measured result in binary transfer format using
command
(trg_b.bas)
10
DIM Buff$[9],Digit$[1],Read_form$[9],Num_of_byte$[9]
20
REAL Pri_para,Sec_para
30
REAL Meas_stat,Comp
40
INTEGER Comp_flag,Cond_reg
50
ASSIGN @Binary TO 717;FORMAT OFF
60
ASSIGN @Agt4288a TO 717
70
OUTPUT @Agt4288a;":FORM REAL"
80
!
90
OUTPUT @Agt4288a;":INIT:CONT ON"
100
OUTPUT @Agt4288a;":TRIG:SOUR BUS"
110
!
120
OUTPUT @Agt4288a;":CALC:COMP?"
130
ENTER @Agt4288a;Comp_flag
140
!
150
! Triggering and data read
160
!
170
REPEAT
180
OUTPUT @Agt4288a;":STAT:OPER:COND?"
190
ENTER @Agt4288a;Cond_reg
200
UNTIL BIT(Cond_reg,5)
210
OUTPUT @Agt4288a;"*TRG"
220
ENTER @Agt4288a USING "#,A";Buff$
230
ENTER @Agt4288a USING "#,A";Digit$
240
Read_form$="#,"&Digit$&"A"
250
ENTER @Agt4288a USING Read_form$;Num_of_byte$
260
IF Comp_flag=1 THEN
270
ENTER @Binary;Meas_stat,Pri_para,Sec_para,Comp
280
ELSE
290
ENTER @Binary;Meas_stat,Pri_para,Sec_para
300
END IF
310
ENTER @Agt4288a USING "#,A";Buff$
320
!
330
! Display results
340
!
350
PRINT USING "15A,X,D";"Meas. status
:",Meas_stat
360
PRINT USING "15A,X,SD.5DE";"Pri. parameter:",Pri_para
370
PRINT USING "15A,X,SD.5DE";"Sec. parameter:",Sec_para
380
IF Comp_flag=1 THEN
390
PRINT USING "15A,X,K";"Comparator
:",Comp
400
ELSE
410
PRINT USING "19A";"Comparator
: OFF"
420
END IF
430
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 ...