This section describes the attributes that let you set the size of the history, and how the block uses the history.
To specify the size of the history:
Specify values for the attributes Sample Type and Sample Size according the
this table:
points and Sample Size is 60, the block operates on
the last 60 points. If Sample Type is time and Sample Size is 60, the block operates
on the points received in the last 60 seconds. The block always uses seconds when
the type is time. If Sample Type is fixed, the block operates on all the points the
block has received since the application was started or the block was last reset.
fixed. When Sample Type is fixed, the block
never discards any data from its history, and the history could quickly
overflow your memory limits.
To specify when to pass data:
Specify the attributes Update Type and Update Size according to this table:
| If Update Type is | The block passes a value |
|---|---|
points
|
Every Update Size points it receives.
|
time
|
After the interval Update Size passes
and it receives a new value.
|
points and Update Size is 10, the block passes one
value after it has received 10 points, another value after it has received 20, and so.
If Sample Type is time and Sample Size is 60 seconds, the block waits a minute,
and passes a value the next time it receives a value. The block then waits another
minute, starting from the time it passed a value.
It is frequently useful to set the attributes Sample Type and Update Type and the attributes Sample Size and Update Size to the same values. For example, if Sample Type and Update Type are both
points, and Sample Size and Update Size
are both 10, the block receives 10 points and then passes their average. If Sample
Type and Update Type are both time and Sample Size and Update Size are both
60 seconds, the block collects input values for a minute and then passes the
average of the minute's values.
To specify what happens to a block's history when you reset the block:
Specify the attributes Erase History When Reset according to this table:
| If Erase History When Reset is | The block... |
|---|---|
yes
|
Erases its history when you reset.
|
no
|
Retains its history when you reset it so
it can start passing values immediately.
|
To specify whether a block computes a value with a partial history:
Specify the attributes Require Full History according to this table:
| If Require Full History is | The block... |
|---|---|
yes
|
Passes a value only when it has a
full history.
|
no
|
May pass a value before it has a
full history.
|
points
and Sample Size is 10) and the block passes a value every minute (Update Type is
time and Update Size is 1 minute). After a minute passes, the block only has
2 points. If Require Full History is yes, the block does not pass a value. If Require
Full History is no, the block passes a value using only those two points.