Lab::VISA

This library offers a perl interface to National Instrument's NI-VISA library.

With this library you can easily control the instruments in your lab (multimeters, voltage sources, magnet sources, pulse generators etc.) with Perl. You can perform complicated measurement jobs with just some Perl loops.

Even better: The Lab::Instrument class reduces the communication overhead to simple read, write and query methods. On top of this, there are specialized instrument classes (virtual instruments) such as Lab::Instrument::HP34401A, that offer even more high level comfort with methods such as read_voltage.

The Lab::Tools package offers classes to simplify the task of logging data to disk and maintaining this data.

INSTALLATION

This library has been tested to work on Linux and Windows.

A step-by-step installation tutorial for Windows is given below.

As a Linux user you will probably be able to figure out things yourself. Before you start, you must have the VISA library by National Instrument installed. If you plan to use GPIB connections (which is very likely), you must also have the necessary drivers (NI-488.2) for your GPIB adapter card installed. Refer to the good documentation by National Instrument to learn about these packages. See National Instrument's website at http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=132060_US

FURTHER SUPPORT

A general introduction to using Lab::Visa is given in Lab::VISA::Tutorial. A description of the various APIs can be found in the respective POD sections, i.e. at Lab::VISA.

In case you encounter any problems, you are encouraged to use a public forum for discussion. This way future users will be able to take advantage of your findings.

There is a mailing list set up for Lab::VISA at https://www-mailman.uni-regensburg.de/mailman/listinfo/lab-visa-users

A webbased discussion forum (that can be reached from the CPAN page) is located at http://cpanforum.com/dist/Lab-VISA

Bugs can be reported to https://rt.cpan.org/Public/Dist/Display.html?Name=Lab-VISA

You will also find that the authors of this package are always happy to receive feedback.

WINDOWS INSTALLATION

Instructions for installing Lab::VISA, Lab::Instrument, Lab::Tools, and dependencies on a Windows XP system.

0

Work with administrator account during installation.

1

Install VISA (and GPIB drivers) if necessary.

  • Download current VISA release from NI (tested with 4.4.1, 4.5.0)

  • Run installer

  • Check location of visa32.lib (eg. C:\Programme\IVI Foundation\VISA\WinNT\lib\msc\visa32.lib) and remember for later.

2

Install Microsoft Visual C++ from http://www.microsoft.com/express/Downloads/

From now on run all commandline programs during installation only from the "Visual Studio Command line", which can be found in the Start menu.

3

Install Perl.

4

Install gnuplot

5

Install dependencies of our perl modules. Depending on how familiar you are with the perl infrastructure, the easiest might be to use PPM, the Perl Package Manager included with ActivePerl.

Lab::Tools needs

  • XML::Generator (PPM would write it as XML-Generator)

  • XML::DOM

  • XML::Twig

  • YAML

6

Install Lab::VISA

  • Unzip/copy sources

  • In file Makefile.PL adapt the LIBS and INC settings according to your installation (the location looked up above). This is what worked for me:

    'LIBS' => ['-"lC:\\Programme\\IVI Foundation\\VISA\\WinNT\\lib\\msc\\visa32.lib"']
    'INC'  => '"-IC:\\Programme\\IVI Foundation\\VISA\\WinNT\\include"'
  • Run the following commands in the source directory

    perl Makefile.PL
    nmake
    nmake install
7

Install Lab::Instrument and Lab::Tools

  • Unzip/copy sources

  • Run the following commands in the source directory

    perl Build.PL
    perl Build
    perl Build install
8

Have fun!

COPYRIGHT AND LICENCE

(c) 2004-2006 Daniel Schröer
(c) 2007-2010 Daniel Schröer, Andreas Hüttel, Daniela Taubert, and others 

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

9 POD Errors

The following errors were encountered while parsing the POD:

Around line 66:

Expected text after =item, not a number

Around line 87:

Expected text after =item, not a number

Around line 94:

Expected text after =item, not a number

Around line 114:

Expected text after =item, not a number

Around line 135:

Expected text after =item, not a number

Around line 163:

Expected text after =item, not a number

Around line 191:

Expected text after =item, not a number

Around line 211:

Expected text after =item, not a number

Around line 219:

Non-ASCII character seen before =encoding in 'Schröer'. Assuming CP1252