89
_____________________________________________________________________________________________
_____________________________________________________________________________________________
(5) Frequency characteristics measurement for impedance
Summary
This program measures the impedance frequency characteristics at various
frequencies.
It outputs the test result to a file.
The number of test point: 34
50/ 60/ 80 Hz
100/ 120/ 150/ 200/ 250/ 300/ 400/ 500/ 600/ 800 Hz
1/ 1.2/ 1.5/ 2/ 2.5/ 3/ 4/ 5/ 6/ 8 kHz
10/ 12/ 15/ 20/ 25/ 30/ 40/ 50/ 60/ 80/ 100 kHz
Program List
10 OPEN "COM1:9600,N,8,1" FOR RANDOM AS #1
20 PRINT #1, ":COMP OFF;:TRIG EXT"
30 PRINT #1, ":LEV V;:LEV:VOLT 1.00"
40 PRINT #1, ":MEAS:ITEM 1,0"
50 PRINT #1, ":HEAD OFF"
60 OPTION BASE 1
70 PNT = 34
80 DIM TABLE(10), F(PNT), Z(PNT)
90 RESTORE F.DATA
100 F.DATA:
110 DATA 1,1.2,1.5,2,2.5,3,4,5,6,8
120 FOR I = 1 TO 10
130
READ TABLE(I)
140 NEXT I
150 EX = 10: T = 8
160 FOR I = 1 TO PNT
170
F(I) = EX * TABLE(T)
180
PRINT #1, ":FREQ " + STR$(F(I))
190
PRINT #1, "*TRG;:MEAS?"
200
INPUT #1, Z(I)
210
PRINT F(I), Z(I)
220
IF T = 10 THEN T = 1: EX = EX * 10 ELSE T = T + 1
230 NEXT I
240 GOSUB SAVE.DATA:
250 CLS
260 CLOSE
270 END
280 SAVE.DATA:
290 INPUT "Input the file name to be saved.", F.NAME$
300 OPEN F.NAME$ FOR OUTPUT AS #2
310 FOR I = 1 TO PNT
320
PRINT #2, F(I); ","; Z(I)
330 NEXT I
340 CLOSE #2
350 RETURN