NAME
Lab::Instrument::HP3458A - Agilent 3458A Multimeter
VERSION
version 3.740
SYNOPSIS
use Lab::Instrument::HP3458A;
my $dmm=new Lab::Instrument::HP3458A({
gpib_board => 0,
gpib_address => 11,
});
print $dmm->get_voltage_dc();
DESCRIPTION
The Lab::Instrument::HP3458A class implements an interface to the Agilent / HP 3458A digital multimeter.
CONSTRUCTOR
my $hp=new(%parameters);
METHODS
pl_freq Parameter: pl_freq
$hp->pl_freq($new_freq);
$npl_freq = $hp->pl_freq();
Get/set the power line frequency at your location (50 Hz for most countries, which is the default). This is the basis of the integration time setting (which is internally specified as a count of power line cycles, or PLCs). The integration time will be set incorrectly if this parameter is set incorrectly.
get_voltage_dc
$voltage=$hp->get_voltage_dc();
Make a dc voltage measurement. This also enables autoranging. For finer control, use configure_voltage_dc() and triggered_read.
_head2 triggered_read
@values = $hp->triggered_read();
$value = $hp->triggered_read();
Trigger and read value(s) using the current device setup. This expects and digests a list of values in ASCII format, as set up by configure_voltage_dc().
triggered_read_raw
$result = $hp->triggered_read_raw( read_until_length => $length );
Trigger and read using the current device setup. This won't do any parsing and just return the answer from the device. If $read_until_length (integer) is specified, it will try to continuously read until it has gathered this amount of bytes.
configure_voltage_dc
$hp->configure_voltage_dc($range, $integration_time);
Configure range and integration time for the following DCV measurements.
$range is a voltage or one of "AUTO", "MIN" or "MAX". $integration_time is given in seconds or one of "DEFAULT", "MIN" or "MAX".
configure_voltage_dc_trigger
$hp->configure_voltage_dc_trigger($range, $integration_time,
$count, $delay);
Configures range, integration time, sample count and delay (between samples) for triggered readings.
$range, $integration_time: see configure_voltage_dc(). $count is the sample count per trigger (integer). $delay is the delay between the samples in seconds.
configure_voltage_dc_trigger_highspeed
$hp->configure_voltage_dc_trigger_highspeed($range,
$integration_time, $count, $delay);
Same as configure_voltage_dc_trigger, but configures the device for maximum measurement speed. Values are transferred in SINT format and can be fetched and decoded using triggered_read_raw() and decode_SINT(). This mode allows measurements of up to about 100 kSamples/second.
$range: see configure_voltage_dc(). $integration_time: integration time in seconds. The default is 1.4e-6. $count is the sample count per trigger (integer). $delay is the delay between the samples in seconds.
set_display_state
$hp->set_display_state($state);
Turn the front-panel display on/off. $state can be each of '1', '0', 'on', 'off'.
set_display_text
$hp->set_display_text($text);
Display a message on the front panel. The multimeter will display up to 12 characters in a message; any additional characters are truncated.
display_clear
$hp->display_clear();
Clear the message displayed on the front panel.
beep
$hp->beep();
Issue a single beep immediately.
get_error
($err_num,$err_msg)=$hp->get_error();
Query the multimeter's error queue. Up to 20 errors can be stored in the queue. Errors are retrieved in first-in-first out (FIFO) order.
check_errors
$instrument->check_errors($last_command);
# try
eval { $instrument->check_errors($last_command) };
# catch
if ( my $e = Exception::Class->caught('Lab::Exception::DeviceError')) {
warn "Errors from device!";
@errors = $e->error_list();
@devtype = $e->device_class();
$command = $e->command();
} else {
$e = Exception::Class->caught();
ref $e ? $e->rethrow; die $e;
}
Uses get_error() to check the device for occured errors. Reads all present error and throws a Lab::Exception::DeviceError. The list of errors, the device class and the last issued command(s) (if the script provided them) are enclosed.
set_nplc
$hp->set_nplc($number);
Sets the integration time in units of power line cycles.
reset
$hp->reset();
Reset the multimeter to its power-on configuration. Same as preset('NORM').
preset
$hp->preset($config);
$config can be any of the following settings:
'FAST' / 0
'NORM' / 1
'DIG' / 2
Choose one of several configuration presets.
selftest
$hp->selftest();
Starts the internal self-test routine.
autocalibration
$hp->autocalibration($mode);
Starts the internal autocalibration. Warning... this procedure takes 11 minutes with the 'ALL' mode!
$mode can be each of
'ALL' / 0
'DCV' / 1
'AC' / 2
'OHMS' / 4
decode_SINT
@values = $hp->decode_SINT( $SINT_data, <$iscale> );
Takes a data blob with SINT values and decodes them into a numeric list. The used $iscale parameter is read from the device by default if omitted. Make sure the device still has the same settings as used to obtain $SINT_data, or iscale will be off which leads to invalid data decoding.
CAVEATS/BUGS
probably many
SEE ALSO
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by the Lab::Measurement team; in detail:
Copyright 2011 Andreas K. Huettel, Florian Olbrich
2012 Alois Dirnaichner, Andreas K. Huettel, Florian Olbrich
2013 Alois Dirnaichner, Andreas K. Huettel
2015 Alois Dirnaichner
2016 Simon Reinhardt
2017 Andreas K. Huettel
2020 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.