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

225 mhz universal counter
Table of Contents

Advertisement

520
SUB Define_macro
530
DIM Name$[25],Macro$[200],Send$[255],Header$[2]
540
CLEAR SCREEN
550
LINPUT "Enter the name of the macro",Name$
560
LINPUT "Enter the counter commands",Macro$
570
Length=LEN(Macro$)
580
Num_char=INT(LGT(Length))+1
590
Header$="#"&VAL$(Num_char)
600
Send$="*DMC "&CHR$(39)&Name$&CHR$(39)&","&Header$&VAL$(Length)&Macro$
610
OUTPUT 703;Send$
620
SUBEND
630
SUB Macro_query
640
DIM Name$[25],Macro$[255]
650
CLEAR SCREEN
660
CALL Display_macros
670
LINPUT "Enter the name of the macro you want to see",Name$
680
IF Name$="" THEN SUBEXIT
690
OUTPUT 703;"*GMC? "&CHR$(39)&Name$&CHR$(39)
700
ENTER 703;Macro$
710
PRINT
720
PRINT "Macro ";Name$;" is defined as follows:"
730
PRINT
740
PRINT Macro$[(VAL(Macro$[2,2])+3)] ! Display command portion of macro
750
SUBEND
760
SUB Delete_macro
770
DIM Name$[25]
780
CALL Display_macros
790
LINPUT "Enter the name of the macro you want to delete",Name$
800
IF Name$="" THEN SUBEXIT
810
OUTPUT 703;":MEM:DELETE:MACRO ";CHR$(39)&Name$&CHR$(39)
820
SUBEND
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples
To Use Macros (HP BASIC) (Continued)
3-76
! Define a macro for the counter
! Determine # of characters for header
! Ask for the definition of a macro.
! Delete a macro.
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents