LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get virtual/global channel names from a DAQmx Task

Hi!  For some reason getting a list (as an array of strings) of physical channels from a task is obvious (see attached image).  But getting a list of virtual/global channels from a task is less obvious.  How do I do it?
0 Kudos
Message 1 of 11
(8,416 Views)
I think you got it with the channels list coming from the DAQmx Task node.
 
Use the Variant to Data function with an empty array of strings as the type to get the channel list as an array of strings.
 


Message Edited by caz on 01-03-2008 09:05 PM
Download All
Message 2 of 11
(8,397 Views)
Hi Nickerbocker,

I understand that you would like to pull out the names of the global virtual channels that are in your task.  I created a task that had both a global virtual channel and a local virtual channel and then used the following code to pull out an array of channel names.  As you can see I used the task property node to pull out the channels that were in the task (which would be the alias name) and then autoindexed them in a for loop.  These channel names were fed into the active channel property of the Channel node and then the names were pulled out.  I also made an array of booleans to check if the channels were global or local.  As I said before, since one of my channels was global, the boolean array shows one true and one false.  Hopefully this was helpful!

                              


Message Edited by Vanessa L on 01-04-2008 02:08 PM

Message Edited by Vanessa L on 01-04-2008 02:09 PM
Regards,
Vanessa L.
Applications Engineer
National Instruments
Download All
Message 3 of 11
(8,366 Views)
Thanks for the replies!  I guess it was very obvious that the variant data could be converted to a string in such a way.  I was looking it like it was more of a reference than variant data.
0 Kudos
Message 4 of 11
(8,350 Views)

My Google Search lead me here.  Didn't even notice this was originally my post....

 

*bump* :manwink:

0 Kudos
Message 5 of 11
(7,522 Views)

My google search lead me here again. Maybe I should write this down, make a subvi, or something.

0 Kudos
Message 6 of 11
(7,275 Views)

Once again, a Google search leads me back here with the answer I'm looking for...

Message 7 of 11
(5,413 Views)

What's the over/under on NicLinley coming back here again?  2 years?

Message 8 of 11
(4,987 Views)

@Hooovahh wrote:

What's the over/under on NicLinley coming back here again?  2 years?


Give me odds on switching to Bing, and I might be in on that action. Smiley Wink

0 Kudos
Message 9 of 11
(4,979 Views)

I did a linear fit that estimates he'll be back here at 1:13 AM, September 1st 2021.

Estimate of visit.PNG

 

0 Kudos
Message 10 of 11
(4,974 Views)