03-02-2012 01:59 PM
I am using DAQ 9178 chassis to control several module, 9421, 9481, 9207, 9263 and 9213. I wonder if I can call two or several different channels of a same Module simultaneously without get a conciliation error? For example, DAQ assistant1 use 9213 channel1 and DAQ assistant2 use 9213 channel 2 respectively. There is a chance that the program might call these two assistants simultaneously, will that cause an error? How about the other module, 9421, 9481, 9207, and 9263?
Thanks,
Haorong
Solved! Go to Solution.
03-05-2012
03:00 PM
- last edited on
08-15-2025
06:32 PM
by
Content Cleaner
Hi Haorong,
This is Marcus in Applications Engineering. If you refer to the 9178 user manual, https://www.ni.com/docs/en-US/bundle/cdaq-9171-9174-9178-features/resource/372838e.pdf, it states that the 9178 contains three timing engines which will allow you to operate up to three analog input tasks simultaneously. This information can be found on page 2-1.
Regards,
Marcus
03-05-2012 04:14 PM
Haorong-
You can *not* use multiple tasks on the same AI or AO module in most cases, unfortunately.
For AI, you do have three timing engines available to modules in the chassis (as Marcus mentioned), but hardware limitations on the module require that any AI channels be sampled in the same task in DAQmx (meaning a single DAQ Assistant or DAQmx API task with the same timing attributes). You can have multiple AI tasks but can not split modules across tasks.
For AO, you can use a hardware-timed analog output task and update software-timed AO tasks at the same time as those channels don't appear on the same module (again, due to hardware limitations).
For digital modules it is typical to be able to run multiple tasks per modules as needed. You may run into some 'gotchas' with hardware-timed tasks, but I assume you're not planning to use the relay modules you mentioned for high-speed applications.
Hopefully this helps-
03-07-2012 02:06 PM
Hi, Tom
Thanks for the answer. What can happen if I run multiple tasks on the same AI or AO module? My applications are low-speed applications. For example, I read a temperature T1 from channel1 using DAQ assistant1 (task1), doing some operations. I also read T2 from channel2 using DAQ assistant2 (task2) in some cases, doing some other operations. And I might combine these two operation results to make another operation. Since the operation is based on data flow, it might happen that task 1 and task 2 operate at same time. What can happen in that case, will a error be produced and the program be terminated, or one task can wait for another task to complete? Since my application is at very low frequency, I don't mind if one of the task wait the other to complete. Can I put a timeout value to resolve it? What's the default timeout value?
Thanks
Haorong
03-07-2012 02:06 PM
Thanks,
03-07-2012 02:16 PM
Hi Haorang-
If you must use separate tasks (via separate DAQ Assistants) then I would strongly encourage you to ensure in your code that only one access happens at a time. If they execute simultaneously then one of the tasks is likely to report a resource reservation error when it attempts to reserve resources that are in use by the second task.
There is no way to set a timeout for this case, as it would fail when reserving/committing the task (see the DAQmx Help for more info on those states) and not when reading or writing, so there is no way to wait for data to be acquired or generated while resources are freed.
03-08-2012 12:39 PM
Hi, Tom
Thanks,