05-06-2019 10:01 AM
Right now i am using the mean filter but i experience some spikes still. Am i using the wrong type of filter? or are my settings faulty?.
In the graph in labview it looks ok, but when i tranfer my data to excel and make a graph there the graph is to spiky and unlinear.
the excel logg is with a 1% change in the pressaure.
05-06-2019 02:03 PM - edited 05-06-2019 02:05 PM
Hi King,
Right now i am using the mean filter but i experience some spikes still.
Which "spikes"?
Am i using the wrong type of filter? or are my settings faulty?.
You are using a Pt-by-Pt function, set to filter at the default settings. Have you tried other settings? (Any results from changed parameters?)
What about setting a sample rate in your DAQmx task and read the AI with e.g. 100Hz and 50 samples/read and average those 50 samples?
In the graph in labview it looks ok, but when i tranfer my data to excel and make a graph there the graph is to spiky and unlinear.
So the problem is either in Excel or the way you save the data to a CSV file. Unfortunately you don't show any "Excel" data…
the excel logg is with a 1% change in the pressaure.
I don't know what you are trying to say here…
There's no timing in your loop, it tries to run as fast as possible. Surely there are other ways to handle such situations…
05-07-2019 02:38 AM
Which "spikes"?
Sometimes when the pressaure is stable the graph suddenly rise or lowers in my program like a fast spike. And i wonder why the filter doesn't remove that. there is a screenshot of it attached called ghu.
What about setting a sample rate in your DAQmx task and read the AI with e.g. 100Hz and 50 samples/read and average those 50 samples?
how do i choose the hz? is it the timout?
So the problem is either in Excel or the way you save the data to a CSV file. Unfortunately you don't show any "Excel" data…
Sorry, the excel file is attached. This logging is with a 1% rise in the rpm in the pump that pumps whater into the tank that im messauring pressaure in. And i cant understand why the graph in excel is so unlinear and ugly.
There's no timing in your loop, it tries to run as fast as possible. Surely there are other ways to handle such situations…
What do you mean here?
05-07-2019 04:21 AM
Hi King,
Sometimes when the pressaure is stable the graph suddenly rise or lowers in my program like a fast spike. And i wonder why the filter doesn't remove that. there is a screenshot of it attached called ghu.
I don't see this problem in your attached CSV file…
Why don't you write the original ("unfiltered") data into a log file? I guess that filter VI works exactly as it should, so the problem is with your DAQ data!
how do i choose the hz? is it the timout?
There is a sime DAQmxTiming function - did you read the basic DAQmx tutorial?
Sorry, the excel file is attached. This logging is with a 1% rise in the rpm in the pump that pumps whater into the tank that im messauring pressaure in. And i cant understand why the graph in excel is so unlinear and ugly.
It's no "excel" file, it's a simple spreadsheet file aka CSV!
And Excel only shows the data you have written into that CSV file, so it's not Excel's fault being "ugly" and "unexpected"!
Please log the unfiltered DAQ data!
What do you mean here?
There is no timing function in that loop…
05-07-2019 06:20 AM
here is the unfiltered csv file and the filtered csv file.
05-07-2019 08:23 AM
05-08-2019 02:12 AM
how did you make this average line?
05-08-2019 02:22 AM - edited 05-08-2019 02:36 AM
05-13-2019 08:50 AM
yes, figured it out, thank you!
But i have a new problem, now when i log the filtered value and the unfiltered value, the filtered one is slightly delayed. (the picture added shows this).
How do i fix this?, these two has to be alligned. I could set a delay on the unfiltered one, but then my graph wont fit to the actuall pressaure in the tank in the same time.
05-13-2019 08:57 AM - edited 05-13-2019 08:58 AM
Hi king,
any filter will change amplitude and phase of its input signal. And a running average is nothing else than a low pass filter...
Have you had any lessons on signals and filters at university? Or read a book about this topic?