Language Reference

ACTDEF

Item

 

 

 

 

Description

 

 

 

Function-Name Range

1 { 12 characters:

A { Z, 0 { 9,

and underscore

( ).

 

First character

 

must be a letter .

Numbers must

be preceded b

y underscore .

Readout Range

As allowed

b y

selected

units.

 

 

 

 

Initial-V alue Range

As allowed

b y

selected

units.

 

 

 

 

 

 

 

 

Example Create a user-de￿ned function whose value can be changed with front-panel controls or with math operations.

60

OUTPUT 723;"ACTDEF NEW_SPAN,500,NM,";

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

 

 

 

function, called NEW SP AN, that

 

 

 

has an initial value of 500 nm.

70

OUTPUT

723;"@MPY SP,2,NEW_SPAN;@"

Multiply NEW

 

 

SPAN by 2, then set

 

 

 

 

span equal to

the

product. End

 

 

 

de￿nition and store

the function.

80

OUTPUT 723;"KEYDEF 3,NEW_SPAN;"

Assign function

to a 4USER5 key.

90

OUTPUT

723;"VARDEF YY,0;"

Create a user-de￿ned variable , YY.

100 OUTPUT

723;"MOV YY,NEW_SPAN;"

Set variable equal to NEW

 

SPAN.

 

Description The ACTDEF command stores in internal memory a user-de￿ned function that operates like an active function. ACTDEF ￿rst consolidates a series of

analyzer commands into one function, and then gives it a name. Executing the function name is the same as executing the series of commands contained in the function. (ACTDEF does not execute the function.)

In addition to creating a user-de￿ned function, the ACTDEF command creates a temporary variable that has the same name as the user-de￿ned function. The variable can be used for operations as you would use any prede￿ned variable. The variable exists as long as the user-de￿ned function is stored in internal memory.

The ACTDEF command is unique in that it makes the user-de￿ned function act like an active function. Active functions have the following characteristics:

￿Their current value is displayed in the active-function readout.

￿Their value can be changed with front-panel controls, provided the function is activated by a front-panel key.

￿Their value is expressed as a variable for operations with other spectrum-analyzer functions.

7-12