| Lab-Instrument documentation | Contained in the Lab-Instrument distribution. |
Lab::Instrument::HP3458A - Agilent 3458A Multimeter
use Lab::Instrument::HP3458A;
my $dmm=new Lab::Instrument::HP3458A({
GPIB_board => 0,
GPIB_address => 11,
});
print $dmm->read_voltage_dc();
The Lab::Instrument::HP3458A class implements an interface to the Agilent / HP 3458A digital multimeter. The Agilent 3458A Multimeter, recognized the world over as the standard in high performance DMMs, provides both speed and accuracy in the R&D lab, on the production test floor, and in the calibration lab.
my $hp=new(\%options);
$datum=$hp->read_voltage_dc();
Make a dc voltage measurement.
$hp->display_on();
Turn the front-panel display on.
$hp->display_off();
Turn the front-panel display off.
$hp->display_text($text);
print $hp->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.
$hp->display_clear();
Clear the message displayed on the front panel.
$hp->beep();
Issue a single beep immediately.
($err_num,$err_msg)=$hp->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.
$hp->set_nlcp($number);
Sets the integration time in power line cycles.
$hp->reset();
Reset the multimeter to its power-on configuration.
$hp->preset($config);
Choose one of several configuration presets (0: fast, 1: norm, 2: DIG).
$hp->selftest();
Starts the internal self-test routine.
$hp->autocalibration();
Starts the internal autocalibration. Warning... this procedure takes 11 minutes!
probably many
This is $Id: HP3458A.pm 613 2010-04-14 20:40:41Z schroeer $
Copyright 2009, 2010 David Kalok, Andreas K. Huettel
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Lab-Instrument documentation | Contained in the Lab-Instrument distribution. |
#$Id: HP3458A.pm 613 2010-04-14 20:40:41Z schroeer $ package Lab::Instrument::HP3458A; use strict; use Lab::Instrument; our $VERSION = sprintf("0.%04d", q$Revision: 613 $ =~ / (\d+) /); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; bless ($self, $class); $self->{vi}=new Lab::Instrument(@_); return $self } sub read_value { # Triggers one Measurement and Reads it my $self=shift; $self->{vi}->Write("TRIG SGL"); my $val= $self->{vi}->BrutalRead(16); chomp $val; return $val; } sub read_voltage_dc { my $self=shift; $self->{vi}->Write("DCV"); my $val= $self->{vi}->BrutalRead(16); return $val #$self->{vi}->Query("DCV"); } sub set_nplc { my $self=shift; my $n=shift; $self->{vi}->Write("NPLC $n"); } sub selftest { my $self=shift; $self->{vi}->Write("TEST"); } sub autocalibration { # Warning... this procedure takes 11 minutes! my $self=shift; $self->{vi}->Write("ACAL ALL"); } sub reset { my $self=shift; $self->{vi}->Write("PRESET NORM"); } sub display_text { my $self=shift; my $text=shift; if ($text) { $self->{vi}->Write(qq(DISPlay:TEXT "$text")); } else { chomp($text=$self->{vi}->Query(qq(DISPlay:TEXT?))); $text=~s/\"//g; } return $text; } sub display_text { my $self=shift; my $text=shift; $self->{vi}->Write("DISP MSG,\"$text\""); } sub display_on { my $self=shift; $self->{vi}->Write("DISP ON"); } sub display_off { my $self=shift; $self->{vi}->Write("DISP OFF"); } sub display_clear { my $self=shift; $self->{vi}->Write("DISP CLR"); } sub beep { # It beeps! my $self=shift; $self->{vi}->Write("BEEP"); } sub get_error { my $self=shift; chomp(my $err=$self->{vi}->Query("SYSTem:ERRor?")); my ($err_num,$err_msg)=split ",",$err; $err_msg=~s/\"//g; return ($err_num,$err_msg); } sub preset { # Sets HP3458A into predefined configurations # 0 Fast # 1 Norm # 2 DIG my $self=shift; my $preset=shift; my $cmd=sprintf("PRESET %u",$preset); $self->{vi}->Write($cmd); } 1;