To Perform Limit Testing (Quickbasic) - HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter
Table of Contents

Advertisement

'This program sets up the counter to make period measurements
'indefinitely until an out of limits measurement occurs. The upper
'limit is set to 1 us and the lower limit is set to 500 ns.
'If a measurement falls outside of these limits, the counter will
'stop measuring and send the out of limits period to the computer.
'The out of limit period is sent in ASCII format to preserve resolution.
'The SUB sendhp sends commands to the counter
DECLARE SUB sendhp (code$)
REM $INCLUDE: 'QBSETUP.BAS'
DIM SHARED source AS LONG
DIM period AS STRING * 23
DIM complete AS INTEGER
DIM statusbyte AS INTEGER
upper = .000001
lower = .0000005
source& = 703
isc& = 7
complete = 0
state% = 1
priority% = 1
CLS
CALL IOEOI(isc&, state%)
CALL IOCLEAR(source&)
CALL sendhp("*RST")
CALL sendhp("*CLS")
CALL sendhp("*SRE 0")
CALL sendhp("*ESE 0")
CALL sendhp(":STAT:PRES")
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 IMM")
CALL sendhp(":CALC2:LIM:STAT ON")
CALL sendhp(":CALC2:LIM:DISP GRAP")
CALL sendhp(":CALC2:LIM:LOWER " + STR$(lower)) 'Set lower limit
CALL sendhp(":CALC2:LIM:UPPER " + STR$(upper)) 'Set upper limit
CALL sendhp(":INIT:AUTO ON")
CALL sendhp("*SRE 8")
CALL sendhp(":STAT:QUES:ENAB 1024")
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples

To Perform Limit Testing (QuickBASIC)

'Make sure EOI enabled
'Clear the counter and interface
'Reset counter
'clear event registers and error queue
'clear service request enable register
'clear event status enable registers
'preset filters for operation and
'questionable status structures
3-78
'Required by HP 82335A
'Address and select code
'Period string, the maximum number
'of characters that can ever be
'sent is 23
'
'Status byte variable
'Upper period
'lower period
'Counter at address 3
'Select code 7
'Used to check if stats received
'Used in IOEOI
'Used in IOPEN
'Clear the screen
'These 2 lines enable using
'automatic arming
'Enable limit testing
'Show the analog limit graph
'Stop when out of limit
'Enable SRQ on questionable data
'register event
'1024 is out of limit bit
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents