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.

Example<br />

IF TEEN ELSE ENDIF If Then Else Endif<br />

The following example uses the IF/THEN/ELSE/ENDIF comm<strong>and</strong> to pick a center frequency.<br />

10 OUTPUT 718; “IP; ”<br />

20 OUTPUT 718;“TH -35DM;”<br />

30 OUTPUT 718;“TS;MKPK HI;MA;”<br />

40 OUTPUT 718;“IF MA,GT,TH THEN;”<br />

50 OUTPUT 7 18 ; “CF 20MHZ ; ”<br />

60 OUTPUT 718; “ELSE; ”<br />

70 OUTPUT 718;“CF 100MHZ;TS;MKPK HI;”<br />

80 OUTPUT 718; “ENDIF; ”<br />

90 END<br />

Initializes spectrum analyzxx<br />

Sets threshold level.<br />

Finds highest peak.<br />

Compares peak to threshold.<br />

Changes center frequency to 20 MHz if peak<br />

amplitude is greater than the threshold.<br />

This line is executed if peak is less than or<br />

equal to the threshold level.<br />

End of IF/THEN/EUE/ENDIF<br />

The example below does not include the ELSE portion of the IF/THEN/ELSE/ENDIF comm<strong>and</strong>.<br />

This example lowers any signal positioned above the spectrum analyzer screen.<br />

10 OUTPUT 718; “IP; ” Initializes spectrum analyzer<br />

20 OUTPUT 718 ; “SNGLS ; TS ; MKPK HI ; MA ; ‘I Finds peak of trace.<br />

30 OUTPUT 718;“IF MA,GT,RL THEN;” Compares peak amplitude <strong>and</strong> reference level.<br />

40 OUTPUT 7 18 ; “MKRL ; ” rt?rfrms line 40 if the marker amplitude is<br />

50 OUTPUT 718; “ENDIF; ”<br />

60 END<br />

Description<br />

greater than the reference level.<br />

Ends IF/THEN/EN/ENDIF structure.<br />

The IF portion compares oper<strong>and</strong>s 1 <strong>and</strong> 2 with the operators shown in the following table.<br />

Operator Description<br />

GT<br />

LT<br />

EQ<br />

NE<br />

GE<br />

LE<br />

Greater than.<br />

Less than.<br />

Equal to.<br />

Not equal to.<br />

Greater than or equal to.<br />

Less than or equal to.<br />

If the condition is true, the comm<strong>and</strong> list following the IF statement is executed <strong>and</strong> comm<strong>and</strong>s<br />

between ELSE <strong>and</strong> ENDIF are skipped. If the condition is false, the comm<strong>and</strong>s after the ELSE<br />

statement are executed. If there is no ELSE statement, program execution resumes after the<br />

ENDIF statement.<br />

Programming Comm<strong>and</strong>s 5-237

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

Saved successfully!

Ooh no, something went wrong!