LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reserve/Unreserve Task Resources

(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).

0 Kudos
Message 1 of 4
(4,618 Views)

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

0 Kudos
Message 2 of 4
(4,582 Views)

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)

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

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

0 Kudos
Message 4 of 4
(4,549 Views)