Author Topic: FunctionBlock for Average  (Read 5919 times)

Offline Keithang

  • PLUS+1 Developer
  • ***
  • Posts: 20
  • Karma: +0/-0
FunctionBlock for Average
« on: March 15, 2016, 02:00:01 PM »
Hi,

We are busy programing a Pressure sensor however we have erratic values being relayed into the controller which in turn causes our test to fail.

A solution would be to gather information for a certain amount of time, and use the average to set failure or pass value.

Is there a function block to log and work out an average?
Eg.
1 - 5
2 - 3
3 - 10
4 - 5
5 - 1

Average for above is 4.8 (Values (24)added and divided by log number (5)



Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 95
  • Karma: +2/-0
Re: FunctionBlock for Average
« Reply #1 on: March 16, 2016, 01:16:58 PM »
Hi,
have you tried the average filters in the Filters functions library?
http://powersolutions.danfoss.com/products/plus-1-software/plus-1-function-block-library/

/Jakob

Offline Keithang

  • PLUS+1 Developer
  • ***
  • Posts: 20
  • Karma: +0/-0
Re: FunctionBlock for Average
« Reply #2 on: March 17, 2016, 02:25:12 PM »
Hi,

Yes we have.

We have created our own function library to calculate the average and give a more stable and accurate reading. Readings match a Physical gauge.

Offline oiltronic

  • PLUS+1 Guru
  • *****
  • Posts: 169
  • Karma: +14/-0
Re: FunctionBlock for Average
« Reply #3 on: March 19, 2016, 12:17:31 AM »
Why didn't the Plus+1 average filter block work for you?

Offline zwerver

  • PLUS+1 Novice
  • *
  • Posts: 2
  • Karma: +0/-0
Re: FunctionBlock for Average
« Reply #4 on: February 22, 2017, 01:31:44 PM »
I came across a sample of a high pass filter. not so long ago. I thought to find it here. Did somebody deleted it or somebody knows where to find it. I was looking forward to try it. :(