[Tutor] Re: Accessing hardware drivers written in "C"?

Daniel Ehrenberg littledanehren at yahoo.com
Sat Dec 13 09:47:06 EST 2003


"Todd G. Gardner" wrote:
> Hello Daniel,
> 
> I do need to learn more of the basics in Python so
> thank you for the
> suggestions!  I would like to use a more robust
> language and Python seems
> like an excellent choice.  The obstacle to using
> Python is primarily
> interfacing to the various Data Acquisition
> hardware.
> 
> Most data acquisition boards have drivers written in
> "C" for Windows and
> Comedi for Linux.  If there are no previous
> experiences with specific
> manufactures I guess I will need to learn how Python
> can access the drivers
> for the cards that I currently use in LabVIEW.  For
> now I'll specify the
> National Instruments DAQCard 6062E.  Now the
> question becomes more specific.
> How to access National Instruments DAQCard 6062E via
> Ni-DAQ or how to
> communicate with a program written in "C".

There are several ways to interface with C code, but
unless you want to write in C or write cumbersome
configuration files, both of which require the source
of the driver, your best bet is ctypes. Ctypes can
interface with any existing code that's compiled into
a library without having to leave Python. There's
probably no existing library to interface with that
device as there is with other things like printers.
> 
> I can currently write simple GUIs in Python using
> wxPython and make simple
> 2D plots using wxPyPlot.  I would like too also do
> some basic Fourier and
> statistical analysis, processing and data basing.  I
> would like to output
> analog and digital signals based on this analysis. 
> I would like to write,
> distribute <2 Mb applications and that can be
> prohibitively expensive or
> completely impossible in LabVIEW.  Also, LabVIEW is
> a great language but as
> my programs grow more and more complex I find that
> maintenance can sometimes
> become cumbersome given the data flow design
> paradigm.
> 
> Thank you for any pointers as to how to get started
> accessing these or any
> drivers to DAQ or GPIB hardware.
> 
> Todd

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/



More information about the Tutor mailing list