Programming
Examples
Note
Programming RF
Frequency
Programming RF
Frequency and
FM
Modulation
Examples are provided here to help you understand the required
programming structure. All examples use the HP BASIC programming
language. See Table
2-1
for a complete listing of commands.
Command statements may be concatenated on the same line
if
separated by a semicolon.
A
colon must precede successive command
statements to ensure command hierarchy.
OUTPUT
7
19
Semicolon
(;)
Quotes
("
")
FREQ:CW
The output statement (HP BASIC) tells the system
controller to output what follows.
The Input/Output select code of the system controller
is
7.
The HP-IB address of the signal generator
is
19.
A
semicolon separates the HP BASIC command from
the output string that follows.
All command statements must be contained in quotes.
This command programs the RF frequency. FREQ
must be in the statement first representing
its
hierarchy over :CW. The colon
(:)
is
used to separate
the command hierarchy. The signal generator will be
programmed to
a
RF frequency of
500
MHz.
lIlI-ITPI_IT
71'3;
"FREI;!:
I:Lij
588
MHZ;
:
FP1:
DE'd
3
KHZj
:
FP1:SIIII-IR
E],::T
j
:
FP1:
E::.(T:
I~l~lIJp
HI:
i
:
HH:
!;THT
IZIFFj
:
F'N:
STHT
OFF
j
:
FPI
:
STHT
111
1.1
'
I
FM:
DEV
This command programs the
FM
deviation. FM
is
higher than DEV in the command hierarchy and is
separated by a colon
(:).
The signal generator will
be programmed to
3
kHz
of
deviation.
A semicolon separates completed command
statements.
This command selects the external path for the
modulation source.
Semicolon
(;)
FM:SOUR:EXT
FM:EXT:COUP
AC
This command selects ac coupling.
FM:STAT
ON
This command changes the FM modulation to an
on state.
A
modulation format must be turned
on before it
is
active. The other two modulation
formats must be turned
off
prior to activating the
desired modulation (AM:STAT
OFF
and PM:STAT
OFF).
2-4
HP-IB
Programming