Lab::Instrument::Agilent34420A - HP/Agilent 34420A or 34421A digital multimeter
.
use Lab::Instrument::Agilent34420A; my $agilent=new Lab::Instrument::Agilent34420A(0,22); print $agilent->get_value();
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.
my $agilent=new(\%options);
$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 can be one of the measurement methods of the Agilent34420A.
FUNCTION
"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 is given in terms of volts or ohms and can be 1mV...100V|MIN|MAX|DEF|AUTO or 1...1e6|MIN|MAX|DEF|AUTO. DEF is default AUTO activates the AUTORANGE-mode. DEF will be set, if no value is given.
RANGE
1mV...100V|MIN|MAX|DEF|AUTO
1...1e6|MIN|MAX|DEF|AUTO
DEF
AUTO
AUTORANGE-mode
INTEGratioN controlles the integration mode and the integration time. It is composed of two parts:
INTEGratioN
1.) Integration mode: 'nplc=' --> Number of Power Line Cycles MODE 'res=' --> Resolution-MODE
If 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
$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.
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 Agilent34420A nanovoltmeter. for the Agilent34420A nanovoltmeter the internal memory is limited to 1024 values.
NUMBER OF POINTS
Preset the NUMBER of POWER LINE CYCLES which 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 values 0.02 | 0.2 | 1 | 2 | 10 | 20 | 100 | 200 | MIN | MAX.
NUMBER of POWER LINE CYCLES
0.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.
$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.
$agilent->abort();
doesn't work, because Agilent 34420A doesn't accept any new SPCI COMMANDS until last COMMAND has been completed.
SPCI COMMANDS
COMMAND
@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.
$agilent->set_function($function);
Set a new value for the measurement function of the Agilent34420A nanovoltmeter.
$agilent->set_range($range, $function);
Set a new value for the predefined RANGE for the measurement function $function of the Agilent34420A nanovoltmeter.
$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.
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.
$agilent->set_resolution($resolution, $function);
Set a new value for the predefined resOLUTION for the measurement function $function of the Agilent34420A nanovoltmeter.
resOLUTION
resOLUTION is given in terms of $resolution*$range or [MIN|MAX|DEF]. $resolution=0.0001 means 4 1/2 digits for example. $resolution can be 0.0001xRANGE ... 0.0000022xRANGE. The best resolution is 100nV: $range=0.1; $resolution=0.000001. DEF will be set, if no value is given.
$resolution*$range
[MIN|MAX|DEF]
$resolution=0.0001
$range=0.1
$resolution=0.000001
$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).
CHANNEL can be '1' for sense #1 or '2' for sense #2.
CHANNEL
$agilent->display_on();
Turn the front-panel display on.
$agilent->display_off();
Turn the front-panel display off.
$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.
$agilent->display_clear();
Clear the message displayed on the front panel.
$agilent->beep();
Issue a single beep immediately.
($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.
$agilent->reset();
Reset the multimeter to its power-on configuration.
$id=$agilent->id();
Returns the instruments ID string.
probably many
Stefan Geissler
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.