Showing results for 
Search instead for 
Did you mean: 

Error -20020 when using Express "Filter" VI?

Go to solution

Error -20020 when using Express "Filter" VI?

The help for Error -20020 says the cutoff frequency Fc must meet 0 <= Fc <= Fs/2. 


Set Up

Using LIFA to read an Arduino Uno analog input signal at approximately 125 samples per second.

Using Express "Filter" VI to filter the data. The filter is set to Lowpass, Fc = 10HZ, Type Buterworrh and IIR.


The Express Filter works when Fc is set to 0.5Hz.


Why must Fc be st to a value less than !/100 of the sampling frequency? 

What must be done to obtain a low pass cut off frequency of 10Hz wien the sampling rate is 125 samples per second?



0 Kudos
Message 1 of 7

Re: Error -20020 when using Express "Filter" VI?

Post a VI.


Without seeing your actual VI, my guess is you are passing data to the Express VI that doesn't have the timing information properly identified (such as passing an array instead of a waveform.)  In those situations, the Express VI is going to assume your data is sampled at 1 Hz.

0 Kudos
Message 2 of 7

Re: Error -20020 when using Express "Filter" VI?

Thank you for your reply.


Attached is a VI that demonstrates the problem . You will need an Arduino board and LIFA to run the demo.  However, hopefully you will be able to make some recommendations after inspecting the VI.


As a  follow up to your comment how do you add Delta T information to the data coming from an Arduino board?  I tried adding a "Set Dynamic Data Attributes" VI.   This did not fix the problem.



0 Kudos
Message 3 of 7

Re: Error -20020 when using Express "Filter" VI?

Pretty much what I thought.


You actually have two problems.


1.  You don't have any timing info.  You are converting values to a dynamic data type.  That means the dT is assumed to be 1.  If you use build waveform components, you can wire a value into the dT input of that and it will set the timing info for your waveform.  Then you can pass that waveform on to the later functions.


2.  You are only collecting one data point at a time.  That means two things.  You don't have any reliable timing information, it all depends on how quickly and reliably your loop iterates.  Second, you only have one data point which means you have nothing you can actually filter on.  You need to read multiple data points.  Or if you only read one at a time, to build that into an array of data that you can filter on.  (Of course you still have the possibility of irregular timing on the data you collected.)

0 Kudos
Message 4 of 7

Re: Error -20020 when using Express "Filter" VI?

A big thank you for your reply. 


From what you say the Express "Filter" VI doesn't meet our requirements.  I was looking for a low pass filter that would continuously filter the data as it is received.  Just like an analog low pas filter.   Does Labview have any low pass filters available that can continuously filter data just like an analog filter?



0 Kudos
Message 5 of 7
Accepted by topic author hrh1818
08-27-2015 04:09 PM

Re: Error -20020 when using Express "Filter" VI?

If you right click on the express VI and pick Open front panel, you can turn it into a regular subVI and drill down into it and see how it works.  You'll see basic filter functions at its heart which you can find in the Signal Processing palette.  There are also "Point by Point" filters in that palette which allow you to work one point at a time.  They also have an input that lets you tell it what the sampling frequency actually is.

Message 6 of 7

Re: Error -20020 when using Express "Filter" VI?

Many Thanks  The point by point filters are exacvtly what I was looking for.



0 Kudos
Message 7 of 7