09.12.2012 Views

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

To Create a Modular DLP<br />

A modular DLP is a DLP that is made up of several user-defined functions. Within a modular<br />

DLP, there may be a main FUNCDEF which calls subordinate FUNCDEFs. A subordinate<br />

FUNCDEF is a user-defined function that usually performs only one task, <strong>and</strong> is called by<br />

another FUNCDEF.<br />

To create a modular DLP:<br />

1. Enter the file name that the DLP source code will be stored under, if desired.<br />

2. Enter the date of the last revision to the DLP, if desired.<br />

3. Enter the DLP author’s name, if desired.<br />

4. Begin the FUNCDEF definition for the subordinate FUNCDEF<br />

5. Enter in the programming comm<strong>and</strong>s that you want the FUNCDEF to perform.<br />

6. End the FUNCDEF definition.<br />

7. Repeat steps 4 through 6 for all the subordinate FUNCDEFs.<br />

8. Create a main FUNCDEF that calls the subordinate FUNCDEF.<br />

Creating a modular DLP instead of a DLP that is made up of only one FUNCDEF has the<br />

following advantages:<br />

� Because the number of characters for a FUNCDEF definition is limited to a maximum of 2047<br />

characters, you must change a large FUNCDEF into smaller FUNCDEFs if its size exceeds<br />

2047 characters.<br />

� Modular DLPs are easier to write, read, <strong>and</strong> find problems within the DLP<br />

It is also easier to read <strong>and</strong> find problems in a program that has a comments added to it. For<br />

example, adding the file name, the date of the last revision, <strong>and</strong> the author’s name help keep a<br />

consistent program structure <strong>and</strong> make it easier to modify the DLI? The following program is<br />

an example of a modular DLP with the recommended program structure.<br />

Example<br />

Notice that the program has a main FUNCDEF that calls the five subordinate FUNCDEF’s<br />

(SPANONE, S-PANTWO, S-PANTHREE, SPANFOUR, <strong>and</strong> C-HECK). Each of the five<br />

FUNCDEFs is called from the main FUNCDEF, E-XAMPLE. Line 560 assigns the DLP to softkey<br />

2, so the function can be executed by pressing (-1, User Menus , EX&MPLE .<br />

The example uses descriptive labels <strong>and</strong> flows in a logical fashion, making the DLP easier to<br />

underst<strong>and</strong>. In addition, the use of subordinate FUNCDEFs makes the DLP easier to modify<br />

because one FUNCDEF can be changed without having to modify the main FUNCDEF or other<br />

FUNCDEFs. For example, if the application requires the stop frequency of the last span to<br />

extend to 4 GHz, simply change the stop frequency (FB 11OMHZ) in SPANFOUR to a stop<br />

frequency of 4 GHz (FB 4GHZ).<br />

Creating <strong>and</strong> Using Downloadable Programs 4-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!