03-18-2013 06:20 AM
Hi everyone,
I am acquiring a continuous waveform signal and would like to run a bandpass filter on prior to real-time display... I understand I need to use a ptbypt filter and that the "initialize" input t the ptbypt vi should be "true" for the first iteration of the while loop and "false" for the following loops within the same call.
Any suggestions for how I can do this?
Regards,
Jack
03-18-2013 01:04 PM
Maybe you could use the first call? primitive and a T/F case structure inside your loop? Make sure you read the help for that primitive.
03-18-2013 01:25 PM
The easy way is to use a "Equal to 0?" function with the loop iteration counter. The first iteration of the loop will have i == 0, so you only initialize on the first loop.
03-18-2013 03:36 PM
03-18-2013 03:46 PM
Since you are using a state machine, I would use a boolean in a shift register. Set the value to TRUE when you need to reset the filter, set it to FALSE when using the filter, and wire it straight through for all of the other cases.