[SciPy-user] OT(?): Lab hardware interface

Gary Pajer gpajer at rider.edu
Tue Aug 22 17:16:12 EDT 2006


John Hassler wrote:

>Do you already have the a/d board?  If so, what is it?
>  
>
Thanks to all who replied.  Fabulously helpful.
I placed an order for a NI USB-6009 just minutes before checking my e-mail.
Not too late to cancel it if my "support group" is using Measurement 
Computing. (the choice was a toss-up)


>By some strange coincidence, I've just been working with exactly that 
>problem - three times.  In one, I used an ancient, obsolete ISA board on 
>an ancient, obsolete computer with Linux, comedi, swig, and Python.  For 
>the other two, I had windows .dll files, and was able to use c_types 
>with Python to interface directly.  One was Ethernet, the other was USB.
>
>For the USB device (Measurement Computing USB1208) the first part looks 
>like:
>from ctypes import *
>
># Load the cbw32.DLL file
>cbw = windll.LoadLibrary('c:\\MCC\\cbw32.dll')
>
>#  Define the appropriate c_types
>RevNum = c_float(0)
>VxDRevNum = c_float(0)
>BoardNum = c_int(0)
>....   and so on.  Then:
>    err = cbw.cbAIn (BoardNum, Chan, Gain, byref(DataValue))
>    if err != 0: print "a/d error ", DataValue, err
>... and the like.  Really very very easy.  I love Python.
>
>I can give you more details, if you're interested.
>john
>
>Gary Pajer wrote:
>  
>
>>Soon I'm going to need to interface my experiment to my computer.
>>
>>Can any one suggest any python tools that might exist?  I've been 
>>googling for abour an hour, and haven't come up with anything.
>>
>>  I can't afford LabView at the moment, and besides, I've never used it 
>>so it doesn't have the advantage of familiarity.  I don't need a 
>>graphical environment.  At first the equipment will be very simple:  a 
>>couple of photodiodes, an A/D converter, perhaps a stepper motor controler.
>>
>>Any hints are welcome. 
>>If this strikes you as noise, please accept my apology.
>>
>>Thanks,
>>gary
>>
>>
>>
>>
>>_______________________________________________
>>SciPy-user mailing list
>>SciPy-user at scipy.org
>>http://projects.scipy.org/mailman/listinfo/scipy-user
>>
>>  
>>    
>>
>_______________________________________________
>SciPy-user mailing list
>SciPy-user at scipy.org
>http://projects.scipy.org/mailman/listinfo/scipy-user
>
>  
>




More information about the SciPy-User mailing list