11-30-2012 08:02 AM
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
Solved! Go to Solution.
11-30-2012 08:47 AM - edited 11-30-2012 08:48 AM
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.
11-30-2012 09:02 AM
Hi RavensFan
First thank you for the reply .
Dear friend , to put it bluntly the issue realted to timing information is really what i cannot understand while dealing with array. what do i have to do ? how to set timing information /? I AM really a very new user to labview . i am trying to understand things . i hope you appreciate that .
it is awfully kind of you to have a look at my VI and solve me the problem .
Regards .
11-30-2012 09:27 AM - edited 11-30-2012 09:30 AM
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.
11-30-2012 09:29 AM - edited 11-30-2012 09:30 AM
Use the Build Waveform to add your dt to the waveform data. This will add the timing information needed for the filters.
11-30-2012 09:33 AM
Dear Ravenfan
Dear crossrulz
Thank you guys for being helpful 🙂
11-30-2012 11:49 AM
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
11-30-2012 12:01 PM
How many samples do you have going into the function?
11-30-2012 12:05 PM
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
11-30-2012 12:16 PM
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.