NAME
Lab::Instrument::Agilent34410A - HP/Agilent/Keysight 34410A or 34411A digital multimeter
VERSION
version 3.631
SYNOPSIS
use Lab::Instrument::Agilent34410A;
my $multimeter = Lab::Instrument::Agilent34410A->new(%options);
print $multimeter->get_value();
DESCRIPTION
The Lab::Instrument::Agilent34410A class implements an interface to the 34410A and 34411A digital multimeters by Agilent (now Keysight, formerly HP).
METHODS
new(%options)
This method is described in Lab::Measurement::Tutorial and Lab::Instrument.
get_value()
Perform data aquisition.
my $value = $multimeter->get_value();
get_error()
my ($err_num, $err_msg) = $agilent->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.
reset()
$agilent->reset();
Reset the multimeter to its power-on configuration.
assert_function($keyword)
Throw if the instrument is not in one of the operating modes given in $keyword
. See Lab::SCPI for the keyword syntax.
set_function($function)
Set a new value for the measurement function of the Agilent34410A.
$function
can be one of the measurement methods of the Agilent34410A.
"current:dc" --> DC current measurement
"current:ac" --> AC current measurement
"voltage:dc" --> DC voltage measurement
"voltage:ac" --> AC voltage measurement
"resistance" --> resistance measurement (2-wire)
"fresistance" --> resistance measurement (4-wire)
get_function()
Return the used measurement function.
set_range($range)
Set the range of the used measurement function to $range
.
RANGE
is given in terms of amps, volts or ohms and can be -3...+3A | MIN | MAX | DEF | AUTO
, 100mV...1000V | MIN | MAX | DEF | AUTO
or 0...1e9 | MIN | MAX | DEF | AUTO
. DEF
is default AUTO
activates the AUTORANGE-mode
. DEF
will be set, if no value is given.
get_range()
Return the range of the used measurement function.
get_autorange()
Return non-zero, if autoranging is enabled.
set_nplc($nplc)
Set a new value for the predefined NUMBER of POWER LINE CYCLES
for the used measurement function.
The NUMBER of POWER LINE CYCLES
is actually something similar to an integration time for recording a single measurement value. The values for $nplc
can be any value between 0.006 ... 100 but internally the Agilent34410A selects the value closest to one of the following fixed values 0.006 | 0.02 | 0.06 | 0.2 | 1 | 2 | 10 | 100 | MIN | MAX | DEF
.
Example: Assuming $nplc
to be 10 and assuming a netfrequency of 50Hz this results in an integration time of 10*50Hz = 0.2 seconds for each measured value.
NOTE: 1.) Only those integration times set to an integral number of power line cycles (1, 2, 10, or 100 PLCs) provide normal mode (line frequency noise) rejection. 2.) Setting the integration time also sets the resolution for the measurement. The following table shows the relationship between integration time and resolution.
Integration Time (power line cycles) Resolution
0.001 PLC (34411A only) 30 ppm x Range
0.002 PLC (34411A only) 15 ppm x Range
0.006 PLC 6.0 ppm x Range
0.02 PLC 3.0 ppm x Range
0.06 PLC 1.5 ppm x Range
0.2 PLC 0.7 ppm x Range
1 PLC (default) 0.3 ppm x Range
2 PLC 0.2 ppm x Range
10 PLC 0.1 ppm x Range
100 PLC 0.03 ppm x Range
get_nplc()
Return the value of nplc
for the used measurement function.
set_resolution($resolution)
Set a new resolution for the used measurement function.
Give the current value RANGE
of the current range, $resolution
is given in terms of $resolution * RANGE
or [MIN|MAX|DEF]
. $resolution=0.0001
means 4 1/2 digits for example. $resolution must be larger than 0.3e-6xRANGE. The best resolution is range = 100mV ==> resoltuion = 3e-8V DEF
will be set, if no value is given.
get_resolution()
Return the resolution of the used measurement function.
set_tc($tc)
Set a new value for the predefined INTEGRATION TIME
for the used measurement function.
INTEGRATION TIME
$tc can be 1e-4 ... 1s | MIN | MAX | DEF
.
NOTE: 1.) Only those integration times set to an integral number of power line cycles (1, 2, 10, or 100 PLCs) provide normal mode (line frequency noise) rejection. 2.) Setting the integration time also sets the resolution for the measurement. The following table shows the relationship between integration time and resolution.
Integration Time (power line cycles) Resolution
0.001 PLC (34411A only) 30 ppm x Range
0.002 PLC (34411A only) 15 ppm x Range
0.006 PLC 6.0 ppm x Range
0.02 PLC 3.0 ppm x Range
0.06 PLC 1.5 ppm x Range
0.2 PLC 0.7 ppm x Range
1 PLC (default) 0.3 ppm x Range
2 PLC 0.2 ppm x Range
10 PLC 0.1 ppm x Range
100 PLC 0.03 ppm x Range
get_tc()
Return the INTEGRATION TIME
of the used measurement function.
set_bw($bw)
Set a new BANDWIDTH
for the used measurement function, which must be VOLTAGE:AC
or CURRENT:AC
.
$bw
can be 3 ... 200Hz | MIN | MAX | DEF
.
get_bw()
Return the bandwidth of the used measurement function, which must be VOLTAGE:AC
or CURRENT:AC
.
config_measurement
old style:
$agilent->config_measurement($function, $number_of_points, <$time>, <$range>);
new style:
$agilent->config_measurement({
'function' => $function,
'nop' => $number_of_points,
'time' => <$time>,
'range' => <$range>
});
Preset the Agilent34410A for a TRIGGERED measurement.
- $function
-
FUNCTION
can be one of the measurement methods of the Agilent34410A."current:dc" --> DC current measurement "current:ac" --> AC current measurement "voltage:dc" --> DC voltage measurement "voltage:ac" --> AC voltage measurement "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
- $number_of_points
-
Preset the
NUMBER OF POINTS
to be taken for one measurement trace. The single measured points will be stored in the internal memory of the Agilent34410A. For the Agilent34410A the internal memory is limited to 50.000 values. - <$time>
-
Preset the
TIME
duration for one full trace. FromTIME
the integration time value for each measurement point will be derived [TC = (TIME *50Hz)/NOP]. Expected values are between 0.0001*NOP ... 1*NOP seconds. - <$range>
-
RANGE
is given in terms of amps, volts or ohms and can be-3...+3A | MIN | MAX | DEF | AUTO
,100mV...1000V | MIN | MAX | DEF | AUTO
or0...1e9 | MIN | MAX | DEF | AUTO
.DEF
is defaultAUTO
activates the AUTORANGE-mode.DEF
will be set, if no value is given.
trg()
$agilent->trg();
Sends a trigger signal via the GPIB-BUS
to start the predefined measurement. The LabVisa-script can immediatally be continued, e.g. to start another triggered measurement using a second Agilent34410A.
get_data($readings)
reads all recorded values from the internal buffer and returnes them as an array of floatingpoint values. reading the buffer will start immediately. The LabVisa-script cannot be continued until all requested readings have been recieved.
- <$readings>
-
readINGS
can be a number between 1 and 50.000 or 'ALL' to specifiy the number of values to be read from the buffer. If $readings is not defined, the default value "ALL" will be used.
abort()
Aborts current (triggered) measurement.
wait()
Wait until triggered measurement has been finished.
active()
Returns '1' if the current triggered measurement is still active and '0' if the current triggered measurement has allready been finished.
display_text($text)
Display $text
on the front panel. The multimeter will display up to 12 characters in a message; any additional characters are truncated.
Without parameter, the displayed message is returned.
display_on()
Turn the front-panel display on.
display_off()
Turn the front-panel display off.
display_off
$agilent->display_off();
Turn the front-panel display off.
display_clear()
Clear the message displayed on the front panel.
beep()
Issue a single beep immediately.
SEE ALSO
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by the Lab::Measurement team; in detail:
Copyright 2012 Andreas K. Huettel, Stefan Geissler
2013 Alois Dirnaichner, Andreas K. Huettel, Christian Butschkow, Stefan Geissler
2014 Christian Butschkow
2016 Simon Reinhardt
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.