NAME
Lab::Instrument - General VISA based instrument
SYNOPSIS
use Lab::Instrument;
my $hp22 = new Lab::Instrument(0,22); # gpib board 0, address 22
print $hp22->Query('*IDN?');
DESCRIPTION
Lab::Instrument
offers an abstract interface to an instrument, that is connected via GPIB, serial connection or ethernet. It provides general read
, write
and query
methods, and more.
It can be used either directly by the laborant (programmer) to work with an instrument that doesn't have its own perl class (like Lab::Instrument::HP34401A). Or it can be used by such a specialized perl instrument class (like Lab::Instrument::HP34401A), to delegate the actual visa work. (All the instruments in the default package do so.)
CONSTRUCTORS
new
$instrument=new Lab::Instrument($gpib_board,$gpib_addr);
$instrument2=new Lab::Instrument({GPIB_board => $board, GPIB_address => $addr});
METHODS
Write
$write_count=$instrument->Write($command);
Query
$result=$instrument->Query($command);
Clear
$instrument->Clear();
Handle
$instr_handle=$instrument->Handle();
CAVEATS/BUGS
Probably many.
SEE ALSO
AUTHOR/COPYRIGHT
This is $Id: Instrument.pm 272 2005-12-12 00:56:50Z schroeer $
Copyright 2004/2005 Daniel Schröer (http://www.danielschroeer.de)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 191:
Non-ASCII character seen before =encoding in 'Schröer'. Assuming CP1252