[SciPy-user] LabVIEW and LabPython

Gary Pajer gary.pajer@gmail....
Wed Jun 11 09:47:48 CDT 2008


On Tue, Jun 10, 2008 at 5:20 PM, Bryan Cole <bryan@cole.uklinux.net> wrote:

>
> >
> > I've married DAQmx to scipy/numpy to Traits UI
> > ( http://code.enthought.com/projects/traits ) and I have a beautiful
> > GUI based data acquisition/display/analysis system.  I'll admit that
> > I've been too scared to even try to implement callbacks (used by a
> > small number of DAQmx C functions) but I've achieved the same
> > functionality using python threads.
>
> FWIW Python callbacks with DAQmx work great. ctypes makes these easy to
> implement.
>
> I'm also considering Trait'ification of my primary data-acquisition
> application. I'd like to see what you've done in this respect. Are you
> using Chaco?


Yes, I'm using Chaco. I've attached a screenshot.  It's a work in
progress.   All essential functionality works, and I use it daily.   When it
runs it looks more or less like an oscilloscope (but it does more than
that).  On the whole, it's about half done.

The hard parts were not scipy/numpy/Traits related.  The hard parts were
understanding the timing, synchronization, read, and write mechanisms in
DAQmx; I was starting from scratch with no knowledge.  The NI docs are quite
spare.  The NI forum helped with that, although it took several days to get
replies.  Andrew Straw has translated one of the NI examples to
python/ctypes.  That helped me get started.

The chaco part is just a little sticky because the docs just aren't there
yet.  But the response to questions on the enthought forum is almost
instantaneous.

The Traits/Traits UI part is *so easy*.   I've made GUIs in Matlab and WX
and Tkinter, but making them in Traits UI is easier and more sensible and
easier to maintain and upgrade.  The learning curve is much shorter than WX
or Tkinter.  For those who care: I'm not using Traits 3, but rather Traits
2.

Question on callbacks:  if I write a callback routine in python, do I simply
use the python name of the routine as the callback parameter in the call
(via ctypes) to the DAQmx routine in the dll?

-gary



>
>
> BC
>
>
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080611/72af952b/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acquire_77.png
Type: image/png
Size: 36494 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20080611/72af952b/attachment-0001.png 


More information about the SciPy-user mailing list