LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically rename a DAQmx physical channel array?

Solved!
Go to solution

Hello!

 

I am a bit confused on how to work with array of DAQmx channels.

I just want to replace the "Dev5" of my DO channels with whatever name come from the for loop.

How can I do that?

Lchar_0-1708686216193.png

 

The reason is that the user can connect different testbox to the PC, so it would always be a USB-6341 or USB-6210 but with a different name in NI max (Such as Dev2 Dev3 Dev4 etc...). So I want to detect what is connected and change the DAQmx channels names accordingly.

 

Best regards,

Ludovic

0 Kudos
Message 1 of 4
(706 Views)

Hi Lchar,

 

the channel array can also be an array of strings.

And you can format/edit strings as required...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(694 Views)
Solution
Accepted by Lchar

Had a couple free minutes here to illustrate one way to accomplish what GerdW was referring to...

 

 

subst channel names.png

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 3 of 4
(666 Views)

Your solution looks cleaner than what I have just done:

Lchar_0-1708693097475.png

Thank you both for your time!

0 Kudos
Message 4 of 4
(658 Views)