NAME
Lab::Instrument::Agilent34420A - HP/Agilent/Keysight 34420A or 34421A digital multimeter
VERSION
version 3.690
SYNOPSIS
use Lab::Instrument::Agilent34420A;
my $agilent=new Lab::Instrument::Agilent34420A(0,22);
print $agilent->get_value();DESCRIPTION
The Lab::Instrument::Agilent34420A class implements an interface to the 34420A and 34421A digital multimeters by Agilent (formerly HP). Note that the module Lab::Instrument::Agilent34420A still works for those older multimeter models.
CONSTRUCTOR
my $agilent=new(\%options);METHODS
get_value
$value=$agilent->get_value(<$function>,<$range>,<$integration>);Request a measurement value. If optinal paramters are defined, some device paramters can be preset befor the request of a measurement value.
- $function
- 
FUNCTIONcan be one of the measurement methods of the Agilent34420A."voltage" --> voltage measurement using the currently selected sense "sense1:voltage" --> voltage measurement useing sense #1 "sense2:voltage" --> voltage measurement useing sense #2 "voltage:ratio" --> voltage measurment + calculation V[sense #1]/ V[sense #2] "voltage:diff" --> voltage measurment + calculation V[sense #1] - V[sense #2] "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
- $range
- 
RANGEis given in terms of volts or ohms and can be1mV...100V|MIN|MAX|DEF|AUTOor1...1e6|MIN|MAX|DEF|AUTO.DEFis defaultAUTOactivates theAUTORANGE-mode.DEFwill be set, if no value is given.
- <$resolution>
- 
INTEGratioNcontrolles the integration mode and the integration time. It is composed of two parts:1.) Integration mode: 'nplc=' --> Number of Power Line Cycles MODE 'res=' --> Resolution-MODEIf no Integration mode is given, the 'Number of Power Line Cycles MODE' will be selected as default. 2.) Integration Time: Floating point number or MIN, MAX, DEF.For detailed information about the valid range for the integration time see set_resolution, set_nplc Examples: a) $integration = 'nplc=5' --> Integration mode = Number of Power Line Cycles MODE --> Integration Time = 5 Powerline cycles = 5 * 1/50 Hz = 0.1 seconds b) $integration = 'res=0.00001' --> Integration mode = Resolution-MODE --> Integration Time = will be choosen automaticly to guarantee the requested resolution c) $integration = '1' --> Integration mode = Number of Power Line Cycles MODE --> Integration Time = 1 Powerline cycles = 1 * 1/50 Hz = 0.02 seconds
config_measurement
$agilent->config_measurement($function, $number_of_points, <$nplc>, <$range>);Preset the Agilent34420A nanovoltmeter for a TRIGGERED measurement. Returns the duration to record the defined trace.
NOTE: The Agilent34420A nanovoltmeter allows only specified values for the integration time, namely 0.02, 0.2, 1, 2, 10, 20, 100, or 200 Power-line-cycles. --> the duration to recored one trace depends on these specific values and the number of points to be recorded.
- $function
- 
FUNCTIONcan be one of the measurement methods of the Agilent34420A."voltage" --> voltage measurement using the currently selected sense "sense1:voltage" --> voltage measurement useing sense #1 "sense2:voltage" --> voltage measurement useing sense #2 "voltage:ratio" --> voltage measurment + calculation V[sense #1]/ V[sense #2] "voltage:diff" --> voltage measurment + calculation V[sense #1] - V[sense #2] "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
- $number_of_points
- 
Preset the NUMBER OF POINTSto be taken for one measurement trace. The single measured points will be stored in the internal memory of the Agilent34420A nanovoltmeter. for the Agilent34420A nanovoltmeter the internal memory is limited to 1024 values.
- <$nplc>
- 
Preset the NUMBER of POWER LINE CYCLESwhich is actually something similar to an integration time for recording a single measurement value. The values for $nplc can be any value between 0.02 ... 200 but internally the Agilent34420A nanovoltmeter selects the value closest to one of the following fixed values0.02 | 0.2 | 1 | 2 | 10 | 20 | 100 | 200 | MIN | MAX.Example: Assuming $nplc to be 20 and assuming a netfrequency of 50Hz this results in an integration time of 20*50Hz = 0.4 seconds for each measured value. Assuming $number_of_points to be 100 it takes in total 40 seconds to record all values for the trace. 
- <$range>
- 
RANGEis given in terms of volts or ohms and can be1mV...100V|MIN|MAX|DEF|AUTOor1...1e6|MIN|MAX|DEF|AUTO.DEFis defaultAUTOactivates theAUTORANGE-mode.DEFwill be set, if no value is given.
trg
$agilent->trg();Sends a trigger signal via the GPIB-BUS to start the predefined measurement. The Agilent34420A nanovoltmeter won't accept any new commands until data-recording has been finished. Unfortunatelly it is not possible to stop an once started measurement. The LabVisa-script can immediatally be continued, e.g. to start another triggered measurement using a second Agilent34420A nanovoltmeter.
abort
$agilent->abort();doesn't work, because Agilent 34420A doesn't accept any new SPCI COMMANDS until last COMMAND has been completed.
get_data
@data = $agilent->get_data();Reads all recorded values from the internal buffer and returnes them as an array of floatingpoint values. Reading the buffer will not start before all predevined measurement values ($number_of_points) have been recorded.
set_function
$agilent->set_function($function);Set a new value for the measurement function of the Agilent34420A nanovoltmeter.
- $function
- 
FUNCTION can be one of the measurement methods of the Agilent34420A. "voltage" --> voltage measurement using the currently selected sense "sense1:voltage" --> voltage measurement useing sense #1 "sense2:voltage" --> voltage measurement useing sense #2 "voltage:ratio" --> voltage measurment + calculation V[sense #1]/ V[sense #2] "voltage:diff" --> voltage measurment + calculation V[sense #1] - V[sense #2] "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
set_range
$agilent->set_range($range, $function);Set a new value for the predefined RANGE for the measurement function $function of the Agilent34420A nanovoltmeter.
- $function
- 
FUNCTION can be one of the measurement methods of the Agilent34420A. "voltage" --> voltage measurement using the currently selected sense "sense1:voltage" --> voltage measurement useing sense #1 "sense2:voltage" --> voltage measurement useing sense #2 "voltage:ratio" --> voltage measurment + calculation V[sense #1]/ V[sense #2] "voltage:diff" --> voltage measurment + calculation V[sense #1] - V[sense #2] "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
- $range
- 
RANGEis given in terms of volts or ohms and can be1mV...100V|MIN|MAX|DEF|AUTOor1...1e6|MIN|MAX|DEF|AUTO.DEFis defaultAUTOactivates theAUTORANGE-mode.DEFwill be set, if no value is given.
set_nplc
$agilent->set_nplc($nplc, $function);Set a new value for the predefined NUMBER of POWER LINE CYCLES for the measurement function $function of the Agilent34420A nanovoltmeter.
- $function
- 
FUNCTION can be one of the measurement methods of the Agilent34420A. "voltage" --> voltage measurement using the currently selected sense "sense1:voltage" --> voltage measurement useing sense #1 "sense2:voltage" --> voltage measurement useing sense #2 "voltage:ratio" --> voltage measurment + calculation V[sense #1]/ V[sense #2] "voltage:diff" --> voltage measurment + calculation V[sense #1] - V[sense #2] "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
- $nplc
- 
Preset the NUMBER of POWER LINE CYCLESwhich is actually something similar to an integration time for recording a single measurement value. The values for $nplc can be any value between 0.02 ... 200 but internally the Agilent34420A nanovoltmeter selects the value closest to one of the following fixed values0.02 | 0.2 | 1 | 2 | 10 | 20 | 100 | 200 | MIN | MAX.Example: Assuming $nplc to be 20 and assuming a netfrequency of 50Hz this results in an integration time of 20*50Hz = 0.4 seconds for each measured value. 
set_resolution
$agilent->set_resolution($resolution, $function);Set a new value for the predefined resOLUTION for the measurement function $function of the Agilent34420A nanovoltmeter.
- $function
- 
FUNCTION can be one of the measurement methods of the Agilent34420A. "voltage" --> voltage measurement using the currently selected sense "sense1:voltage" --> voltage measurement useing sense #1 "sense2:voltage" --> voltage measurement useing sense #2 "voltage:ratio" --> voltage measurment + calculation V[sense #1]/ V[sense #2] "voltage:diff" --> voltage measurment + calculation V[sense #1] - V[sense #2] "resistance" --> resistance measurement (2-wire) "fresistance" --> resistance measurement (4-wire)
- $resolution
- 
resOLUTIONis given in terms of$resolution*$rangeor[MIN|MAX|DEF].$resolution=0.0001means 4 1/2 digits for example. $resolution can be 0.0001xRANGE ... 0.0000022xRANGE. The best resolution is 100nV:$range=0.1;$resolution=0.000001.DEFwill be set, if no value is given.
set_channel
$agilent->set_channel($channel);Select the active sensing terminal. This function can only be used if the active FUNCTION is in the voltage mode ( not resistance or Fresistance).
display_on
$agilent->display_on();Turn the front-panel display on.
display_off
$agilent->display_off();Turn the front-panel display off.
display_text
$agilent->display_text($text);
print $agilent->display_text();Display a message 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_clear
$agilent->display_clear();Clear the message displayed on the front panel.
beep
$agilent->beep();Issue a single beep immediately.
get_error
($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.
id
$id=$agilent->id();Returns the instruments ID string.
CAVEATS/BUGS
probably many
SEE ALSO
COPYRIGHT AND LICENSE
This software is copyright (c) 2019 by the Lab::Measurement team; in detail:
Copyright 2013-2015  Christian Butschkow
          2016       Simon Reinhardt
          2017       Andreas K. HuettelThis is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.