Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples
3-62
Programming Guide
To Make a Frequency Measurement (HP BASIC)
10 ! This program sets up the counter to make 10 frequency
20 ! measurements on channel 1, using a 0.1 second gate time.
30 ! The results are displayed on the computer CRT.
40 ! ASCII format is used to preserve resolution.
50 !
60 INTEGER I ! Declare variables
70 DIM Freq$(10)[22] ! Declare string to enter data
80 ! Using strings to enter ASCII format
90 ! data yields results formatted to the
100 ! correct resolution. ASCII is the
110 ! default format for the counter.
120 Samples=10 ! Take 10 measurements
130 !
140 ASSIGN @Count TO 703 ! Assign I/O path for counter
150 CLEAR 703 ! Clear the counter and interface
160 OUTPUT @Count;"*RST" ! Reset the counter
170 OUTPUT @Count;"*CLS" ! Clear event registers and error queue
180 OUTPUT @Count;"*SRE 0" ! Clear service request enable register
190 OUTPUT @Count;"*ESE 0" ! Clear event status enable register
200 OUTPUT @Count;":STAT:PRES" ! Preset enable registers and
210 ! transition filters for operation and
220 ! questionable status structures.
230 OUTPUT @Count;":FUNC 'FREQ 1'" ! Measure frequency on channel 1
240 OUTPUT @Count;":FREQ:ARM:STAR:SOUR IMM" ! These three lines enable
250 OUTPUT @Count;":FREQ:ARM:STOP:SOUR TIM" ! Using time arming, with a
260 OUTPUT @Count;":FREQ:ARM:STOP:TIM .100" ! 0.1 second gate time
270 !
280 CLEAR SCREEN ! Clear the computer display
290 FOR I=1 TO Samples ! Start making measurements
300 OUTPUT @Count;"READ:FREQ?" ! Start a measurement and
310 ! fetch the data
320 ENTER @Count;Freq$(I) ! Enter the frequency
330 PRINT USING "11A,DD,4A,22A,3A";"Frequency (";I;") = ";Freq$(I);" Hz"
340 NEXT I
350 LOCAL 703 ! Return counter to local
360 END
Содержание 53131A
Страница 1: ...Programming Guide HP 53131A 132A 225 MHz Universal Counter ...
Страница 2: ......
Страница 13: ...1 1 Before You Start ...
Страница 24: ...Chapter 1 Before You Start Related Documentation 1 12 Programming Guide ...
Страница 25: ...2 2 Command Summary A Quick Reference ...
Страница 68: ...Chapter 2 Command Summary RST Response 2 44 Programming Guide ...
Страница 69: ...3 3 Programming Your Universal Counter for Remote Operation ...
Страница 167: ...4 4 Command Reference A Dictionary ...
Страница 172: ...Chapter 4 Command Reference CALCulate Subsystems 4 6 Programming Guide Figure 4 1 The CALCulate Subsystems ...
Страница 310: ...Chapter 4 Command Reference WAI Wait to Continue Command 4 144 Programming Guide ...
Страница 311: ...5 5 Errors ...
Страница 329: ......
Страница 330: ...H Manual Part Number 53131 90044 Printed in U S A NOVEMBER 1996 ...