Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide
3-89
To Use Macros (QuickBASIC) (Continued)
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 'Wait for function key to be pressed
availablememory: 'Display available macro memory
CALL sendhp(":MEM:FREE:MACRO?")
CALL IOENTER(source&, freemacro)
PRINT "Available macro memory = "; freemacro
RETURN
enablemacro: 'Enable all macros
sendhp ("*EMC 1")
PRINT "Macros Enabled"
RETURN
displaymacro: 'Display macros available in counter
CLS
sendhp ("*LMC?")
CALL IOENTERS(source, results$, maxlength, actual)
macros$ = LEFT$(results$, actual)
PRINT "The following macros are available:"
PRINT macros$
RETURN
querymacro: 'Ask for definition of a macro
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: 'Delete a macro
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
Summary of Contents for 53131A
Page 1: ...Programming Guide HP 53131A 132A 225 MHz Universal Counter ...
Page 2: ......
Page 13: ...1 1 Before You Start ...
Page 24: ...Chapter 1 Before You Start Related Documentation 1 12 Programming Guide ...
Page 25: ...2 2 Command Summary A Quick Reference ...
Page 68: ...Chapter 2 Command Summary RST Response 2 44 Programming Guide ...
Page 69: ...3 3 Programming Your Universal Counter for Remote Operation ...
Page 167: ...4 4 Command Reference A Dictionary ...
Page 310: ...Chapter 4 Command Reference WAI Wait to Continue Command 4 144 Programming Guide ...
Page 311: ...5 5 Errors ...
Page 329: ......
Page 330: ...H Manual Part Number 53131 90044 Printed in U S A NOVEMBER 1996 ...