ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create virtual channel list

Greetings all-

 

I'm building a system with a lot of digital I/O for mechanical control.  Sometimes I need to write to only a single output, sometimes I need to write to groups of outputs.  When I write to groups, I would like to create a list of virtual channels, and wire that to a single instance of the DAQmx Write VI.  (And similarly for inputs....)

 

The challenge is that the exact grouping depends on the circumstances, and I have not the patience to create in advance a list for every possible combination of physical channels that might occur....

 

What I have done so far is create a single virtual channel for each physical channel in the system and stored them all in a functional global.  Now I would like to be able to combine these virtual channels into lists programatically.  

 

Is this possible?  Otherwise, I will just have to make lots of sequential calls to DAQmx Write....

 

Thanks in advance,

GN 

Message 1 of 3
(4,193 Views)

Hi gnunesjr,

you can handle the channels like strings. You can combine them with the "concatenate string" function.

 

Hope it helps.

Mike 

Message Edited by MikeS81 on 08-26-2008 07:44 AM
Message 2 of 3
(4,182 Views)

Mike-

 

Thanks!  Do you know if this works on the tasks rather than the physical channel names? 

 

I actually tried wiring tasks together using the concatenate operator before I posted.  I got lots of little red type conversion triangles, but no broken wires.  For very boring reasons (personal bandwidth not infinite, etc.) I'm not at a place where I can run the VI while connected to the hardware, so I don't know if it was going to work.  I should be able to test against the hardware in a week or so.  If no one has posted an answer by then, I'll report back to this thread with the results of that little experiment.

 

-Geoff 

0 Kudos
Message 3 of 3
(4,160 Views)