LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get physical channels control into separate strings

Solved!
Go to solution

Hi,

I have a physical channel control with "Dev1/ai0:1" and I wish to separate this to two strings or two channel controls, for instance, turn this Dev1/ai0:1 into this Dev1/ai0 and this Dev1/ai1 programaticaly.

 

Thanks.

 

Daniel Coelho

 

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 1 of 6
(3,570 Views)
Solution
Accepted by topic author Daniel Coelho

Hi Daniel,

you can use the Match pattern function to get both numbers. Convert the result strings to numbers, subtract the smaller from the larger one, add 1 and run a loop result times in which you create your string.

 

Mike

Message Edited by MikeS81 on 11-27-2008 04:29 PM
Message 2 of 6
(3,567 Views)

Thanks Mike,

I did something similar but I was looking for a LabVIEW funcionality to do it.

Maybe there isn't.

Thank you for your quick reply and for your sugestion, it works fine.

 

Regards,

 

Daniel Coelho

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 3 of 6
(3,561 Views)

I forgot, this is my VI just in case someone needs.

 

Daniel Coelho

 

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 4 of 6
(3,560 Views)
Just use the DAQmx Unflatten Channel String function. It's on the Measurement I/O>DAQmx Advanced>DAQmx Utilities palette.
Message 5 of 6
(3,537 Views)

Thank you Dennis. That is exactly what I was looking for.

I already gave the solution tag on this post but this is the the answer I wanted.

 

Regards,

Daniel Coelho

Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
0 Kudos
Message 6 of 6
(3,505 Views)