HP 53150A Series Programming Manual page 96

Microwave frequency counter
Table of Contents

Advertisement

Chapter 3 Programming Your Counter for Remote Operation
Programming Examples
Making a Frequency Measurement (HP BASIC)
10 ! This program sets up the counter to make 10 frequency
20 ! measurements on channel 2.
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 2'"
270
!
280
CLEAR SCREEN
290
FOR I=1 TO Samples
300
OUTPUT @Count;"INIT:*WAI;:DATA?" ! Start a measurement and
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
3-56
! 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
! fetch the data
! Return counter to local
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53152a series53151a series

Table of Contents