07-09-2016 02:04 PM
I am failing to have control on the acquisition time of NI Daqmx read function when number of Daqmx devices is large. I have over 20 cDAQ devices that I am acquiring the data. It works but time it takes for NI Daqmx read function to complete finite acquisition of 20 devices at 50kS/s exceeds 10s and over time, it get larger and larger.
A very simple block diagram and MAX configuration for simulated devices is attached. I would have thought that I would acquire individual device at 0.2s and complete acquisition of all devices at nearly 5s but I do not understand the delay and why subsequent iterations do not take same time to execute. It is now becoming a question whether application is reliable!
Ironically, same speed issue is observed when on real devices so it's got to do something with DAQmx driver or I am just being daft! please advise!
Regards
K Waris
07-11-2016 08:08 AM - edited 07-11-2016 08:10 AM
Hi K-waris,
I have tried to replicate the issue on my PC using simulated devices - 9178 cDAQ chassis with 8x 9237 modules. I then populated the array of channels with the 8 modules until I was up to 22 devices. I wasn't able to get the same results with this set up.
I am reading between 5 and 5.4s to complete all acquisitions. I would expect this as DAQmx needs to start and stop the task. In your original code there was no start and clear, I am wondering if this is causing the additional delay.
I've attached a screenshot of my test code, modified from what you sent in. Could you try this and see if it fixes the problem? The starting and stopping adds 25 - 40ms to the expected run time of each acquisition.
What devices are you using in your application?
Kind regards
Pete