Hi,
could you not store, in a table, the last twenty results and average those, I think the average function can be built into the table.
Then on each run thru the PLC one new data point is added to the table and the oldest, the 21st, gets dropped. Running average?
Craig