Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the Task information..? Remedy for error "-200089"

Hello,

 

I am using PCI-6229 for the application, and VB6 for application development.

We have a policy to create the tasks and associated channels using Measurement and Automation Explorer.

 

I want to know can I retrieve the information of the tasks those are created ..

 

When my VB program starts, I use DAQmxLoadTask function to start executing the task, but for this I need to know the TASKNAME. On site if the service engineer accidentally renames the task name, the program stops execution. To avoid this problem, i would like to know how can I get the information about the tasks, such as the tasks those are created, their names, type of channels used (i/ps, o/ps, Analog channels), etc.

 

This would help my application to execute without hard coding the task names as well as I can close the tasks if they are running before exiting the application. 

 

Also, while developing the application, it happens that the application crashes, and the tasks remain open and running. After I fix the error and execute the program, the application reports the error, "-200089 Task Name specified conflicts with an existing task name". To recover from this error, I need to restart the PC, which is most frustrating and time consuming. If I could know the tasks and task handles those are already created and running, I can safely delete them or continue using them.

 

 

I would appreciate if you could help me in resolving this problem.

 

Thank and regards,

 

Kunalb

 

0 Kudos
Message 1 of 2
(7,384 Views)
 Hi Kunalb,

 To read the tasks currently configured on the system you can use this function: DAQmxGetSysTasks.  This will return an array of the tasks on the system. In that same section of the DAQmx C Reference Help they talk about obtaining the other parameters you mention.

 Another solution would be to add security to MAX such that only engineers with proper permissions could launch and/or modify the tasks. This can be done with Windows XP in the properties of a file.

 I hope these suggestions help! Have a great weekend.

 Best regards,

 MatthewW
 Applications Engineer
 National Instruments


 

Message Edited by Matthew W on 08-10-2007 02:13 PM

0 Kudos
Message 2 of 2
(7,380 Views)