NAME
Lab::Instrument::Agilent34410A - HP/Agilent 34410A or 34411A digital multimeter
.
SYNOPSIS
use Lab::Instrument::Agilent34410A;
my $hp=new Lab::Instrument::Agilent34410A(0,22);
print $agilent->get_value();
.
DESCRIPTION
The Lab::Instrument::Agilent34410A class implements an interface to the 34410A and 34411A digital multimeters by Agilent (formerly HP). Note that the module Lab::Instrument::Agilent34410A still works for those older multimeter models.
.
CONSTRUCTOR
my $hp=new(\%options);
.
METHODS
get_value
old style:
$value=$agilent->get_value(<$function>,<$range>,<$integration>);
new style:
$value=$agilent->get_value({
'function' => <$function>,
'range' => <$range>,
'integration' => {
'mode' => <int_mode>,
'value' => <int_value>
}
});
Request a measurement value. If optinal paramters are defined, some device paramters can be preset before the request for a measurement value is sent to the device.
- <$function>
-
FUNCTIONcan 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) - <$range>
-
RANGEis given in terms of amps, volts or ohms and can be-3...+3A | MIN | MAX | DEF | AUTO,100mV...1000V | MIN | MAX | DEF | AUTOor0...1e9 | MIN | MAX | DEF | AUTO.DEFis defaultAUTOactivates the AUTORANGE-mode.DEFwill be set, if no value is given. - <$integration>
-
INTEGRATIONcontrolles the integration mode and the integration time. It is composed of two parts:1.) Integration mode: 'tc=' --> Integration-Time- or Aperture-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_tc, set_resolution, set_nplc
Examples:
a) $integration = 'tc=0.2' --> Integration mode = Integration-Time- or Aperture-MODE --> Integration Time = 0.2 seconds b) $integration = 'nplc=5' --> Integration mode = Number of Power Line Cycles MODE --> Integration Time = 5 Powerline cycles = 5 * 1/50 Hz = 0.1 seconds c) $integration = 'res=0.00001' --> Integration mode = Resolution-MODE --> Integration Time = will be choosen automaticly to guarantee the requested resolution d) $integration = '1' --> Integration mode = Number of Power Line Cycles MODE --> Integration Time = 1 Powerline cycles = 1 * 1/50 Hz = 0.02 seconds
.
get_T
old style:
$value=$agilent->get_value($sensor);
new style:
$value=$agilent->get_value({
'sensor' => $sensor
});
Make a measurement defined by $function with the previously specified range and integration time.
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
-
FUNCTIONcan 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 POINTSto 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
TIMEduration for one full trace. FromTIMEthe 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>
-
RANGEis given in terms of amps, volts or ohms and can be-3...+3A | MIN | MAX | DEF | AUTO,100mV...1000V | MIN | MAX | DEF | AUTOor0...1e9 | MIN | MAX | DEF | AUTO.DEFis defaultAUTOactivates the AUTORANGE-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 LabVisa-script can immediatally be continued, e.g. to start another triggered measurement using a second Agilent34410A.
.
abort
$agilent->abort();
Aborts current (triggered) measurement.
.
wait
$agilent->wait();
WAIT until triggered measurement has been finished.
.
active
$agilent->active();
Returns '1' if the current triggered measurement is still active and '0' if the current triggered measurement has allready been finished.
.
get_data
old style:
@data = $agilent->get_data(<$readings>);
new style:
@data = $agilent->get_data({
'readings' => <$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>
-
readINGScan 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.
.
set_function
old style:
$agilent->set_function($function);
new style:
$agilent->set_function({
'function' => $function
});
Set a new value for the measurement function of the Agilent34410A.
- $function
-
FUNCTIONcan 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)
.
set_range
old style:
$agilent->set_range($function,$range);
new style:
$agilent->set_range({
'function' => $function,
'range' => $range
});
Set a new value for the predefined RANGE for the measurement function $function of the Agilent34410A.
- $function
-
FUNCTIONcan 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) - $range
-
RANGEis given in terms of amps, volts or ohms and can be-3...+3A | MIN | MAX | DEF | AUTO,100mV...1000V | MIN | MAX | DEF | AUTOor0...1e9 | MIN | MAX | DEF | AUTO.DEFis defaultAUTOactivates theAUTORANGE-mode.DEFwill be set, if no value is given.
.
set_nplc
old style:
$agilent->set_nplc($function,$nplc);
new style:
$agilent->set_nplc({
'function' => $function,
'nplc' => $nplc
});
Set a new value for the predefined NUMBER of POWER LINE CYCLES for the measurement function $function of the Agilent34410A.
- $function
-
FUNCTIONcan 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) - $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.006 ... 100 but internally the Agilent34410A selects the value closest to one of the following fixed values0.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
.
set_resolution
old style:
$agilent->set_resolution($function,$resolution);
new style:
$agilent->set_resolution({
'function' => $function,
'resolution' => $resolution
});
Set a new value for the predefined RESOLUTION for the measurement function $function of the Agilent34410A nanovoltmeter.
- $function
-
FUNCTIONcan 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) - $resolution
-
RESOLUTIONis given in terms of$resolution*$rangeor[MIN|MAX|DEF].$resolution=0.0001means 4 1/2 digits for example. $resolution must be larger than 0.3e-6xRANGE. The best resolution is range = 100mV ==> resoltuion = 3e-8VDEFwill be set, if no value is given.
.
set_tc
old style:
$agilent->set_tc($function,$tc);
new style:
$agilent->set_tc({
'function' => $function,
'tc' => $tc
});
Set a new value for the predefined INTEGRATION TIME for the measurement function $function of the Agilent34410A.
- $function
-
FUNCTIONcan 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) - $tc
-
INTEGRATION TIME$tc can be1e-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
.
set_bw
old style:
$agilent->set_bw($function,$bw);
new style:
$agilent->set_bw({
'function' => $function,
'bandwidth' => $bw
});
Set a new value for the predefined BANDWIDTH for the measurement function $function of the Agilent34410A. This function can only be used for the functions VOLTAGE:AC and CURRENT:AC.
- $function
-
FUNCTIONcan be one of the measurement methods of the Agilent34410A."current:ac" --> AC current measurement "voltage:ac" --> AC voltage measurement - $bw
-
BANDWIDTH $bw can be
3 ... 200Hz | MIN | MAX | DEF.
.
display_on
$agilent->display_on();
Turn the front-panel display on.
.
display_off
$agilent->display_off();
Turn the front-panel display off.
.
display_text
old style:
$agilent->display_text($text);
new style:
$agilent->display_text({
'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.
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
.
AUTHOR/COPYRIGHT
Stefan Geissler
.