LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

init/cont filter option for a multiple signals

Solved!
Go to solution

Hi,

 

I have 2D array with signals from a daq device, now i want to make a highpass and a lowpass filter for all the signals, and every signal can have it's own high and lowpass filter settings and i can have any number of signals. When i connect my 2D array to a for loop and place a filter inside with the init/cont option to true, it resets itself every loop pass. When i extract one signal and pass it trough the filter it works fine. But that's not what i want, i want to have more signals filtered in different ways. I think i understand why it reset itself, in the help file of the filter it says:If init/cont is TRUE, LabVIEW initializes the internal states to the final states from the previous call to this instance of this VI. So it means that every loop pass, it has different data but the same instance... I would like to have different instances for every (for loop) pass. In the attached files the snippets and its outcome:

 

Any ideas?

Best regards,

Thijs

Download All
0 Kudos
Message 1 of 3
(3,135 Views)

Hello Thijs,

 

I made a quick example at my side.

It's not the neatest piece of code and the initialization of the filter coefficients should be outside of the loop, but I just wanted to show the functions you could use to do this.

 

See attachment.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 3
(3,095 Views)
Solution
Accepted by topic author ThijsBoeree

Hi,

 

I allready solved it!

See VIFilter_Each_channel.png

 

 

The FilterState has to be initialized, or else the forloop won't run...:

 

 

 

Filter_Each_channel_correction.png

0 Kudos
Message 3 of 3
(3,091 Views)