Language Reference

FUNCDEF

70

OUTPUT 723;"DSPMODE CAT;"

Display catalog of currently selected

 

 

user memory . Notice the listing

 

 

includes the S

 

HIFT function and

 

 

SHIFT UP key.

 

 

FFFFFFFFFFFFFFFFFFFFF

80

OUTPUT 723;"CENTERWL 1300NM;SP 10NM;"

 

 

 

 

 

90

LOCAL 723

Press 4

 

5 to access SHIFT UP

USER

 

 

 

 

 

 

FFFFFFFFFFFFFFFFFFFFF

 

 

key.

100

OUTPUT 723;"S_HIFT;"

Execute function from the computer .

Description The FUNCDEF command de￿nes a routine consisting of spectrum-analyzer commands, assigns it a label, then stores the routine and its label in internal

memory. FUNCDEF does not execute the routine. FUNCDEF stores the routine. After FUNCDEF is executed, the routine is executed whenever the function name is encountered. The function name and the list of commands it executes form a user-de￿ned function. Once user-de￿ned functions are stored, they can be executed with the front-panel keys, with other user-de￿ned functions, or with computer programs (as you would other spectrum-analyzer commands).

Delete user-de￿ned functions from internal memory with the DISPOSE command. Use the PROTECT command to prevent inadvertent erasure with DISPOSE. PURGE and FORMAT also erase user-de￿ned functions. PROTECT does not prevent erasure or overwriting with the PURGE, LOAD, RCLD, or ERASE command.

Use ABORT to stop operation of user-de￿ned functions. Use IF/THEN, REPEAT/UNTIL, or RETURN to alter their operation.

Do not use existing user-de￿ned function names or reserved words as labels for user-de￿ned functions. Do not execute a user-de￿ned function within its FUNCDEF statement.

When using string- and block-data ￿elds to transfer command de￿nitions, be sure to use compatible terminators. Also, any block-￿eld commands within the list must be the absolute type (#A-block), because the EOI terminator of the #I-block type terminates the entire FUNCDEF command prematurely.

7-151