NAME

GPIB::hp33120a - Perl-GPIB module for HP33120A 15MHz function generator

SYNOPSIS

use GPIB::hp33120a qw(SIN SQUARE TRIANGLE RAMP NOISE DC USER);

$g = GPIB::hp33120a->new("Name");

$g->set($shape, $freq, $amplitude, $offset);
($shape, $freq, $amp, $offs) = $g->get;

$g->shape($shape);      # Set individual parameters
$g->freq(1000000.0);
$g->amplitude(1.0);
$g->offset(0.1);

$shape = $g->shape;     # Get individial parameters
$freq = $g->freq;
$amp = $g->amplitude;
$off = $g->offset;

@a = (1..1000);
$g->arb(\@a);           # Set Arb data

$g->display("TEST");    # Set display
$text = $g->display;

$g->am($depth, $shape, $freq)        # AM
$g->fm($deviation, $shape, $freq)    # FM
$g->bm($cycles, $phase, $freq)       # Burst modulation
$g->fsk($freq2, $rate)               # frequency shift keying
$g->sweep("LIN", $f1, $f2, $time)    # "LIN" or "LOG" sweep

DESCRIPTION

GPIB::hp33120a is a module for controlling an HP33120A 15MHz arbitrary function generator. This module is a sub-class of the GPIB module so all of the GPIB methods are also available through the reference.

Basic parameters can be set at once with $g->set() passing a list with waveform, frequency, amplitude, and offset. Basic parameters get also be set and retrieved individually as shown above.

The arbitrary function waveform is set with a call to $g->arb passing a reference to an array of numbers in the range -2047..2047. The length of the waveform is the length of the array. See the HP33120A manual for special considerations in calculating an arbitrary waveform. Also see test.pl for an example generating an arbitray waveform.

$g->display($text) sets the display. The display is fairly limited so it's proably a good idea to stick to upper case characters.

$g->am(), $g->fm, $g->bm, $g->fsk, and $g->sweep set various fancy modulation and sweep modes described in the HP33120A manual.

This module has been tested with the GPIB::ni, GPIB::hpserial, and GPIB::rmt modules on Linux and NT4.0.

AUTHOR

Jeff Mock, jeff@mock.com

SEE ALSO

GPIB(3), perl(1).