HP BASIC / HP-IB Program Example 4
This program example demonstrates how data can be formatted and put
in a file. The program also shows how to use math operations (stats) to
average data.
10 ! RE-SAVE "EXAMP"
20 CONFIGURE SAVE ASCII OFF
30 ! This program will generate a DOS file, in the file will be three columns each
40 ! separated by the Separator$ specified below, The columns are:
50 ! Reading Number,Time,DMM Reading
60 ! This file may be imported into a spreadsheet for analysis
70 !
80 Separator$="," !What separates the columns
90 Num_points=25 !How many measurements (rows in file)
100 Address=722 !34420A HPIB address
110 Range=1.E-3 !34420A Range
120 Nplc=1 !34420A Integration time
130 Num_samples=20 !How many samples per measurement
140 ALLOCATE Results$(1:Num_points)[80],Filename$[80]
150 Filename$="B:/EXAMP_DAT"
160 Setup_meter(Address,Range,Nplc,Num_samples)
170 FOR I=1 TO Num_points
180 DISP "Getting "&VAL$(I)&" of "&VAL$(Num_points)&" measurements"
190 OUTPUT Results$(I) USING "4D,A,8A,A,SD.12D";I,Separator$,TIME$(TIMEDATE),Separator$,
FNGetdata(Address)
200 NEXT I
210 ON ERROR GOTO Save_file
220 CREATE Filename$,1
230 Save_file: ASSIGN @File TO Filename$
240 OUTPUT @File;Results$(*)
250 ASSIGN @File TO *
260 DISP "Done"
270 END
6
Chapter 6 Application Programs
HP BASIC Language Programs
221
GPIB
Содержание 34420A
Страница 1: ......
Страница 2: ......
Страница 13: ...1 Quick Start ...
Страница 31: ...2 Front Panel Operation ...
Страница 55: ...3 Features and Functions ...
Страница 117: ...4 Remote Interface Reference ...
Страница 200: ...5 Error Messages ...
Страница 213: ...6 Application Programs ...
Страница 245: ...6 Chapter 6 Application Programs Microsoft Excel Macro Example 245 ...
Страница 246: ...Chapter 6 Application Programs Microsoft Excel Macro Example 246 ...
Страница 247: ...7 Measurement Tutorial ...
Страница 274: ...8 Specifications ...
Страница 279: ...Dimensions Chapter 8 Specifications 34420A Nano Volt Micro Ohm Meter 280 ...
Страница 294: ......