- GENERAL/SYSTEM ROUTINES
- COPYRIGHT AND LICENSE
Lab::Instrument::WR640 - LeCroy WaveRunner 640 digital oscilloscope
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.
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 the oscilloscope (*RST)
($code,$message) = $s->get_error();
Fetch an error from the device error queue
$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.
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
$busy = $s->test_busy();
Returns 1 if busy (waiting for trigger, etc), 0 if not busy.
Fetch the *IDN? string from device
$s->recall(n => $n);
Recall setup 0..6
This software is copyright (c) 2020 by the Lab::Measurement team; in detail:
Copyright 2016 Charles Lane 2017 Andreas K. Huettel
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.