LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filters Errors

Solved!
Go to solution

Hi all  

 

how you guys doing . i hope you can cooperate with me guys please 🙂

 

evrytime i use multiple flters in the same VI an error ocuur and it says Fc(low) must be greater than zero and smaller than Fs/2 . and i am sure that the configuration is right !!! what is wrong with this ? 

 

well, the signal I am trying to filter comes through a serial port and every single byte is converted to a decimal number connnected directly to a chart .

 

any help would be deeply appreciated  :S

 

 

Bill David
0 Kudos
Message 1 of 18
(3,909 Views)

Have you established any timing information for the data you are receiving?  If you just have an array of values, then the sampling frequency of the data is assumed to be 1 Hz when you use the filter.

 

Post your VI if you still have problems.

0 Kudos
Message 2 of 18
(3,905 Views)

Hi 

 

it is awfully kind of you to have a look at my VI and solve me the problem . 

 

Regards .

 

 

 

 

Bill David
Download All
0 Kudos
Message 3 of 18
(3,898 Views)
Solution
Accepted by topic author Bildavid

The timing is determined by whatever device you are getting the data from.  It must have a sampling rate defined in it.

 

What you then do is take your array of data, and use Build Waveform (in the waveform palette).  Determine what the dT is for your device and wire that value in along with the array when you build the waveform.  Then feed that to the filter VI's.  So if the device is sampling at 1000 Hz, wire in the array of data along with the value .001 to the dT input.

 

There is a Rube Goldberg in your inner for loop.  It is odd the way you are taking the string data, typecasting it to an I32, then creating a string of hex characters, then converting those hex characters back to a U32 then dividing by 255.  (Should it be 256?)  How many bytes make up each data point?  You should be able to do a single typecast to the correct type, then some math to scale it as necessary.

 

Message 4 of 18
(3,893 Views)

Use the Build Waveform to add your dt to the waveform data.  This will add the timing information needed for the filters.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 18
(3,890 Views)

Dear Ravenfan 

Dear crossrulz

 

Thank you guys for being helpful 🙂

Bill David
0 Kudos
Message 6 of 18
(3,881 Views)

can you guys help me with solving another error please ?

 

I am getting error 20013 at the peak detector . it says that the width must be greater than zero ans smaller than the sample . can you help me ? :S

Bill David
0 Kudos
Message 7 of 18
(3,875 Views)

How many samples do you have going into the function?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 18
(3,873 Views)

Hi crossrulz 

 

talking about the width I am passing 15 samples to the peak detector function . but if you can notice that i already used a function that collects number of samples up to 15000 samples to be applied at the input signal of the peak detector .

 

I hope i answered your question 

 

Thank you 

 

Bill David
0 Kudos
Message 9 of 18
(3,870 Views)

Ok.  How many samples are you collecting each iteration of the loop?

 

You have to build up enough samples in order to do the peak detect.  So if you only collect 10 samples on the first iteration, then you are going to get your error because your width is greater than your number of samples.  After a few iterations, you will be fine.  Configre your Statistics VI to also output the number of signals.  When the number of signals is greater than your width, then you can perform your peak detection.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 18
(3,866 Views)