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

225 mhz universal counter
Table of Contents

Advertisement

purgemacro:
INPUT "Are you sure you want to purge all macros? ", answer$
answer$ = UCASE$(answer$)
IF answer$ = "Y" THEN
sendhp ("*PMC")
PRINT "All macros purged"
END IF
RETURN
disablemacro:
sendhp ("*EMC 0")
PRINT ("Macros Disabled")
RETURN
sendmacro:
CLS
GOSUB displaymacro
INPUT "Enter the name of the macro to send ", namemacro$
IF namemacro$ = "" THEN RETURN
sendhp (namemacro$)
RETURN
definemacro:
CLS
INPUT "Enter the name of the macro to be defined ", namemacro$
INPUT "Enter the commands to be sent ", commandmacro$
length = LEN(commandmacro$)
numchar = INT(LOG(length) / LOG(10#)) + 1
header$ = "#" + LTRIM$(STR$(numchar))
PRINT header$
macrocommand$ = header$ + LTRIM$(STR$(length)) + commandmacro$
code$ = "*DMC " + CHR$(39) + namemacro$ + CHR$(39) + "," + macrocommand$
PRINT code$
CALL iooutputs(source, code$, LEN(code$))
RETURN
quit:
PRINT "End of Program"
STOP
RETURN
SUB sendhp (code$)
CALL iooutputs(source, code$, LEN(code$))
END SUB
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples
To Use Macros (QuickBASIC) (Continued)
3-90
'Purge all macros
'Disable macros, but do not purge
'Define a macro
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents