Language Reference

ACTDEF

￿A temporary variable called COUNT is created, and assigned the initial value. The variable is available for math operations.

￿The current value of the function (and of the temporary variable) is displayed in the active function readout. Number 5 is displayed initially.

￿The step keys, knob, and numeric keypad can change the function value.

In the preceding example, the user-de￿ned function routine is a null function. (There are no commands between delimiters $$ in line 10.) In comparison, the following program characterizes the value of COUNT in line 70. In addition, COUNT is executed by front-panel key instead of a programming command.

The following example creates an active user-de￿ned function.

 

 

60

OUTPUT

723;"ACTDEF COUNT,500,NM,";

 

Begin de￿nition of active, user-de￿ned

 

 

 

 

 

 

 

 

function, called COUNT, that has an

 

 

 

 

 

 

 

 

initial value of 500 nm.

 

 

70

OUTPUT

723;"$MPY SP,2,COUNT;$"

 

Multiply the current value of COUNT

 

 

 

 

 

 

 

 

by 2, then set the span equal to the

 

 

 

 

 

 

 

 

product. The \$" ends the de￿nition.

 

 

80

OUTPUT

723;"KEYDEF 3,COUNT;"

 

Assign the function to a key.

 

To execute the COUNT function de￿ned above, press 4

 

5, 4

 

5, NCOUNTNNNNNNNNNNNNN.

 

LOCAL

USER

 

Do not use existing user-de￿ned function names or reserved words as names

 

for user-de￿ned functions. When using a string- or block-data ￿eld to transfer

 

a command de￿nition, be sure to use compatible terminators. Also, any

 

block-￿eld commands within the list must be the absolute type (A#-block).

Units argument

In the syntax diagram, the units arguments determine

 

￿

what unit keys are activated during front-panel number entry.

 

￿

whether the temporary variable can be used in place of prede￿ned

 

 

variable during math operations.

 

 

 

 

 

 

 

￿

 

 

 

 

 

 

how the step functions, UP, 485, DN, and 495, change the value of the

 

 

temporary variable.

 

 

 

 

 

 

7-14