Author Topic: FunctionBlock for Average  (Read 14846 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: 98
  • 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: 170
  • Karma: +15/-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. :(

Offline AP

  • PLUS+1 Novice
  • *
  • Posts: 4
  • Karma: +0/-0
Re: FunctionBlock for Average
« Reply #5 on: April 03, 2024, 11:09:12 PM »
Hello, I am new to Plus 1 programming, and need to do a similar task, is there any advice or maybe a screenshot on how to handle it?

Thank you very much!

Offline Lukey

  • PLUS+1 Expert
  • ****
  • Posts: 63
  • Karma: +6/-0
Re: FunctionBlock for Average
« Reply #6 on: April 04, 2024, 02:27:30 AM »
Try the average filter function block, read up on the user manual this will explain in detail how it works.