Lab::Instrument::Agilent34410A - HP/Agilent 34410A or 34411A digital multimeter
.
use Lab::Instrument::Agilent34410A; my $hp=new Lab::Instrument::Agilent34410A(0,22); print $agilent->get_value();
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.
my $hp=new(\%options);
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 can be one of the measurement methods of the Agilent34410A.
FUNCTION
"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 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.
RANGE
-3...+3A | MIN | MAX | DEF | AUTO
100mV...1000V | MIN | MAX | DEF | AUTO
0...1e9 | MIN | MAX | DEF | AUTO
DEF
AUTO
INTEGRATION controlles the integration mode and the integration time. It is composed of two parts:
INTEGRATION
1.) Integration mode: 'tc=' --> Integration-Time- or Aperture-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_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
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.
SENSOR can be one of the Temperature-Diodes defined in Lab::Instrument::TemperatureDiodes.
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.
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.
NUMBER OF POINTS
Preset the TIME duration for one full trace. From TIME 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.
TIME
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.
$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.
GPIB-BUS
$agilent->abort();
Aborts current (triggered) measurement.
$agilent->wait();
WAIT until triggered measurement has been finished.
WAIT
$agilent->active();
Returns '1' if the current triggered measurement is still active and '0' if the current triggered measurement has allready been finished.
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 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.
readINGS
old style: $agilent->set_function($function); new style: $agilent->set_function({ 'function' => $function });
Set a new value for the measurement function of the Agilent34410A.
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.
AUTORANGE-mode
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.
NUMBER of POWER LINE CYCLES
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.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 .
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
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.
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.
RESOLUTION
$resolution*$range
[MIN|MAX|DEF]
$resolution=0.0001
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.
INTEGRATION TIME
INTEGRATION TIME $tc can be 1e-4 ... 1s | MIN | MAX | DEF.
1e-4 ... 1s | MIN | MAX | DEF
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.
BANDWIDTH
VOLTAGE:AC
CURRENT:AC
"current:ac" --> AC current measurement "voltage:ac" --> AC voltage measurement
BANDWIDTH $bw can be 3 ... 200Hz | MIN | MAX | DEF.
3 ... 200Hz | MIN | MAX | DEF
$agilent->display_on();
Turn the front-panel display on.
$agilent->display_off();
Turn the front-panel display off.
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.
$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
set_tc
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.