HP 53131A/132A 225 MHz Programming Manual page 149

225 mhz universal counter
Table of Contents

Advertisement

CALL sendhp(":FUNC " + CHR$(34) + "PER 1" + CHR$(34)) 'Measure Period
'The function must be a quoted string. The actual string sent to the
'counter is "PER 1"
CALL sendhp(":FREQ:ARM:STAR:SOUR IMM")
CALL sendhp(":FREQ:ARM:STOP:SOUR TIM")
CALL sendhp(":FREQ:ARM:STOP:TIM .01")
CALL sendhp(":DISP:TEXT:FEED " + CHR$(34) + "CALC3" + CHR$(34)) 'Display stats
CALL sendhp(":CALC3:AVER:TYPE SDEV")
CALL sendhp(":CALC3:AVER ON")
CALL sendhp(":CALC3:AVER:COUNT " + STR$(samples)) 'Do stats on samples
CALL sendhp(":TRIG:COUNT:AUTO ON")
CALL sendhp("*ESE 1")
CALL sendhp("*SRE 32")
PRINT "Waiting for measurement to complete"
ON PEN GOSUB statsready
PEN ON
CALL IOPEN(isc&, priorty%)
CALL sendhp(":INIT;*OPC")
loophere:
IF complete THEN GOTO endprogram
GOTO loophere
statsready:
CALL sendhp(":CALC3:AVERAGE:TYPE MIN;:CALC3:DATA?")
CALL IOENTERS(source&, minimum, maxelem%, actual%)
CALL sendhp(":CALC3:AVERAGE:TYPE MAX;:CALC3:DATA?")
CALL IOENTERS(source&, maximum, maxelem%, actual%)
CALL sendhp(":CALC3:AVERAGE:TYPE MEAN;:CALC3:DATA?")
CALL IOENTERS(source&, mean, maxelem%, actual%)
CALL sendhp(":CALC3:AVERAGE:TYPE SDEV;:CALC3:DATA?")
CALL IOENTERS(source&, sdev, maxelem%, actual%)
PRINT
PRINT "Minimum Period
PRINT "Maximum Period
PRINT "Mean Period
PRINT "Standard Deviation = ", sdev
complete = 1
RETURN
endprogram:
SUB sendhp (code$)
CALL iooutputs(source, code$, LEN(code$))
END SUB
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
To Measure the Statistics of 50 Measurements (QuickBASIC)
(Continued)
= ", minimum
= ", maximum
=
", mean
Programming Guide
'These 3 lines enable using
'time arming with a 0.01 second
'gate time
'Display the standard deviation
'Enable statistics
'Take samples measurements
'"*ESE 1" is used so the
'correct bit is summarized
'in the Status Byte Register
'when the measurement is complete
'Wait for interrupt
'Enable OPC bit and start meas
'Wait here, if already made
'stats measurements, then goto
'endprogram.
'Ready to read statistics
'Read them individually
'All done!
3-81

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents