Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Help With Multiple Tasks on cDAQ9184

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(4,066 Views)
Solution
Accepted by topic author Software_Monkey

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,

John Passiak
0 Kudos
Message 2 of 3
(4,055 Views)

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

0 Kudos
Message 3 of 3
(4,048 Views)