[SciPy-User] DAQmx python wrapper

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[SciPy-User] DAQmx python wrapper

Sebastian Berg
Hey,

We are thinking about writing some DAQ programs in python, and I was
wondering if anyone can recommend a lib for that. There seem to be a
bunch of wrappers using ctypes, which seem all good enough, but if there
is something more highlevel or very well done, I would be happy to use
that :).

Regards,

Sebastian

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

Charles R Harris
Hi Sebastian,


On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg <[hidden email]> wrote:
Hey,

We are thinking about writing some DAQ programs in python, and I was
wondering if anyone can recommend a lib for that. There seem to be a
bunch of wrappers using ctypes, which seem all good enough, but if there
is something more highlevel or very well done, I would be happy to use
that :).

Regards,


Is DAQ data acquisition? If so, what sort of data?

Chuck

_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

John Hassler

On 4/24/2014 10:23 PM, Charles R Harris wrote:
Hi Sebastian,


On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg <[hidden email]> wrote:
Hey,

We are thinking about writing some DAQ programs in python, and I was
wondering if anyone can recommend a lib for that. There seem to be a
bunch of wrappers using ctypes, which seem all good enough, but if there
is something more highlevel or very well done, I would be happy to use
that :).

Regards,


Is DAQ data acquisition? If so, what sort of data?

Chuck

Which DAQ are you using?  There is 'comedi' for internal boards, but I don't know of anything except the "ctype wrappers" for usb boxes.  When I started doing this several years ago, I wrote my own ctype wrappers to access the dll for the Measurement Computing USB-1208 and for the NI-USB6008.  Mine were very simple, and did only what I needed.  There's a number of them on the web now, but I haven't looked an any of them in detail.

Andrew Straw wrote a very nice object-oriented driver for the Measurement Computing USB devices in Python.  However, I found references to it in Cookbook/Data Acquisition, but I couldn't find the actual PyUniversalLibrary.  Maybe it's no longer active.

"Ctype wrappers" have worked very well for me.  We have one experiment using two USB-1208 and one NI-USB-6008 simultaneously in a single Python program with a Tkinter GUI, and it works fine.

john



_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

Sebastian Berg
On Sa, 2014-04-26 at 09:04 -0400, John Hassler wrote:

>
> On 4/24/2014 10:23 PM, Charles R Harris wrote:
>
> > Hi Sebastian,
> >
> >
> > On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg
> > <[hidden email]> wrote:
> >         Hey,
> >        
> >         We are thinking about writing some DAQ programs in python,
> >         and I was
> >         wondering if anyone can recommend a lib for that. There seem
> >         to be a
> >         bunch of wrappers using ctypes, which seem all good enough,
> >         but if there
> >         is something more highlevel or very well done, I would be
> >         happy to use
> >         that :).
> >        
> >         Regards,
> >        
> >
> >
> > Is DAQ data acquisition? If so, what sort of data?
> >
> >
> > Chuck
> >
> >
> Which DAQ are you using?  There is 'comedi' for internal boards, but I
> don't know of anything except the "ctype wrappers" for usb boxes.
> When I started doing this several years ago, I wrote my own ctype
> wrappers to access the dll for the Measurement Computing USB-1208 and
> for the NI-USB6008.  Mine were very simple, and did only what I
> needed.  There's a number of them on the web now, but I haven't looked
> an any of them in detail.
>

Sorry, thought the DAQ was more clear then it probably is. What we have
is a National instruments USB DAQ unit (M-Series). We are actually using
it more for analog output then input right now.

> Andrew Straw wrote a very nice object-oriented driver for the
> Measurement Computing USB devices in Python.  However, I found
> references to it in Cookbook/Data Acquisition, but I couldn't find the
> actual PyUniversalLibrary.  Maybe it's no longer active.
>

I will have a look if I find it, that sounds interesting, I also was
hoping that a wrapper could maybe help with multiprocessing magic to
separate the gui as much as possible from the signal generation. Though
maybe that is too high level to really do in any case.
I have started playing with one of the ctypes wrappers and it indeed
works very well. Rather annoying, because I initially wrote labview and
now have to realize that the C-Api is identical and can easily be called
from python, too :)...

- Sebastian

>
> "Ctype wrappers" have worked very well for me.  We have one experiment
> using two USB-1208 and one NI-USB-6008 simultaneously in a single
> Python program with a Tkinter GUI, and it works fine.
>
> john
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

Gary Pajer-2
I've used Andrew's wrapper, and it worked well.

But in the end I wrote my own routines using ctypes (stealing some ideas from Andrew).   I can't remember exactly why I wrote my own... it was several years ago.  But I do remember that it was really very easy to implement calls using ctypes.

~-~-~


On Sat, Apr 26, 2014 at 12:53 PM, Sebastian Berg <[hidden email]> wrote:
On Sa, 2014-04-26 at 09:04 -0400, John Hassler wrote:
>
> On 4/24/2014 10:23 PM, Charles R Harris wrote:
>
> > Hi Sebastian,
> >
> >
> > On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg
> > <[hidden email]> wrote:
> >         Hey,
> >
> >         We are thinking about writing some DAQ programs in python,
> >         and I was
> >         wondering if anyone can recommend a lib for that. There seem
> >         to be a
> >         bunch of wrappers using ctypes, which seem all good enough,
> >         but if there
> >         is something more highlevel or very well done, I would be
> >         happy to use
> >         that :).
> >
> >         Regards,
> >
> >
> >
> > Is DAQ data acquisition? If so, what sort of data?
> >
> >
> > Chuck
> >
> >
> Which DAQ are you using?  There is 'comedi' for internal boards, but I
> don't know of anything except the "ctype wrappers" for usb boxes.
> When I started doing this several years ago, I wrote my own ctype
> wrappers to access the dll for the Measurement Computing USB-1208 and
> for the NI-USB6008.  Mine were very simple, and did only what I
> needed.  There's a number of them on the web now, but I haven't looked
> an any of them in detail.
>

Sorry, thought the DAQ was more clear then it probably is. What we have
is a National instruments USB DAQ unit (M-Series). We are actually using
it more for analog output then input right now.

> Andrew Straw wrote a very nice object-oriented driver for the
> Measurement Computing USB devices in Python.  However, I found
> references to it in Cookbook/Data Acquisition, but I couldn't find the
> actual PyUniversalLibrary.  Maybe it's no longer active.
>

I will have a look if I find it, that sounds interesting, I also was
hoping that a wrapper could maybe help with multiprocessing magic to
separate the gui as much as possible from the signal generation. Though
maybe that is too high level to really do in any case.
I have started playing with one of the ctypes wrappers and it indeed
works very well. Rather annoying, because I initially wrote labview and
now have to realize that the C-Api is identical and can easily be called
from python, too :)...

- Sebastian

>
> "Ctype wrappers" have worked very well for me.  We have one experiment
> using two USB-1208 and one NI-USB-6008 simultaneously in a single
> Python program with a Tkinter GUI, and it works fine.
>
> john
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

Gary Pajer-2
Andrew Straw's PyUniversalLibrary appears to be on PyPi

~-~-~


On Mon, Apr 28, 2014 at 1:51 PM, Gary Pajer <[hidden email]> wrote:
I've used Andrew's wrapper, and it worked well.

But in the end I wrote my own routines using ctypes (stealing some ideas from Andrew).   I can't remember exactly why I wrote my own... it was several years ago.  But I do remember that it was really very easy to implement calls using ctypes.

~-~-~


On Sat, Apr 26, 2014 at 12:53 PM, Sebastian Berg <[hidden email]> wrote:
On Sa, 2014-04-26 at 09:04 -0400, John Hassler wrote:
>
> On 4/24/2014 10:23 PM, Charles R Harris wrote:
>
> > Hi Sebastian,
> >
> >
> > On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg
> > <[hidden email]> wrote:
> >         Hey,
> >
> >         We are thinking about writing some DAQ programs in python,
> >         and I was
> >         wondering if anyone can recommend a lib for that. There seem
> >         to be a
> >         bunch of wrappers using ctypes, which seem all good enough,
> >         but if there
> >         is something more highlevel or very well done, I would be
> >         happy to use
> >         that :).
> >
> >         Regards,
> >
> >
> >
> > Is DAQ data acquisition? If so, what sort of data?
> >
> >
> > Chuck
> >
> >
> Which DAQ are you using?  There is 'comedi' for internal boards, but I
> don't know of anything except the "ctype wrappers" for usb boxes.
> When I started doing this several years ago, I wrote my own ctype
> wrappers to access the dll for the Measurement Computing USB-1208 and
> for the NI-USB6008.  Mine were very simple, and did only what I
> needed.  There's a number of them on the web now, but I haven't looked
> an any of them in detail.
>

Sorry, thought the DAQ was more clear then it probably is. What we have
is a National instruments USB DAQ unit (M-Series). We are actually using
it more for analog output then input right now.

> Andrew Straw wrote a very nice object-oriented driver for the
> Measurement Computing USB devices in Python.  However, I found
> references to it in Cookbook/Data Acquisition, but I couldn't find the
> actual PyUniversalLibrary.  Maybe it's no longer active.
>

I will have a look if I find it, that sounds interesting, I also was
hoping that a wrapper could maybe help with multiprocessing magic to
separate the gui as much as possible from the signal generation. Though
maybe that is too high level to really do in any case.
I have started playing with one of the ctypes wrappers and it indeed
works very well. Rather annoying, because I initially wrote labview and
now have to realize that the C-Api is identical and can easily be called
from python, too :)...

- Sebastian

>
> "Ctype wrappers" have worked very well for me.  We have one experiment
> using two USB-1208 and one NI-USB-6008 simultaneously in a single
> Python program with a Tkinter GUI, and it works fine.
>
> john
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user



_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

josef.pktd



On Mon, Apr 28, 2014 at 3:39 PM, Gary Pajer <[hidden email]> wrote:
Andrew Straw's PyUniversalLibrary appears to be on PyPi


google search points here 

Josef 
~-~-~


On Mon, Apr 28, 2014 at 1:51 PM, Gary Pajer <[hidden email]> wrote:
I've used Andrew's wrapper, and it worked well.

But in the end I wrote my own routines using ctypes (stealing some ideas from Andrew).   I can't remember exactly why I wrote my own... it was several years ago.  But I do remember that it was really very easy to implement calls using ctypes.

~-~-~


On Sat, Apr 26, 2014 at 12:53 PM, Sebastian Berg <[hidden email]> wrote:
On Sa, 2014-04-26 at 09:04 -0400, John Hassler wrote:
>
> On 4/24/2014 10:23 PM, Charles R Harris wrote:
>
> > Hi Sebastian,
> >
> >
> > On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg
> > <[hidden email]> wrote:
> >         Hey,
> >
> >         We are thinking about writing some DAQ programs in python,
> >         and I was
> >         wondering if anyone can recommend a lib for that. There seem
> >         to be a
> >         bunch of wrappers using ctypes, which seem all good enough,
> >         but if there
> >         is something more highlevel or very well done, I would be
> >         happy to use
> >         that :).
> >
> >         Regards,
> >
> >
> >
> > Is DAQ data acquisition? If so, what sort of data?
> >
> >
> > Chuck
> >
> >
> Which DAQ are you using?  There is 'comedi' for internal boards, but I
> don't know of anything except the "ctype wrappers" for usb boxes.
> When I started doing this several years ago, I wrote my own ctype
> wrappers to access the dll for the Measurement Computing USB-1208 and
> for the NI-USB6008.  Mine were very simple, and did only what I
> needed.  There's a number of them on the web now, but I haven't looked
> an any of them in detail.
>

Sorry, thought the DAQ was more clear then it probably is. What we have
is a National instruments USB DAQ unit (M-Series). We are actually using
it more for analog output then input right now.

> Andrew Straw wrote a very nice object-oriented driver for the
> Measurement Computing USB devices in Python.  However, I found
> references to it in Cookbook/Data Acquisition, but I couldn't find the
> actual PyUniversalLibrary.  Maybe it's no longer active.
>

I will have a look if I find it, that sounds interesting, I also was
hoping that a wrapper could maybe help with multiprocessing magic to
separate the gui as much as possible from the signal generation. Though
maybe that is too high level to really do in any case.
I have started playing with one of the ctypes wrappers and it indeed
works very well. Rather annoying, because I initially wrote labview and
now have to realize that the C-Api is identical and can easily be called
from python, too :)...

- Sebastian

>
> "Ctype wrappers" have worked very well for me.  We have one experiment
> using two USB-1208 and one NI-USB-6008 simultaneously in a single
> Python program with a Tkinter GUI, and it works fine.
>
> john
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user



_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user



_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: DAQmx python wrapper

Samuel GARCIA
Hi,
I have wrote a project for acquisition in ptyhon. It is alpha level. And so, not released yet. But we use it everyday in my lab.
It is a simple layer on top of pycomedi (linux) or universal librabry via ctypes (on windows) and some other device.

It use zmq for dispatching buffer.
It also offer an osilloscope and timefrequency viewer in Qt.

Have a look if you want
https://github.com/samuelgarcia/pyacq


Best

Samuel


Le 28/04/2014 21:47, [hidden email] a écrit :



On Mon, Apr 28, 2014 at 3:39 PM, Gary Pajer <[hidden email]> wrote:
Andrew Straw's PyUniversalLibrary appears to be on PyPi


google search points here 

Josef 
~-~-~


On Mon, Apr 28, 2014 at 1:51 PM, Gary Pajer <[hidden email]> wrote:
I've used Andrew's wrapper, and it worked well.

But in the end I wrote my own routines using ctypes (stealing some ideas from Andrew).   I can't remember exactly why I wrote my own... it was several years ago.  But I do remember that it was really very easy to implement calls using ctypes.

~-~-~


On Sat, Apr 26, 2014 at 12:53 PM, Sebastian Berg <[hidden email]> wrote:
On Sa, 2014-04-26 at 09:04 -0400, John Hassler wrote:
>
> On 4/24/2014 10:23 PM, Charles R Harris wrote:
>
> > Hi Sebastian,
> >
> >
> > On Thu, Apr 24, 2014 at 9:42 AM, Sebastian Berg
> > <[hidden email]> wrote:
> >         Hey,
> >
> >         We are thinking about writing some DAQ programs in python,
> >         and I was
> >         wondering if anyone can recommend a lib for that. There seem
> >         to be a
> >         bunch of wrappers using ctypes, which seem all good enough,
> >         but if there
> >         is something more highlevel or very well done, I would be
> >         happy to use
> >         that :).
> >
> >         Regards,
> >
> >
> >
> > Is DAQ data acquisition? If so, what sort of data?
> >
> >
> > Chuck
> >
> >
> Which DAQ are you using?  There is 'comedi' for internal boards, but I
> don't know of anything except the "ctype wrappers" for usb boxes.
> When I started doing this several years ago, I wrote my own ctype
> wrappers to access the dll for the Measurement Computing USB-1208 and
> for the NI-USB6008.  Mine were very simple, and did only what I
> needed.  There's a number of them on the web now, but I haven't looked
> an any of them in detail.
>

Sorry, thought the DAQ was more clear then it probably is. What we have
is a National instruments USB DAQ unit (M-Series). We are actually using
it more for analog output then input right now.

> Andrew Straw wrote a very nice object-oriented driver for the
> Measurement Computing USB devices in Python.  However, I found
> references to it in Cookbook/Data Acquisition, but I couldn't find the
> actual PyUniversalLibrary.  Maybe it's no longer active.
>

I will have a look if I find it, that sounds interesting, I also was
hoping that a wrapper could maybe help with multiprocessing magic to
separate the gui as much as possible from the signal generation. Though
maybe that is too high level to really do in any case.
I have started playing with one of the ctypes wrappers and it indeed
works very well. Rather annoying, because I initially wrote labview and
now have to realize that the C-Api is identical and can easily be called
from python, too :)...

- Sebastian

>
> "Ctype wrappers" have worked very well for me.  We have one experiment
> using two USB-1208 and one NI-USB-6008 simultaneously in a single
> Python program with a Tkinter GUI, and it works fine.
>
> john
>
>
> _______________________________________________
> SciPy-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user



_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user




_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user