@1. This solution works only if fixed number of are passed to MultiFilter.Vi. If I replace 100 with -1 @ DaqMx (Image-1) Read sample count (i.e. read all available samples), it passes variable lengths array (i.e. Rows 8, columns: varies 99/100/101/etc) to MultiFilter (Image-2). In this case, Main For loop of MultiFilter.vi is not working at all (it doesn't go inside for loop). What could be the reason for that?
There should not be any problem with samples of different length as shown in the example below.
Check if you get any error/timeout from the DAQmx read VI.
2. What could be the use of USR in Filter.vi (Image-3)?
The USR is supposed to hold the cut-off frequency used during the initialization of the Butterworth Filter.vi. .
However, here, the Filter.vi is initialized when 'Init?' is False.
So, to be correct, the t and f terminals to the Select VI should be flipped.
That is, select the USR value if Init? is True.
Also, you seem to ignore the SampleFreq terminal in the Filter.vi. It might create issues if the DAQ sampling rate changes.
Now that it works, can you try what happens if you use Call By Reference in a for loop set up for parallel execution? It would simplify the code dramatically.
I'd do it myself if the VI was attached. The snippets still don't work.
That works too.
Thanks for the tip on snippet, didn't know that it dosen't work 🙂