To Perform Limit Testing (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 period measurements
20 ! indefinitely until an out of limits measurement occurs.
30 ! The upper limit is 1 usec and the lower limit is 500 nsec.
40 ! If a measurement falls outside of these limits, the counter will
50 ! stop measuring and report the out of limits value to the computer
60 ! ASCII format is used to preserve resolution.
70
Lower=5.00E-7
80
Upper=1.E-6
90
DIM Result$[22]
100
ASSIGN @Count TO 703
110
CLEAR 703
120
OUTPUT @Count;"*RST"
130
OUTPUT @Count;"*CLS"
140
OUTPUT @Count;"*SRE 0"
150
OUTPUT @Count;"*ESE 0 "
160
OUTPUT @Count;":STAT:PRES"
170
180
190
OUTPUT @Count;":FUNC ""PER 1"""
200
! Note that the function selected must be a quoted string.
210
! The actual string sent to the counter is "PER 1".
220
!
230
OUTPUT @Count;":FREQ:ARM:STAR:SOUR IMM" ! These two lines enable
240
OUTPUT @Count;":FREQ:ARM:STOP:SOUR IMM" ! Automatic arming.
250
!
260
OUTPUT @Count;":CALC2:LIM:STAT ON"
270
OUTPUT @Count;":CALC2:LIM:DISP GRAP"
280
OUTPUT @Count;":CALC2:LIM:LOWER ";Lower ! Set lower limit to 500 ns
290
OUTPUT @Count;":CALC2:LIM:UPPER ";Upper ! Set upper limit to 1 us
300
OUTPUT @Count;":INIT:AUTO ON"
310
OUTPUT @Count;":STAT:QUES:ENAB 1024"
320
OUTPUT @Count;"*SRE 8"
330
340
ON INTR 7 GOTO Out_of_limits
350
ENABLE INTR 7;2
360
OUTPUT @Count;":INIT:CONT ON"
370 Loop_here:GOTO Loop_here
380
!
390 Out_of_limits:
400
Status_byte=SPOLL(703)
410
OUTPUT @Count;"FETCH:PERIOD?"
420
ENTER @Count;Result$
430
PRINT "Out of limits measurement is ";Result$;" seconds"
440
PRINT "Status byte is ";Status_byte
450
LOCAL 703
460
END
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands

To Perform Limit Testing (HP BASIC)

Programming Guide
! Lower limit for period
! Upper limit for period
! Read out of limit period into Result$
! Assign I/O path for the 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 period on channel 1
! Enable limit testing
! Show the analog limit graph
! Stop when out of limit
! 1024 is out of limit bit
! Enable SRQ on questionable
! data register event
! If SRQ goto out_of_limits
! Enable the interrupt
! Start making measurements
! Loop while in limits
! Here because SRQ line
! asserted Serial poll counter
! Query the counter
! Read the period
! Should be 72 (64+8)
! Return counter to local
3-63

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents