04-16-2015 02:08 AM
I have a CDAQ9184 chassis with 3 different analog input modules installed. I read somewhere that I need a separate task for each type of module but when I try to do this, only one of the tasks (the last one to be created) actually runs.
I have tried reading all 3 modules within the one task but this doesnt work.
Can someone please tell me if I run 3 tasks on a cDAQ9184 chassis and if not, what should I do to read the three analog modules?
For info, I am using C++ and not LabView
Thanks
Solved! Go to Solution.
04-16-2015 10:54 AM
You can run up to 3 independent AI tasks, but it isn't required. You can also put all three modules in the same task.
It sounds like you haven't had luck with either approach, though I couldn't say why without additional information. Could you post your code showing how you are configuring the task(s)? Also what error are you receiving?
Best Regards,
04-17-2015 12:27 AM
Thanks John,
The tasks were created and started without any errors, its just that not all of my tasks were calling the 'NSamples' callback. I was sharing a single callback for all tasks and used the task handle that was passed to determine which task had called the callback but clearly this was an incorrect thing to do. After a bit of tinkering around, I discovered that each task must have its own callback.
However, it is interesting to hear that you can mix different module types within the same task and I will probably have a go at this later in order to simplify my code.
Thanks again for the information,
Tony