HPIB interfacing

Peter Hansen peter at engcorp.com
Thu Feb 27 18:19:31 EST 2003


Calvin Fong wrote:
> 
> Dear all,
>     Did anyone use python to control hpib instrusments for automatic
> measurement? I really want to use python as my programming language.
>     Please let me know if u r doing exactly the same.

We've used an inhouse wrapper around the National Instruments GPIB
library using calldll to build a system which uses GPIB to control
RF instruments for automated factory testing of industrial products
built by my current employer.

It's relatively straight-forward to do, and depending on where you
head with this, we could probably make this code available to you
(but the usual warning for this kind of thing applies: it's extremely
crufty code, not 100% reliable talking to the devices (although it
runs for months at a time there are still some latent bugs), and 
not documented at all).

We'd be rewriting the wrapper using ctypes at this point if the 
code still had to be supported, which as of now appears not to be
part of our strategy...

Oh... using Python for this kind of thing: pure pleasure!  The
high-level code was a breeze to write.  In fact, the first version
of the tool, with a GUI interface and nine different tests
checking parameters like intermod product and gain (using a
pair of signal generators and a spectrum analyzer) took me only
one week (probably a sixty-hour week mind you) to write back
in 2000.  I would have killed myself first if I hadn't had Python
to use.

-Peter




More information about the Python-list mailing list