AB 1734-IE8C Analog Input filter config question

wildswing

Member
Join Date
May 2005
Location
Sault Ste Marie, Ontario
Posts
281
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.
 
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.
 
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.
 
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"
 
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
 
Check for proper grounding of your analog sensors. Sometimes electrical noise is the problem. Can sometimes be corrected by grounding ONLY @ one end.
 
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.

When using analog modules that have no or limited digital filtering in a noisy application or environment, it may be necessary to filter the signal in code to smooth the process and avoid overreaction (such as when the noisy signal is used as the PV of a PID).
To create a low band-pass filer in code, we first need a routine based on an interrupt (it must be repeated at very specific times and no dependant on a variable scan time) along with the standard digital filtering formula of:

y = (x(n) + y(n-1)) / ((2n) - 1)
*Where n is a constant, x is the live signal feedback (i.e. the analog data), and y is the filtered result.

If you implemented this in a system where x is already at some non-zero number, you will notice y will ramp up and eventually equal x, but with high-frequency oscillations damped out. The smaller the number n, the higher and more specific frequency that is attenuated. Making this a very large number (i.e. 1000, or 1 sec) would create a very low-pass filter sluggish response).

Example:
An analog signal comes in on Local:3:I.Ch0Data, and is very “jittery,” with lots of high-frequency noise. In ControlLogix/FlexLogix/CompactLogix I create a periodic task set at 100ms (or in SLC/MicroLogix and PLC-5 I create an STI at 100ms), and a new tag for the filtered signal called FilteredSignal.
I then code the rung using this CPT instruction:

42026-2.jpg


This will then filter the analog signal and place the smoothed result in FilteredSignal, which is the tag I will use in my program in place of Local:3:I.Ch0Data. Optionally, the constants “1000,” “999” and “1999” used in the above example can be replaced with three integer tags, so that the first is a user-entered variable, the second is always calculated as the first entry minus one, and the last is a sum of the previous two. This way filter values can be changed programmatically, or via an HMI, to tailor signal response ‘on the fly.’
---
The filter response can then be varied by changing the divisors, with higher numbers yielding slower response. Decreasing the period of execution (i.e. the STI) will essentially slow the sample rate, also lowering the band-pass, at the cost of potentially losing some sample data. Combinations of the two can ultimately be tried to yield the desired result.
 
Last edited:
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
 
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.
 

Similar Topics

We have a Rockwell 1734 IE8C 8 channel analog input card, but we don't know if this is sourcing or sinking. The user manual doesn't seem to have...
Replies
6
Views
1,057
I am trying to understand how I wire a device that has a 4-20ma output and provides the 24vdc power as well. The manual for the 1734-IE8C only...
Replies
16
Views
6,705
Hi I have a 1784-IE8C which is configured for 4-20mA input, high engineering is 16383 and low enginering is 3277 The raw value from this channel...
Replies
9
Views
5,439
Hi all, Does anyone know if it is possible to update the firmware version from 3.1 to 3.2 on these AB analogue Input modules? Thanks for any...
Replies
0
Views
1,322
Hi to all i am totally confused in this project i am using compact logix plc of 1769-l23e-qb1b.1734-aent module using communicating with digtal...
Replies
0
Views
1,848
Back
Top Bottom