![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
|
AB 1734-IE8C Analog Input filter config question
Hey fellas,
I've got some Point I/O analog inputs (1734-IE8C) that I would like to filter. FYI, this is for some flow meters. The raw unfiltered input is a little too erratic for what I want to do with them. I know I can program my own filter, but I thought I'd try the module's built in filter first. Can someone explain this filter. What type is it and what significance does the ms setting (0-10000) have? Long shot here...Is there any way to see the raw unfiltered input AND the filter output at the same time to compare the two? Thanks in advance. Your feedback is very much appreciated.
__________________
Mark Hard work never killed anyone, but why take the chance? |
|
|
|
#2 |
|
Member
![]() Join Date: Jul 2009
Location: Escuminac
Posts: 379
|
FV+((FV-AV)*0.xx) works well
FV = Filtered Value AV = Actual Value xx = some number from .99 to .01. Pick a number that works well for your application. You could also read AV into a data table every so often and average the values in it. For instance, set up a timer that moves the AV to the start of a 10-word data table every second. The first time it's used, the data table has only one value. the next second, move the original data to the second word and put the new AV into the first word. Once you have accumulated ten words of data, add them all together and divide by ten.
__________________
"If you can't measure it, you can't manage it!" |
|
|
|
#3 |
|
Member
|
Thanks for the quick reply.
I've used that same formula as well. Is that the formula the Point I/O config uses? Where does the millisecond setting come in? I'm familiar with your 2nd example. I've done much the same using FIFO and Average blocks.
__________________
Mark Hard work never killed anyone, but why take the chance? |
|
|
|
#4 |
|
Member
![]() Join Date: Jul 2009
Location: Escuminac
Posts: 379
|
It's not really a "millisecond setting". The value is only a multiplier of the difference between the "real" value and the previous "filtered value".
For instance, if the first scan of the PLC returns a value of 10,000, the formula looks at the previous filtered valve (zero, on the first scan) and adds the difference between it and the actual value, times the multiplier. The bigger the multiplier, the less "filtering"
__________________
"If you can't measure it, you can't manage it!" |
|
|
|
#5 |
|
Member
![]() Join Date: Apr 2010
Location: stockton, ca
Posts: 95
|
Funny you've brought this up. I am going through the same thing as well, as far as having erratic readings. What did you end up doing to fix the problem. I have tried counters with an average to "mellow" out the signal still to erratic for a PID loop.
thanks |
|
|
|
#6 |
|
Member
![]() Join Date: Jul 2009
Location: Escuminac
Posts: 379
|
Check for proper grounding of your analog sensors. Sometimes electrical noise is the problem. Can sometimes be corrected by grounding ONLY @ one end.
__________________
"If you can't measure it, you can't manage it!" |
|
|
|
#7 |
|
Member
|
Nothing yet. I'm still just exploring filtering options.
__________________
Mark Hard work never killed anyone, but why take the chance? |
|
|
|
#8 | |
|
Member
|
Not sure if it's OK to post something copied from Rockwell's KB, so Admins please delete if this is not allowed.
I just ran across this in the Rockwell KB, "42026 - How to do digital filtering in code?". I've asked tech support if this is the filter formula used 1734 IE8C digital filter. Quote:
__________________
Mark Hard work never killed anyone, but why take the chance? Last edited by wildswing; June 28th, 2012 at 06:24 AM. |
|
|
|
|
#9 |
|
Member
|
It's very likely just a simple first order low pass filter. The time value is a first order response time constant. If you apply a step input to the filter the output will reach appriximately 63% of the input value in one time constant. It will take 5 time constants to reach about 99% of the step input value. The output value will approach the input value in a decreasing slope curve.
An alternate version of the filter from post 2 is: Y(n) = (Y(n-1) * K) + (X(n) * (1 - K)) where: Y(n) is Filter Output Y(n-1) is Last Scan Filter Output K is Filter Constant ( between 0 and 1) X(n) Filter Input K is calculated as: e-(t/T) where: e is the base of the natural log (about 2.718) t is the processor scan time in seconds T is the filter time constant in seconds That is how you can convert a given time constant into a usable filter constant. Also, the -3dB frequency of the filter is at 1/T in radians per second. So now you can correlate the time constant to a frequency. Keith |
|
|
|
#10 |
|
Member
|
Thanks Keith.
I ended up just using the module's filter rather than rolling my own. Seems to work fine for what I need. Thanks for the feedback fellas. As I mentioned before, it's very much appreciated.
__________________
Mark Hard work never killed anyone, but why take the chance? |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with config of 1734 IO over CNet | wildswing | LIVE PLC Questions And Answers | 6 | November 14th, 2011 02:42 PM |
| S7-200 and analog input problem | mniknezhadi | LIVE PLC Questions And Answers | 3 | July 31st, 2008 03:33 AM |
| Micrologix 1200 Input filter | Preeya | LIVE PLC Questions And Answers | 2 | April 14th, 2004 09:42 AM |
| AB Compactlogix with analog output question!! | 93lt1 | LIVE PLC Questions And Answers | 5 | August 21st, 2002 12:09 PM |
| AB Analog Input Module Wiring... | Eric Nelson | LIVE PLC Questions And Answers | 3 | May 6th, 2002 08:37 AM |