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 does not increase in size

I am using the DAQmx flatten channels string VI to take an array of strings and use them in one task. It works great when using 2 channels or even changing the channels but still reading 2 channles. If I change it to read one channel it still works. But as soon as I change it back to read 2 channels it flat lines and does not actively read but also does not output any errors. I have to stop my code or exit in the executable and restart the program to read both channels. I am worndering if there is a fix for this. I have attached my code that initializes the channels read.

0 Kudos
Message 1 of 3
(2,292 Views)

Without knowing too much about how things are set up, my firs step would be to verify that the array coming out of the for loop is really the right size. IE one element for one channel, 2 for 2, etc. I would also verify that you are correctly stopping the task and starting a new one when you change the channels.

0 Kudos
Message 2 of 3
(2,268 Views)

I actually just figured it out it was in one of my data smoothing points that it was locking it to the smallest size ran durring the execution. I reset it now everytime I change channels and it works perfectly. Thankyou for the response though.

0 Kudos
Message 3 of 3
(2,265 Views)