From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Flatten Channel String VI not working correctly in LV 2017

Solved!
Go to solution

I am trying to use the DAQmx Flatten Channel String VI, but it doesn't seem to be working correctly. I am putting in an array of channels and it is outputting only the last element of the input array...not a CSV string like it is supposed to. Has anyone else run into this?

 

See attached VI and screenshots for an example.

 

BD Screenshot.pngFP Screenshot.png

 

 

 

0 Kudos
Message 1 of 5
(2,239 Views)

I can tell you that it seems to work OK on 2018 unless I'm misinterpreting what you're trying to do with it.

 

Can you post any code that shows the error so we can try exactly the channels that you're using?

(... edit:  Of course you edit it to add the example while I'm replying...)

0 Kudos
Message 2 of 5
(2,232 Views)

Deleted reply

0 Kudos
Message 3 of 5
(2,227 Views)
Solution
Accepted by RyanG_EE1

OK, well since you edited your post to add the example, I can see that it doesn't just output the last one, it outputs a string ending in "ai0:7", which is it being "smart" and compressing it down to show that it uses all 8 channels in a minimal amount of space.

 

Try removing just one channel in the middle, like #3, and you'll get something like Dev1/ai0:2, Dev1/ai4:7,

Message 4 of 5
(2,220 Views)

Ohhh, I see now. I was interpreting that zero as PORT zero, not CHANNEL zero THROUGH seven. Thanks for clarifying that for me!

Message 5 of 5
(2,213 Views)