To Use Limits To Filter Data Before Measuring Stats (Quickbasic) - HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter
Table of Contents

Advertisement

CALL sendhp(":FREQ:ARM:STAR:SOUR IMM")
CALL sendhp(":FREQ:ARM:STOP:SOUR TIM")
CALL sendhp(":FREQ:ARM:STOP:TIM .01")
CALL sendhp(":STAT:OPER:ENABLE 256")
CALL sendhp(":STAT:OPER:NTR 256")
CALL sendhp(":STAT:OPER:PTR 0")
CALL sendhp("*SRE 128")
CALL sendhp(":CALC3:LFIL:STATE ON")
CALL sendhp(":CALC3:LFIL:LOWER " + STR$(lower))
CALL sendhp(":CALC3:LFIL:UPPER " + STR$(upper))
CALL sendhp(":CALC3:AVER ON")
CALL sendhp(":CALC3:AVER:COUNT " + STR$(nummeas))'Set number of measurements
CALL sendhp(":CALC2:LIM:STATE ON")
CALL sendhp(":CALC2:LIM:LOWER " + STR$(lower))
CALL sendhp(":CALC2:LIM:UPPER " + STR$(upper))
CALL sendhp(":CALC2:LIM:DISP GRAPH")
ON PEN GOSUB getstats
PEN ON
CALL IOPEN(isc&, priority%)
PRINT "Making Period measurements"
CALL sendhp(":INIT:CONT ON")
Loophere:
IF complete THEN GOTO endprogram
GOTO Loophere
getstats:
complete = 1
CALL IOSPOLL(source&, statusbyte)
CALL sendhp(":INIT:CONT OFF")
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
To Use Limits to Filter Data Before Measuring Stats
(QuickBASIC) (Continued)
Programming Guide
'These 3 lines enable time
'arming with a 0.01 second
'gate time.
'Computing statistics bit in
'Operation Status Register.
'When stats are complete, the bit
'will go from high to low, so a
'negative transition is needed to
'enable the bit that is summarized
'in the Status Byte Register.
'This is the bit from the Operation
'Status register that is summarized
'in the Status Byte Register. When
'it goes high, SRQ will be asserted.
'Enable statistics filter
'Set lower stats limit
'Set upper stats limit
'Enable statistics
'to use in statistics
'calculation
'Enable limit testing. Must
'do this to see graph
'Set lower limit
'Set upper limit
'Display limit graph
'When SRQ happens, go get
'statistics
'Watch for interrupts
'Set counter to run
'Wait here until complete
'If stats received, then end
'Test bit
'Check status byte
'Should be 192
'Put counter in single
3-83

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents