LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous filtering

Solved!
Go to solution

OT: And if you want an easier way to get a clone reference, consider Kudo-ing this idea.

0 Kudos
Message 11 of 14
(339 Views)

@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. 

MultiFilter1.png

FrontPanel1.png

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. 

BR
Download All
Message 12 of 14
(324 Views)

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 🙂

BR
0 Kudos
Message 13 of 14
(320 Views)

Sorry for not reverting on comments, due to weekend. 

Let me test this again and revert with some more info. 

0 Kudos
Message 14 of 14
(292 Views)