LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

init/cont on filtering VIs

Hello,

I have a question regarding the use of the "init/cont" input on some of filtering VIs. I understand that this function will save the internal state of the filter be used again when filtering a continuation of the same signal. But suppose I use this VI in serval different locations in my application for several different signals. Will each instance of the VI remember a different internal state? I would not want to unknowing filter signal B with signal A's internal state. Does anybody know?

Thanks,
Glen D
0 Kudos
Message 1 of 3
(2,996 Views)
The VIs you are using are re-entrant and that means that each instance you drop on your block diagram keeps track of its own state. So as long as you are using one sub-VI per filter you shouldn't have any problem. This situation is the one you describe in your question.

However if you instead place a single sub-VI inside a For-loop and index multiple signals to that sub-VI (pass an array of signals to your loop) that will NOT work, since there is only one sub-VI to keep track of the multiple states.

The good news for that last case is, that the high-level VIs located in the Analyze>>Waveform Conditioning palette are polymorphic and include a multi-channel instance that is designed to filter an array of signals correctly if this is what you need. In this
case you don't need the For-loop at all.
Message 2 of 3
(2,996 Views)
Thank You, that was the exact answer I was looking for. I was just unsure of the re-entrant factor. Excellent!!!
0 Kudos
Message 3 of 3
(2,996 Views)