RsLogix 5000 Data Averaging

Erickm12

Member
Join Date
Nov 2018
Location
San Antonio, TX
Posts
1
Hello,

I am working with a laser encoder that is providing the speed of a fiber strand to our AB 1756-L61 PLC.

In order to calculate the amount of fiber used as a percentage of all other components, the speed of the fiber needs to be averaged over a period of at least 15 seconds (due to the number oscillating) and then I can use the averaged number to calculate the percentage.

While the speed osciallates by approximately +- 10 yd/min every at around 250 yd/min, sometimes the speed is drops down to zero due to unpredictable bounces in the fiber prior to going through the encoder. This results in a couple of 0 yd/min results for the encoder per minute.

So, what I am interested in doing is averaging the data only if the speed is greater than zero, but I am not sure how to go about it. Do I print the results into an array and then average the array? Do I use a moving average? What about a FIFO averaging? I would imagine that there is a scenario in which any of these may work, but I would guess that there is a hard way of doing it and then there is an easier way to do it.

I am a beginner with PLCs, I have some exposure to programming them and have taken the first course that Rockwell offers, but the majority of my learning has come from online searching.

I tried to be concise about the question I have, but if you need more information I am happy to provide more.

Thanks!
 
If your laser encoder input is coming into the PLC via an axis module, you can use the average velocity time base setting as a filter. However, in my experience this is not really a moving average in that the value only updates at the time base.

If coming in on an analog input, post #4 in this thread shows an efficient way to calculate a moving average.

http://www.plctalk.net/qanda/showthread.php?t=114188
 

Similar Topics

First off, I'm a hobbyist-level programmer, and this program isn't controlling anything anything that could even remotely be considered "life...
Replies
18
Views
509
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
123
I have a micrologix 1100 that I am trying to read three data points from it on my safety plc using studio 5000. Any tips or guidance is appreciated.
Replies
4
Views
838
I want transfer my I/O data from schneider (Unity Pro) as a write data and RS Logix 5000 as a read data. I use Ethernet as an communication...
Replies
0
Views
693
Im trying to sum a running "Shift Total" production value and move it into a Month Total value that will continuously update for viewing...
Replies
1
Views
1,533
Back
Top Bottom