06-23-2010 06:15 AM
HI,
Help needed, In one of our LabWindows application we are creating a panel on which a String control is there.
we converted the string control to Daqmx task control using API function NIDAQmx_NewTaskCtrl( );
When the panel pops up the control is not listing running Daqmx tasks even if there are tasks running. please provide if there is any way to list the running Daqmx tasks.
Thanks in advance for the help.
06-23-2010 10:39 AM
There is not currently a way to retrieve running tasks through the API. You will need to maintain a reference to the Task in order to interact with it. The alternative is to use the DAQmx Create Task function to name the task and then use that task name elsewhere.
06-25-2010 04:14 AM
Thanks for the quick reply,
please clarify my doubt listed here
1) When I click the Task list control on the panel, a window is popping up (I had attached the screen shot picture to this post), Existing task check button is there in that window (but it is disabled in this case), what is this window meant for if there is no way to get running tasks list.
2) If I cannot get list of running Daqmx tasks with this control, please suggest if there is any API function (for example: GetRunningDaqmxTasks();) using which I can get running Daqmx task handles one by one or as a list.
Our aim of the current project is to close all running Daqmx tasks at the end of TestStand sequence execution, please provide any alternative solution for this project if you get any idea.
Thanks in advance for the help.
06-25-2010 08:32 AM
"Existing Tasks" is meant to show tasks that are saved to the MAX database. These tasks may or may not be running.
There is not an API command that returns running tasks. In order to address your use case, you should pass the task handles as variables from each step to the last step in your TestStand sequence. I don't do much in TestStand, but this should be possible. An alternative would be to use the DAQmxResetDevice in your last step, which will abort all running tasks and return the device to an initialized state.