Analog signal filtering question

escoplcguy

Member
Join Date
Jun 2010
Location
New Jersey
Posts
191
i have a laser sensor from AB that is measuring block height, it works great but problem i am having is the signal is just all over the place up and down....i started looking on here to see what people have already said about signal flitering and i believe i found my answer 2ce, but i just cant grasp how to set this up in the actual program.... can someone show me an actual lader example (pref. on logix 500)

this is what i used for filtering

FV=FV+C(NV-FV)
Where:
FV= Filtered value
C= constant (range 0-1) The smaller the number the more dampening.
NV= New Value


and basically just took that equation and stuck it in a compute instruction and for the range i just used 1.

now there was another i seen, and i couldnt figure out at all how to set it up......reasion i liked it was it wasnt a simple compute instruction and after setting it up i can actually understand more as to whats going on. kind of like long division as opposed to using a calculator. i like knowing what im doing rather than just having the machine do all the hard work. after i figure it out, then have the computer do the work haha...

heres the other

Total = Current_Sample + Hold_Value
Average = Total / Filter_Factor
Hold_Value = Total - Average
Current_Sample is your raw feedback signal. Average is the filtered value. Filter_Factor is a variable that you manipulate to find the best compromise between response and averaging. The larger the value of Filter Factor, the less impact a single sample has on the average, but the longer it takes to respond to a bona-fide change in the signal. Hold_Value and Total are internal variables that are only used in the calculation.



thanks guys.
 
can someone show me an actual lader example (pref. on logix 500)

F32:114 is the filtered value.
F32:105 is the unfiltered value. ( New Value)
0.0001 is a constant. This can be a floating point register which can make it earier to change to get the proper filtering.

filter.jpg
 
Well I changed some things around and now unless my constant is 1 my signal although it's at 11000 my computed filter is at 3277
 
the program is a disgrace right now, i have been moving things all over the place and now i have the filter on it works good but, now its slow. so i have to just think of a condition as to when to start filtering...thank you again!
 
i use an old shcool method to filter with few tags
Each scan, i add a real tag with the instant input value,(Average sum) i add another real one by 1 at the same time(Average count) and each few second, i divide the first by the second to get the averaged result (Result= Average sum/Average count) and i clear both tag during the same scan to start again averaging for the next scan....

I like the mickey's one too, i will give it a try on my next program...
 
Last edited:
C=1-e-2*π*Hz*Δt
The amplitude of the noise will be down -3db at the frequency ( Hz )

I can understand escoplcguy's response....

posting a formula like that with no explanation of the terms is almost unforgivable.

Now you know how to calculate C as a function of the desired bandwidth.
only if we know what n and delta-T relate to....

please don't forget that not everyone has the level of understanding/intelligence you are gifted with...(y)
 

Similar Topics

Hello all, PLC is a AB control logix 1756-L62 processor Analog Input Card is a 1756 IF6I I configured the card for a 4-20ma signal and scaled...
Replies
23
Views
13,996
Hey, I've read some threats here about analog signal filtering. Most propose a first order filter. I've done some experiments with first order...
Replies
4
Views
6,008
Hello, I have a compact Logix plc and I have been task with configuring alarms into our SCADA when an Analog signal stops moving. The analog...
Replies
6
Views
234
I'm pretty new to PLC's, so forgive me if I use the wrong terminology and whatnot. We have an issue at work where we have a flow meter that is...
Replies
10
Views
286
I need assistance in the form of some example programs pertaining to analog read and write. Thanks in advance. Sangli
Replies
1
Views
174
Back
Top Bottom