Anyone used Python for GPIB instrument control?
europax at home.com
europax at home.com
Sat Jul 8 15:55:57 EDT 2000
Thanks for replying. I found some Python code that uses WinDLL from the
DynWin package to control GPIB. I am going to try that first. I think
that the Perl people are using a wrapper for the National Instruments
gpib-32.dll. I wonder if I can use that wrapper as-is?
I want to get something that is at least operational real fast. So I
can do some Python programming. For some reason whenever I have to
learn a new programming language, I always have to do something really
esoteric from the start :) Hopefully later on I can learn to use swig.
Rob.
Suchandra Thapa wrote:
>
> europax at home.com <europax at home.com> wrote:
> >Hello all,
> >
> >I am new to this ng and to Python. I am wondering if anyone has used
> >Python to control a National Instruments GPIB card on a Windows NT box?
> >I've searched and found a couple of references on my own.
> >
> >A group at work is using Perl for this task and there is some pressure
> >to go along with them. I've tried Perl, and frankly, assembly language
> >is clearer than Perl code to me. However, Python passed my test as I
> >was able to do something with it in the first minute- and I can
> >understand what most of the syntax means.
>
> I'm not sure if an equivalent exists for windows but try look
> swig. It allows you to use c/c++ code within python. From what
> I remember from using a GPIB interface to a Tektronics scope, you
> don't need much more than some basic c code to accept a string or a
> pointer to a buffer and pass it on to the driver. You also need a
> function to get a return code and pass it back to your python code.
> Although I'm not familiar with them, I think you may be able to
> write a basic COM/ActiveX object and use it in your python code.
> How is the rest of your group controling the GPIB in perl? You
> may be able to use the same methods in python.
>
> --
> ------------------------------------------------------------------
>
> Suchandra S. Thapa
> s-thapa at uchicago.edu
>
> ------------------------------------------------------------------
More information about the Python-list
mailing list