LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you find DAQmx tasks?

Is there a way to find DAQmx tasks programatically if you don't know the TaskHandle?  I'm hoping for a function like "DAQmxFindTask" which would return either all task handles or only those that matched certain properties.  Any chance?
Jeff
0 Kudos
Message 1 of 4
(3,154 Views)
Hi Jeff,

There is a way to retrieve all saved tasks in DAQmx.  The DAQmx System property called Tasks returns an array of the names of all saved tasks.  This has nothing to do with which tasks are running, but rather which tasks have previously been configured and saved in Measurement and Automation Explorer.  In C programming, call the function DAQmxGetSysTasks.

Regards,
Andrew W
National Instruments
0 Kudos
Message 2 of 4
(3,136 Views)

Andrew, thanks for the tip.  Unfortunately, that doesn't help me for the current situation.  I need to find active Tasks.  Anybody?

Thanks,

Jeff
0 Kudos
Message 3 of 4
(3,128 Views)
Hi Jeff,

As far as finding all open tasks, you could build an array of the names of all the tasks you start in your application and remove the names from that array as the tasks are closed.

Regards,
Andrew
0 Kudos
Message 4 of 4
(3,101 Views)