Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant Task Name Conflict

Hi,

My college has recently purchased a M-Series DAQ acquisition card and I am trying to use it with visual basic.net with Measurement Studio 7.1.

As I am new to DAQ and VB.net I am trying to use the DAQ assistant to capture my voltage signal. I have set-up the task and usercontrol and have placed into my program (all corectly, I think!). However when I run the program and activate the capture, I obtain a DAQException, which states that I have a "task name specified conflicts with an existing task name" in the code generated by Measurement studio in the following line:
0 Kudos
Message 1 of 4
(4,225 Views)
Sorry...typo..

The line is:

Public Class VoltageTestTask
Inherits Task

Public Sub New()
MyBase.New("VoltageTestTask") *****This is the line where the exception occurs.

Have I made a basic error, or is there a way to erradicate this error?

Yours

Jon Pegrum
0 Kudos
Message 2 of 4
(4,224 Views)
You might want to open up the Measurement And Automation Explorer (MAX) and check whether a task with this name already exists there. Look under My System >> Data Neighbourhood >> NI-DAQmx Tasks. Any tasks under here are global tasks. Creating multiple tasks with the same name is not allowed.

I hope this helps
Bilal Durrani
NI
0 Kudos
Message 3 of 4
(4,211 Views)
Another possibility is that you are not properly disposing the task after you use it. Call Task.Dispose when you are done with the task. This applies if you get the error the second time you use the task in your application.
0 Kudos
Message 4 of 4
(4,206 Views)