Closed andreasharbo closed 2 years ago
I saw your question in stackoverflow, but couldn't comment it because I have not the required "perks". I don't know if this could solve your problem, but me and my dad are usually using NI9234 for vibration measurements, I am starting to aquire the data with python, but he's got more experience using visual basic. He told me that the way it works, is that you can only use one card every time, so I'm just guessing here, but have you tried to start a task with 4 channels, end the task and start another task with the others? btw, thanks for posting your question in stackoverflow, it really helped me a lot with my project.
This is a general NI-DAQmx problem and not an issue with the nidaqmx
Python bindings. Consider posting on https://forums.ni.com/ for help resolving issues such as this.
I am trying to integrate a NI CompactDAQ as an interface in my measurement software. My end goal is to acquire samples continuously from several tasks with several channels in each task. For starters I am having trouble with one task and multiple channels.
The module I am using is NI 9231 (8 mic/accel channels) and I'm having trouble acquiring data from more than 4 channels.
I have made an example that mimics the way that it is done in my software. I'm running with a very low
timeout
on thestream_reader
because I don't want to waste time waiting for the reader, there are other tasks that need reading. So I'm catching the error that the buffer is not full and then reading again until there are enough samples in the buffer. Preferably thetimeout
would be 0, but that does not work either.This
timeout
works fine with 4 channels, but when I add the 5th channel the buffer never gets read. In the example, I'm printing the time between buffer reads.I hope some of you have some input to what I could do. It seems strange that an extra channel stalls the reader completely. If I increase the
timeout
too much I get buffer overflow errors, so id rather keep it low.Thanks in advance,
Andreas