Technical data

Calculation of the average
value
The average value is calculated by OB 152 using the following
algorithm:
Each time the statistical data are updated, the value of LASTCYC is
entered into an internal system buffer each time the statistical data are
updated. This buffer can take a maximum of 256 values. If the buffer
is full, the oldest LASTCYC value is lost and the newest value is
entered. During the updating of the data, the sum of the LASTCYC
values in the buffer is formed so that it always contains the
most
recent LASTCYC values
(maximum 256).
When OB 152 is called, the average value is formed by dividing the
total by the number of LASTCYC values stored in the buffer. In
practical terms, this means that the average value is almost always
formed from the LASTCYC values of the
last 256 cycles.
Functions
When OB 152 is called, you can activate the following individual
functions by means of a function number:
Func-
tion no.
Function
0 Disable cycle statistics
1 Read CURCYC / LASTCYC
2 Read MINCYC / MAXCYC
3 Read AVERAGE VALUE / CYCLE COUNTER
8 Initialize cycle statistics
15 Enable cycle statistics
Table 6-6 OB 153 functions
OB 152: Cycle Statistics
CPU 928B Programming Guide
6 - 42 C79000-B8576-C898-01