petebachant / daqmx

A Python wrapper to the National Instruments DAQmx driver.
MIT License
3 stars 6 forks source link

synch_ai_ao.py incompatible with Py3.5 after applying syntax fixes #12

Open delicious-cake opened 8 years ago

delicious-cake commented 8 years ago

after fixing the statements i get the following error:

-------------------------------------------------------------------------
ArgumentError                             Traceback (most recent call last)
<ipython-input-5-0626f0ea1e5b> in <module>()
     72 
     73 daqmx.RegisterEveryNSamplesEvent(AItaskHandle,daqmx.Val_Acquired_Into_Buffer,
---> 74                                  buffsize, 0, EveryNCallback, id_data)
     75 
     76 

C:\Anaconda3\lib\site-packages\daqmx\core.py in RegisterEveryNSamplesEvent(taskHandle, everyNsamplesEventType, nSamples, options, callbackFunction, callbackData)
    406     rv = dmx.DAQmxRegisterEveryNSamplesEvent(taskHandle, 
    407             int32(everyNsamplesEventType), uInt32(nSamples), uInt32(options),
--> 408             callbackFunction, callbackData)
    409     ErrorHandling(rv)
    410 

ArgumentError: argument 6: <class 'OverflowError'>: int too long to convert
petebachant commented 8 years ago

Which version of PyDAQmx are you using? I believe I last tested this library with version 1.3.

delicious-cake commented 8 years ago

I am using v1.3 as well. My System is running on Win 10 x64 v1607. I installed the latest DAQmx driver from NI, which is v16.0.

My code is in this attached file: synch_ai_ao.zip

petebachant commented 8 years ago

I was getting errors with DAQmx 15, so I think the newer NI versions are the cause. See #9. I am not doing anything with NI hardware these days so quite frankly I won't be able to fix this. I recommend you submit a PR to PyDAQmx if you find a solution, because I plan to try to merge anything of value here into that.