09-22-2017 10:20 AM
OT: And if you want an easier way to get a clone reference, consider Kudo-ing this idea.
09-23-2017 07:04 AM - edited 09-23-2017 07:26 AM
@nik2013 wrote:
@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.
@nik2013 wrote:
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.
09-23-2017 07:09 AM
wiebe@CARYA wrote:
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 🙂
09-25-2017 06:52 AM
Sorry for not reverting on comments, due to weekend.
Let me test this again and revert with some more info.