From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Order of channels in Analog 2D DBL NChan NSamp VI

Solved!
Go to solution

The help file for the "Analog 2D DBL NChan NSamp" VI says that we can control the order of the vectors in the 2D double which it creates by two ways:

1) the order in which the channels are added to the task

2) something called the "Channels To Read" property.

 

I understand the first one, I think, and I can order channels as I wish this way.  However, I would prefer to use the second option, so that if somehow the wiring of the channels gets mixed up, I can still have the channels in the order I prefer.  

 

Can someone help me figure out how to do this please?

 

thanks!schematic.png

0 Kudos
Message 1 of 5
(2,863 Views)

The second option is referring to a property node, and more specifically the DAQmx Read Property Node. This property node can be found in the Functions Palette » Measurement I/O » NI-DAQmx » Read Node, or by simply using quick drop (ctrl + space) and searching for "DAQmx Read Property Node". Once you've placed the property node on the block diagram, you can change the property from "RelativeTo" to "ChannelsToRead" by clicking on the text. You can then use the input to the ChannelsToRead property to specify the order of the channels in the array. Hope this helps!

dK
0 Kudos
Message 2 of 5
(2,825 Views)

Hi Daniel,

 

thanks for your reply and help.  I have wired up what I think you mean (see image below).  I am assuming that the order of the "ChannelsToRead" listed top-to-bottom in the DAQmx Read Property Node is the order in which they will be added to the array (first the top; last the bottom).  Is this what you had in mind?

 

thanks,


Matt 

daqmx read property.png

0 Kudos
Message 3 of 5
(2,808 Views)
Solution
Accepted by topic author souperman1985

Somewhat. The 'Channels To Read' property actually accepts a DAQmx Global Channel data type, while you have a DAQmx Task Name data type. So the correct way to utilize the DAQmx Read property node is to just creat a constant or control from the 'ChannelsToRead' property and entering in the order of the channels you would like. I have provide a VI snippet to help illustrate:

 

 Channels To Read Property Node.png

dK
0 Kudos
Message 4 of 5
(2,789 Views)

Thanks again Daniel!

0 Kudos
Message 5 of 5
(2,780 Views)