LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I account for virtual channels (from Channel Wizard) in the attached VI?

I am using Labview 6.1.

I want to have a panel where a user can select via buttons which DAQ channels to enable. Suppose I have no assigment given for CHANNEL 0 in the MAX Channel Wizard. When I read the list of channel names through, say, Get DAQ Info VI, then according to my VI that IS CHANNEL 0. Currently I have the VI set up where the first string indicator corresponds to the first DAQ virtual channel name.

NOTE: I am getting rid of the SUBVI inside because it was pointless.

QUESTION: Is there a way I can have String 1/Name 1 correspond to whatever Virtual Channel is assigned to Channel 0? And String 2/Na
me 2
correspond to whatever Virtual Channel is assigned to Channel 1? And soforth... ??

Does that make sense.

Thank you!

Lauren
0 Kudos
Message 1 of 3
(2,295 Views)
Hi Lauren,

You can request the device channel number that is assigned to a DAQ Channel using the Get Channel Information.vi and then assign the appropriate name to the appropriate name/unit controls based on the device channel. I've attached a simple example that shows how to do this.

Did you know that you can pass the channel name to the DAQ VIs? From your VI it looks like you may be preparing to pass the channel number to the DAQ VIs instead of the name. By doing this you lose all of the benefit of configuring your channels in the Channel Wizard, i.e. you will have to scale the channel yourself, etc. It should also simplify your user interface VI to just work with the channel names instead of looking up channel numbers.

Good luck.
Deborah
0 Kudos
Message 2 of 3
(2,295 Views)
Thank you thank you thank you thank you!!

For taking the time to help me. Phew. That looks more like what I need, yes.

Lauren
0 Kudos
Message 3 of 3
(2,295 Views)