-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nidaqmx playao from a NumpyDeviceBuffer stream #113
Comments
This works for my purposes at the moment. Any thoughts before a PR? Tests? |
Dear Zoey. The Nidaq implementation in pyacq is totally weak for the output.
A stremable output could be done in this class. If you need it I can help you to make the change. |
Hi Samuel, Sorry for the delay! Help would be great! Did you have a chance to look at the implementation I made already? I also changed npbufferdevice some as well to generate the signal. It seems to work pretty well (surprisingly). I'll add the Harvesters camera node soon too. Thanks! |
Hi Zoe. |
Can you share an example like ni_daqmx_with_oscilloscope.py using your updated ni_daqmx.py |
Uh... It's been a while and this evolved some. I pushed some changes to my fork. This example has a bunch of extra junk and might not have been the final way I ended up using it, but with some fiddling you should be able to move everything in streams instead of using some weird callback. Curious how this works out for you, no promises I can help much more. Good luck! |
Thanks for the help. I have been able to get working, mostly. I am getting a buffer warning related to the sampling rate that I need to figure out but at least there is an output. |
The ultimate goal here is to make a function/waveform generator. The example in
ni_daqmx_with_oscilloscope
using aQTimer
seems a little inelegant given everything else happening with streams. Also, what would one do if the numpy array is bigger than the nidaq buffer? (using a USB-6001 device holds 2047 samples)I guess, ideally the nidaq would request the next chunk from the
NumpyDeviceBuffer
whenever it's ready? Or theNumpyDeviceBuffer
polls until the nidaq is ready for the next chunk (something to do with_on_ao_done
). Happy to generate a PR down the line but could use some advice on moving this forward.Unrelated note, I'm also working on making Harvesters work with pyacq.
The text was updated successfully, but these errors were encountered: