05-02-2012 08:29 AM
Hi,
I have a cDAQ-9188 chassis, housing four NI9203 modules.
I currently have two tasks which I wish to run under NI-DAQmx, one is acquiring 14 channels of analogue inputs (at 750 S/s) and the other is monitoring an encoder connected to the PFI inputs on the chassis.
I have configured the AI task to trigger an event every 75 samples, and I have configured this to be processed in the main execution thread.
I am using the execution profiler, and if I have the AI task running, the encoder task takes around 30ms each time to obtain a reading - it the AI task isn't running, this drops down to around 2ms which is much more reasonable.
Surely it must be possible to run these tasks in parallel without such a detrimental affect to the time taken to obtain an encoder reading?
What should I be doing to allow these tasks to run comfortably side-by-side?
Thanks for any help,
Chris
05-04-2012 05:53 AM
Hello Chris,
I think it should well be possible but obviously there are a lot of variables here.
Could you possibly attach the code you are seeing this behaviour? I am happy to take a look and see if there is anything I can spot.
Also, this application is obviously dependent on the Ethernet connection, what is the context of this system in the network?
Best Regards,
05-08-2012 05:48 AM
Hi Nick,
Sorry for not replying sooner, I've not been in at work.
I'm attaching some files which are a much stripped down version of my project.
In this cut-down version, the read encoder call takes approx. 10ms when the AI task is running and 1-2ms when it isn't, so it doesn't exactly duplicate my issue, but is representative. The timings I'm quoting are obtained from the execution profiler.
Thanks in advance,
Chris