![background image](http://html.mh-extra.com/html/hp/53131a/53131a_programming-manual_156804143.webp)
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide
3-75
To Use Macros (HP BASIC)
10 USER 1 KEYS
20 ON KEY 1 LABEL " Macro Free ",1 CALL Macro_free
30 ON KEY 2 LABEL " Enable Macros",1 CALL Macro_enable
40 ON KEY 3 LABEL " Display Macros",1 CALL Display_macros
50 ON KEY 4 LABEL " Macro Query",1 CALL Macro_query
60 ON KEY 5 LABEL " Define Macro",1 CALL Define_macro
70 ON KEY 6 LABEL " Delete Macro",1 CALL Delete_macro
80 ON KEY 7 LABEL " Send Macro",1 CALL Send_macros
90 ON KEY 8 LABEL " Disable Macros",1 CALL Disable_macro
100 Loop_h:GOTO Loop_h
110 END
120 SUB Macro_free ! Display memory available for macros.
130 OUTPUT 703;":MEM:FREE:MACRO?"
140 ENTER 703;Macro_free
150 DISP "Macro memory free = ";Macro_free
160 LOCAL 703
170 SUBEND
180 SUB Macro_enable ! Enable macros. Default is disabled
190 OUTPUT 703;"*EMC 1"
200 DISP "Macros Enabled!"
210 LOCAL 703
220 SUBEND
230 SUB Disable_macro ! Disable macros.
240 OUTPUT 703;"*EMC 0"
250 DISP "Macros Disabled!"
260 SUBEND
270 SUB Display_macros ! Display available macros.
280 CLEAR SCREEN
290 DIM Macros$[6500]
300 OUTPUT 703;"*LMC?"
310 ENTER 703;Macros$
320 PRINT
330 PRINT "The following macros are available:"
340 PRINT
350 PRINT Macros$
360 SUBEND
370 SUB Send_macros ! Send a macro command to the counter.
380 CLEAR SCREEN ! A list of macros to choose from is
390 CALL Display_macros ! shown on the computer.
400 DIM Name$[25],Macro$[200],Send$[255]
410 LINPUT "Enter the name of the macro",Name$
420 IF Name$="" THEN SUBEXIT
430 OUTPUT 703;"*GMC? "&CHR$(39)&Name$&CHR$(39)
440 ENTER 703;Macro$
450 PRINT
460 PRINT "Macro ";Name$;" is defined as follows:"
470 PRINT
480 PRINT Macro$
490 LINPUT "Enter the macro name and commands to be sent",Send$
500 OUTPUT 703;Send$
510 SUBEND
Содержание 53131A
Страница 1: ...Programming Guide HP 53131A 132A 225 MHz Universal Counter ...
Страница 2: ......
Страница 13: ...1 1 Before You Start ...
Страница 24: ...Chapter 1 Before You Start Related Documentation 1 12 Programming Guide ...
Страница 25: ...2 2 Command Summary A Quick Reference ...
Страница 68: ...Chapter 2 Command Summary RST Response 2 44 Programming Guide ...
Страница 69: ...3 3 Programming Your Universal Counter for Remote Operation ...
Страница 167: ...4 4 Command Reference A Dictionary ...
Страница 172: ...Chapter 4 Command Reference CALCulate Subsystems 4 6 Programming Guide Figure 4 1 The CALCulate Subsystems ...
Страница 310: ...Chapter 4 Command Reference WAI Wait to Continue Command 4 144 Programming Guide ...
Страница 311: ...5 5 Errors ...
Страница 329: ......
Страница 330: ...H Manual Part Number 53131 90044 Printed in U S A NOVEMBER 1996 ...