To Make A Frequency Measurement (Hp Basic) - HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter
Table of Contents

Advertisement

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
70
DIM Freq$(10)[22]
80
90
100
110
120
Samples=10
130
!
140
ASSIGN @Count TO 703
150
CLEAR 703
160
OUTPUT @Count;"*RST"
170
OUTPUT @Count;"*CLS"
180
OUTPUT @Count;"*SRE 0"
190
OUTPUT @Count;"*ESE 0"
200
OUTPUT @Count;":STAT:PRES"
210
220
230
OUTPUT @Count;":FUNC 'FREQ 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
290
FOR I=1 TO Samples
300
OUTPUT @Count;"READ:FREQ?"
310
320
ENTER @Count;Freq$(I)
330
PRINT USING "11A,DD,4A,22A,3A";"Frequency (";I;") = ";Freq$(I);" Hz"
340
NEXT I
350
LOCAL 703
360
END
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples

To Make a Frequency Measurement (HP BASIC)

3-62
! Declare variables
! Declare string to enter data
! Using strings to enter ASCII format
! data yields results formatted to the
! correct resolution. ASCII is the
! default format for the counter.
! Take 10 measurements
! Assign I/O path for counter
! Clear the counter and interface
! Reset the counter
! Clear event registers and error queue
! Clear service request enable register
! Clear event status enable register
! Preset enable registers and
! transition filters for operation and
! questionable status structures.
! Measure frequency on channel 1
! Clear the computer display
! Start making measurements
! Start a measurement and
! fetch the data
! Enter the frequency
! Return counter to local
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents