09-28-2009 02:36 PM
(repost from dynamic signal acquisition, my apologies)
I've constructed a VI that utilizes a number of AI and DO tasks in multiple instances, only to run into the reserved resources error. My plan to fix this problem is to reserve and unreserve the task resources using the DAQmx Control Task within the sub VI's, but there are a number of while loops that involve both AI and DO tasks. My question is, what is the behavior of a task and its physical channels when it resources are reserved and unreserved during operation? And when there are multiple while loops that involve different AI and DO tasks, is there a way to programatically wait for resources to become available? Thanks in advance! BTW, using a PCI-6224, though I'm not present to actually use it (working from a distance).
09-29-2009 12:15 PM
Hey Jeanius,
Concurrently running two analog input or two analog output tasks. This error can also be thrown when a program explicitly calls multiple tasks performing the same type of operation at the same time. As with the other two cases, this produces a situation where multiple independent tasks are concurrently attempting to access the same resource. Even though the tasks might be using different channels, this is still a conflict because they require use of the same analog to digital converter and sample clock. To resolve this issue, combine all operations of the same type into the same task. For DAQmx 7.3 and later, it is possible to do this even with multiple types of analog input if you use multiple DAQmx Create Channel VIs.
Thanks
NI-khil
09-29-2009 02:35 PM
NI-khil,
Is it possible to access the same task concurrently in multiple while loops? Also, this is a repost of my question in another forum, sorry for that! (http://forums.ni.com/ni/board/message?board.id=100&message.id=2215#M2215)
09-30-2009 04:48 PM
Hello Jeanius,
There is no way to access the same task concurrently in multiple while loops as you will get resource reserved error. You can reserve a Task perform read unreserve it and let other task perform its read and so on. I got to look at your code and it does the same thing. You can use seemaphores in LabVIEW so that only one task has at control of the device at the same time.
Cheers
NI-khil