Agilent Technologies 8590 TV Converter Box User Manual


 
To
Use a User-Defined Variable within a DLP
User-defined variables are variables that you create with the VARDEF or ACTDEF commands.
User-defined variables remain in spectrum analyzer memory and retain their values until
redefined, disposed of, or altered by MOV or math commands. Turning the spectrum analyzer
off, then on or pressing
@iZK)
will reset the variables to values as specified in their
declarations. Note that all user-defined variables are global in scope, any function can access
any variable. All variables are of type REAL.
Variables should be declared outside of functions so the MEM? command returns the correct
value for available spectrum analyzer memory after the DLP is downloaded by an external
controller.
To
use a user-defined variable within a DLP:
1. Use the VARDEF command to declare the variable. You should declare the variable outside
of the function definition.
2. Begin the FUNCDEF definition.
3. Use the variable within the function. If YOU want to
disDlav
the value of the variable, use
the DSPLY command.
4. End the FUNCDEF definition.
Example
10 OUTPUT
718;"VARDEF
A,MP,O;";
20 OUTPUT
718;"FUNCDEF
A,MPFUNC,!";
30 OUTPUT
718;"IP;SNGLS;";
40 OUTPUT
718;"FA
275MHZ;FB
325MHZ;";
50 OUTPUT
718;"TS;MKPK
HI;";
60 OUTPUT 718;"MOV
A-MP,MKA;";
70 OUTPUT
718;"PU;PA
60,180;TEXT
IMARKER
AMPLITUDE IS
I;";
80 OUTPUT
718;"DSPLY
AwMP,3.1;TEXT
%dBm%;";
90 OUTPUT
718;"!
;"
100 END
Declares the variable called
A-MPand
initializes its
value to zero.
Begins the
d@inition
of
a function called
AJPFUNC.
Does an instmcment pre-
set, sets it to single-sweep
mode.
Sets the start and stop
frequencies to 275 and
325
MHz,
respectively.
Puts a marker on the
highest signal.
Moves the marker am-
plitude value into A-MI?
Displays the message “MARKER
AMPLITUDE
Is:
then
displatis the marker am-
plitude and
dBm.
Ends
thejimction
&$nition.
The programming example above alters the variable
A-MP
that was defined with the VARDEF
command. The math commands can be used to alter variable values. Examples of math
commands are the ADD, DIV, SUB, and MPY. Refer to
‘lhble
5-4 in Chapter 5 for a complete list
of the math commands.
4-4
Creating and Using Downloadable Programs