Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock DAQmx tasks & channels like visa locks for multi-threaded code

I need to lock and un-lock DAQmx tasks and channels just like VISA locks for a multi-threaded application in LV/TS. The DAQmx task state model has reserve & unreserve but does it have the same functionality as VISA lock/unlock and is it as sophisticated as the share & exclusive locks, does it enforce arbitration of accesses, timeouts etc. Unfortunately, I haven't seen the DAQmx task state models reserve in actions (examples?? hope NI is listening) and was wondering if anyone has tried this feature with a multi-threaded parallel operation? e.g. some thing like the LV shipping example, Locking.vi, but with DAQmx.

thanks, p
0 Kudos
Message 1 of 3
(2,915 Views)
Hello,

The Reserved State will reserve the resources used by the task (PC buffers, triggers, sample clocks, AI channels, etc...) and prevent other tasks from using these resources. Please search for "Task State Model" in the DAQmx Help for more information. The following is an excerpt from the DAQmx Help Manual.

"The resources a task uses to perform the specified operation are acquired exclusively when the task transitions from the Verified state to the Reserved state. These resources can be clocks or channels on a device, trigger lines on a PXI chassis, or buffer memory in the computer. Reserving these resources prevents other tasks from using these resources, which interferes with this task performing the specified operation. You can explicitly perform this transition by calling the Control Task function/VI with Action set to Reserve. This transition fails if some task resources are currently reserved by another task. If the task can gain access to all the resources it uses, the task is successfully reserved and transitions to the Reserved state. Otherwise, it remains in the Verified state."

The following discussion forum thread might also help you out: http://forums.ni.com/ni/board/message?board.id=250&message.id=7968&requireLogin=False

Please let me know if you have any further questions.

Sean C.
0 Kudos
Message 2 of 3
(2,894 Views)
I have posted a question on, http://forums.ni.com/ni/board/message?board.id=250&message.id=7969
0 Kudos
Message 3 of 3
(2,876 Views)