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

225 mhz universal counter
Table of Contents

Advertisement

10 ! This program shows how to use the MEASure group of instructions to
20 ! quickly and easily make any of the counter's measurements.
30 ! In this program, time interval, frequency and period
40 ! However, the MEASure group can make measurements using any of the other
50 ! counter functions.
60 ! The program is composed of three subroutines. The first uses only
70 ! the MEAS:TINT? (@1),(@2) command to make a time interval measurement.
80 ! The second subroutine uses CONF:FREQ and READ? to make a measurement.
90 ! The third uses CONF:FREQ, INIT and FETCH? to make a measurement.
100! The comments at the start of each subroutine explain the benefits of
110! each method.
120
INTEGER I
130
DIM Freq$[22]
140
DIM Period$[22]
150
DIM Tint$[22]
160
170
180 ! The following commands reset the counter
190
ASSIGN @Count TO 703
200
CLEAR 703
210
OUTPUT @Count;"*RST"
220
OUTPUT @Count;"*CLS"
230
OUTPUT @Count;"*SRE 0"
240
OUTPUT @Count;"*ESE 0"
250
OUTPUT @Count;":STAT:PRES"
260
270
280
GOSUB Measure
290
LINPUT "Press RETURN
300
GOSUB Conf_read
310
LINPUT "Press RETURN for CONF, INIT and FETC",A$
320
GOSUB Init_fetc
330
STOP
340 !
350 !
360 Measure:!
Use the MEAS:TINT? (@1),(@2) command
370 ! The MEAS:TINT? (@1),(@2) query initiates a complete measurement
380 ! sequence. It configures the counter for a 2 channel time interval
390 ! measurement, starts the measurement and asks for the data. The MEAS
400 ! command is the simplest (and least flexible) way to make a measurement
410 ! and collect data.
420 ! Make sure there are signals at both counter inputs.
430
PRINT "Time Interval from 1 to 2 measured using MEAS:TINT? (@1),(@2)"
440
OUTPUT @Count;"MEAS:TINT? (@1),(@2)"
450
460
ENTER @Count;Tint$
470
PRINT
480
PRINT "Time Interval 1 to 2 = ";Tint$
490
PRINT
500
RETURN
510 !
520 !
530 Conf_read:!
Use CONF and READ? command
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples

Easiest Way to Make a Measurement (HP BASIC)

for CONF and READ",A$
3-60
! 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.
! 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.
! Call subroutines to make measurements
! Configure for time interval
! and query counter for results.
will be measured.
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents