escoplcguy
Member
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.
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.