Agilent Technologies 8590 TV Converter Box User Manual


 
To
Create a Modular
DLP
A modular DLP is a DLP that is made up of several user-defined functions. Within a modular
DLP, there may be a main FUNCDEF which calls subordinate FUNCDEFs. A subordinate
FUNCDEF is a user-defined function that usually performs only one task, and is called by
another FUNCDEF.
To create a modular DLP:
1. Enter the file name that the DLP source code will be stored under, if desired.
2. Enter the date of the last revision to the DLP, if desired.
3. Enter the DLP author’s name, if desired.
4. Begin the FUNCDEF definition for the subordinate FUNCDEF
5. Enter in the programming commands that you want the FUNCDEF to perform.
6. End the FUNCDEF definition.
7. Repeat steps 4 through 6 for all the subordinate FUNCDEFs.
8. Create a main FUNCDEF that calls the subordinate FUNCDEF.
Creating a modular DLP instead of a DLP that is made up of only one FUNCDEF has the
following advantages:
n
Because the number of characters for a FUNCDEF definition is limited to a maximum of 2047
characters, you must change a large FUNCDEF into smaller FUNCDEFs if its size exceeds
2047 characters.
n Modular
DLPs
are easier to write, read, and find problems within the DLP
It is also easier to read and find problems in a program that has a comments added to it. For
example, adding the file name, the date of the last revision, and the author’s name help keep a
consistent program structure and make it easier to modify
the
DLI? The following program is
an example of a modular DLP with the recommended program structure.
Example
Notice that the program has a main FUNCDEF that calls the five subordinate
FUNCDEF’s
(SPANONE,
S-PANTWO,
S-PANTHREE, SPANFOUR, and C-HECK). Each of the five
FUNCDEFs is called from the main FUNCDEF,
E-XAMPLE.
Line 560 assigns the DLP to
softkey
2, so the function can be executed by pressing
(-1,
User Menus ,
EX&MPLE
.
The example uses descriptive labels and flows in a logical fashion, making the DLP easier to
understand. In addition, the use of subordinate FUNCDEFs makes the DLP easier to modify
because one FUNCDEF can be changed without having to modify the main FUNCDEF or other
FUNCDEFs. For example, if the application requires the stop frequency of the last span to
extend to 4
GHz,
simply change the stop frequency (FB
11OMHZ)
in
SPANFOUR
to a stop
frequency of 4
GHz
(FB 4GHZ).
Creating and Using Downloadable Programs
4-7