6. Function blocks
6.1 Manufacturer function blocks
6.1.3.3 AV - Average
Only available on easySoft Version 7.10 or higher.
If this function block is not being shown in the leftmost pane in easySoft 8, make sure
that you are using firmware version 1.10 or higher for the project.
General
easyE4 base devices provide 32 average function blocks, AV01
through AV32. Averaging is a method used to smooth data series,
and is primarily used, for example, to smooth temperatures or pro-
duction data recorded over several hours or days by removing
high frequency components. Please note, however, that this func-
tion block is not intended for signal smoothing or for controllers –
the FT function block should be used in those cases instead.
Operating principle
The average function block takes the values at function block input I1 and calculates
the corresponding moving average. Every time there is a rising edge at function block
input T_, the value at I1 is read and included in the calculation of the average value.
Meanwhile, the maximum number of values to be included in the calculation must be
specified using function block input NO. If this maximum number is reached, there
will be two possibilities depending on the selected operating mode.
Operating mode One-time mode
When using one-time mode, the function block will stop calculating the average
value when done with the calculation, and function block output RY will be set to 1.
This operating mode is primarily intended for calculating the average of a specific
value range at periodic intervals. Accordingly, it is, for example, suitable for cal-
culating the average day temperature every day (in which case a value of 24 would
be selected for NO). The maximum absolute error is 0.5.
Operating mode Continuous mode
When using continuous mode, the function block will continue calculating the aver-
age value with every new rising edge at T_. In this case, the moving average will be
calculated for the window defined with NO, with the oldest value being eliminated
and the newest one being added every time there is a rising edge. In other words,
this makes it possible, with every new rising edge, to "look into the past" a number of
edges = NO. Since it is not possible to store all the values in the aforementioned win-
dow, the calculation is made with an approximate calculation instead. Please note
that, just like with one-time mode, function block output RY will also be set to 1 in this
case as soon as the number of values NO is reached. This operating mode is suit-
able, among other things, for continuously calculating the average value of a tem-
perature for a specific period of time (and a value of 24 would also be used for NO in
this case).
340
easyE402/24 MN050009ENEaton.com