Agilent Technologies 8590 TV Converter Box User Manual


 
IF TEEN ELSE
ENDIF
If Then Else
Endif
Example
The following example uses the
IF/THEN/ELSE/ENDIF
command to pick a center frequency.
10 OUTPUT 718;
“IP;
20 OUTPUT 718;“TH
-35DM;”
30 OUTPUT
718;“TS;MKPK
HI;MA;”
40 OUTPUT
718;“IF
MA,GT,TH THEN;”
50
OUTPUT
7 18
;
“CF
20MHZ
;
60 OUTPUT 718; “ELSE;
70
OUTPUT 718;“CF
100MHZ;TS;MKPK
HI;”
80 OUTPUT 718;
“ENDIF;
90 END
Initializes spectrum analyzxx
Sets threshold level.
Finds highest peak.
Compares peak to threshold.
Changes center
frequency
to
20 MHz if peak
amplitude is greater than the threshold.
This line is executed if peak is less than or
equal to the threshold
level.
End of IF/THEN/EUE/ENDIF
The example below does
not
include the ELSE portion of the
IF/THEN/ELSE/ENDIF
command.
This example lowers any
signal
positioned above the spectrum analyzer screen.
10 OUTPUT 718; “IP;
Initializes spectrum analyzer
20 OUTPUT 718
;
“SNGLS
;
TS ; MKPK HI ; MA
;
‘I
Finds peak of trace.
30 OUTPUT
718;“IF
MA,GT,RL THEN;”
Compares peak amplitude and
reference
level.
40
OUTPUT 7 18 ;
“MKRL
;
rt?rfrms
line 40 if the marker amplitude is
greater than the reference level.
50 OUTPUT 718;
“ENDIF;
60 END
Ends
IF/THEN/EN/ENDIF
structure.
Description
The IF portion compares operands 1 and 2 with the operators shown in the following table.
Operator Description
GT
LT
EQ
NE
GE
LE
Greater than.
Less than.
Equal to.
Not equal to.
Greater than or equal to.
Less than or equal to.
If the condition is true, the command list following the IF statement is executed and commands
between ELSE and
ENDIF
are skipped. If the condition is false, the commands after the ELSE
statement are executed. If there is no ELSE statement, program execution resumes after the
ENDIF
statement.
Programming Commands
5-237