LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx multichannel read error. DAQmx believes there are multiple channels in my task.

Solved!
Go to solution

Hello,

 

I recieve the appended error message when attempting to use DAQmx Read in my VI.  LabVIEW is telling me that I am attempting to read a single channel when my task is configured for multiple channels.  However, as you can see in the task configuration pane, that is not the case!  If I attempt to use DAQmx Read to generate a waveform with multiple channels, the VI executes without error but I do not want a 1D waveform array..  Any tips?

 

Regards,

 

Steve

Download All
0 Kudos
Message 1 of 8
(2,843 Views)

Ok, but what does the code look like? Just because you defines a task, it doesn't mean you are using it.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(2,816 Views)

Mike,

 

The relevent code in the block diagram is pictured adjacent to the error popup window.

 

Steve

0 Kudos
Message 3 of 8
(2,801 Views)

Your first picture show you are using a task called Vin (although only the V shows up on your block diagram.)  Your second picture shows a DAQ assistant with a single channel.  That has nothing to do with the first picture.

 

You need to show your picture in MAX that shows the definition of the Vin task.

0 Kudos
Message 4 of 8
(2,794 Views)

Here is the task as it shows up in MAX, Identical to the second picture shown before when selecting "Edit NI-DAQmx task" from the task on the block diagram.

 

-Steve

0 Kudos
Message 5 of 8
(2,780 Views)
Solution
Accepted by topic author kodex1717

Without seeing the whole code I can only offer a possibility.

 

Something else in your code is modifying the Vin task and leaving the reference open.  Vin then exists in memory with multiple channels but those changes are not saved to MAX meaning when this section of code executes the Task is not the same as the Task in MAX.  Slap a DAQmx Task node on there and read "Channels" to confirm my suspicion


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 8
(2,759 Views)

Jeff,

 

You were correct.  In troubleshooting the problem I had played with the task at a different point in the program and added an erroneous channel.  Thank you!

0 Kudos
Message 7 of 8
(2,739 Views)

This is exactly why I ALLWAYS hide my DAQ Tasks inside a "Resource Module" 

A Resource Module.png

 

As I use the term a "Resource Module" is a special case Action Engine tha exposes only that subset of functionality that a specific project needs to take on a given resource external to LabVIEW.  And, it provides a single point of entry to access that resource by keeping private data private.  Had you used the technique here you would have had one vi to look at.  and, there likely would have been no "Reconfigure to add channel" method available to cause trouble.Smiley Wink

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(2,719 Views)