++ed by:
AMBA

1 PAUSE user
1 non-PAUSE user.

Andreas K. Hüttel
and 4 contributors

NAME

Lab::Instrument::WR640 - Control LeCroy WaveRunner 640 digital oscilloscope, via ethernet VICP protocol (maybe USBTMC also)

VERSION

Version 3.530

SYNOPSIS

        use Lab::Instrument::WR640;
    
        my $s = new Lab::Instrument::WR640 (
            address => '192.168.1.1',
        );
       

Many of the 'quantities' passed to the code can use scientific notation, order of magnitude suffixes ('u', 'm', etc) and unit suffixes. The routines can be called using positional parameters (check the documentation for order), or with keyword parameters.

There are a few 'big' routines that let you set many parameters in one call, use keyword parameters for those.

In general, keywords passed TO these routines are case-independent, with only the first few characters being significant. So, in the example above: state=>'Run', state=>'running', both work. In cases where the keywords distinguish an "on/off" situation (RUN vs STOP for acquistion, for example) you can use a Boolean quantity, and again, the Boolean values are flexible:

    TRUE = 't' or 'y' or 'on' or number!=0

    FALSE = 'f' or 'n' or 'off' or number ==0

    (only the first part of these is checked, case independent)

The oscilloscope input 'channels' are CH1..CH4, but there are also MATH, REFA..REFD that can be displayed or manipulated. To perform operations on a channel, one should first $s->set_channel($chan); Channel can be specified as 1..4 for the input channels, and it will be translated to 'CH1..CH4'.

The state of the TDS2024B scope is cached only when the front-panel is in a 'locked' state, so that it cannot be changed by users fiddling with knobs.

GENERAL/SYSTEM ROUTINES

new

my $s = new Lab::Instrument::TDS2024B( usb_serial => '...', );

serial only needed if multiple TDS2024B scopes are attached, it defaults to '*', which selects the first TDS2024B found. See Lab::Bus::USBtmc.pm documentation for more information.

reset

$s->reset()

Reset the oscilloscope (*RST)

get_error

($code,$message) = $s->get_error();

Fetch an error from the device error queue

get_status

$status = $s->get_status(['statusbit']);

Fetches the scope status, and returns either the requested status bit (if a 'statusbit' is supplied) or a reference to a hash of status information. Reading the status register causes it to be cleared. A status bit 'ERROR' is combined from the other error bits.

Example: $s->get_status('OPC');

Example: $s->get_status()->{'DDE'};

Status bit names:

    PON: Power on

    URQ: User Request (not used)

    CME: Command Error

    EXE: Execution Error

    DDE: Device Error

    QYE: Query Error

    RQC: Request Control (not used)

    OPC: Operation Complete

    ERROR: CME or EXE or DDE or QYE

test_busy

$busy = $s->test_busy();

Returns 1 if busy (waiting for trigger, etc), 0 if not busy.

get_id

$s->get_id()

Fetch the *IDN? string from device

recall

$s->recall($n);

$s->recall(n => $n);

Recall setup 0..6

AUTHOR

Chuck Lane, <lane at duphy4.physics.drexel.edu>

This code is publically available under the same terms as Perl.