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

225 mhz universal counter
Table of Contents

Advertisement

ON KEY(1) GOSUB availablememory
ON KEY(2) GOSUB enablemacro
ON KEY(3) GOSUB displaymacro
ON KEY(4) GOSUB querymacro
ON KEY(5) GOSUB definemacro
ON KEY(6) GOSUB deletemacro
ON KEY(7) GOSUB purgemacro
ON KEY(8) GOSUB disablemacro
ON KEY(9) GOSUB sendmacro
ON KEY(10) GOSUB quit
loophere: GOTO loophere
availablememory:
CALL sendhp(":MEM:FREE:MACRO?")
CALL IOENTER(source&, freemacro)
PRINT "Available macro memory = "; freemacro
RETURN
enablemacro:
sendhp ("*EMC 1")
PRINT "Macros Enabled"
RETURN
displaymacro:
CLS
sendhp ("*LMC?")
CALL IOENTERS(source, results$, maxlength, actual)
macros$ = LEFT$(results$, actual)
PRINT "The following macros are available:"
PRINT macros$
RETURN
querymacro:
CLS
GOSUB displaymacro
INPUT "Enter the name of the macro you want to see ", namemacro$
IF namemacro$ = "" THEN RETURN
sendhp ("*GMC? " + CHR$(39) + namemacro$ + CHR$(39))
CALL IOENTERS(source, results, maxlength, actual)
macroname$ = LEFT$(results, actual)
PRINT namemacro$; " is defined as:"
PRINT macroname$
RETURN
deletemacro:
GOSUB displaymacro
INPUT "Enter the name of the macro you want to delete ", namemacro$
IF namemacro$ = "" THEN RETURN
sendhp ("MEM:DELETE:MACRO " + CHR$(39) + namemacro$ + CHR$(39))
RETURN
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
To Use Macros (QuickBASIC) (Continued)
Programming Guide
'Wait for function key to be pressed
'Display available macro memory
'Enable all macros
'Display macros available in counter
'Ask for definition of a macro
'Delete a macro
3-89

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents