From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-17-2014 07:25 PM
Hi all
I am using a median filter to removes spikes for real-time thickness data acquisition from an ultrasonic sensor. This filter is working fine to remove the upper spikes, unfortunately the bottom spikes remains unchanged. I tried by changing different rank in the median filter with no improvements.
The attached pictures are LabView code and the graphs showing data before and after filtering. How could I remove these bottom spikes also?
Thanks in advance
Apple
Solved! Go to Solution.
02-18-2014 01:12 AM
Instead of posting a pic of your graphs, post the vi with the data (edit-make current values default, file-save)
I hate guessing vom pictures if the data is there to do a quick test.
The median filter should do the job ....
02-18-2014 11:54 AM
Dear Henrik
I tried to save data by the technique (edit-make current values default, file-save). Unfortunately I could not save them.
Here is the vi and saved data ( for the both wavefrom chart) in excel.
Gritting from Canada
Apple
02-18-2014 07:42 PM
I believe that your problem is your acquisition code, not the filter. The data set you posted has 969 elements with values of 2.681 or 2.68. The other 54 elements have values like 2.6, 681, 1, 2, 8, and 68. One element has the value 5 and one has the value 9.
What this suggests to me is that your VISA Read is not properly synchronized with the device transmitting the data. Either you are getting partial messages or an occasional character which does not fit your regular expression. Look at the default value saved in read string in your VI. Swithc the display to '\' Characters mode. It contains "\D5U=\F32.681\r\n2.681\r\n2.681\r\n" This looks like it has two special characters \D5 and \F3 and then three values separated by carriage return, line feed. With this kind of protocol you should probably be using the default line feed as a termination character. Then search for the \D2...\F2 string which may be a header or channel ID. The rest is numeric data.
Check with the creator of the device which is sending this data to determine the complete communication protocol.
Lynn
02-19-2014 01:41 AM
here is a mod of your vi, run it to store some raw data
post that data and we should be able to help you with the decoding 🙂
02-19-2014 01:53 AM - edited 02-19-2014 02:05 AM
Since there was a slice of data in the read string 😉
Here is a quick try for decoding:
Looks like the data contain \r\n after each data send, so I enabled the terminal character.
Data send as floating point with a point as decimal seperator, so I tried with scan from string with a "%.;%f"
And it seems that you run that vi in contious mode ... not good, you will loose data and reinit and close the COM port on every read...
02-19-2014 07:57 PM
Dear Henrik
Thank you for doing codes for me. I am using 2011 version, I asked the department to install 2012, and I hope they will do it ASAP. Whenever I get 2012 version I will be able to open you program. And then I will see how does your program could be helpful for me.
Greetings from Canada again.
Apple
02-20-2014 02:08 AM
here is a 2011 version