Error Statistics (ERRSTAT)

Several process control functions and function blocks may generate error conditions causing these ERRSTAT counters to increment: reversed parameters, incorrect parameter values, overflow conditions, underflow conditions, and divide by zero.
errstat_block
Parameter values for the ERRSTAT function block:
Parameter
Data Type
Description
RESET
BOOL
When TRUE, resets the error counters to zero.
Reversed
DINT
Reversed parameters error counter. The count increments on each execution of the function when the parameters are reversed.
The initial value is zero.
Param
DINT
Incorrect parameter values error counter. The count increments on each execution of the function when the parameter value is incorrect.
The initial value is zero.
Overflow
DINT
Overflow condition error counter. The count increments on each execution of the function when the overflow condition occurs.
The initial value is zero.
Underflow
DINT
Underflow condition error counter. The count increments on each execution of the function when the underflow condition occurs.
The initial value is zero.
ZeroDivide
DINT
Divide by zero error counter. The count increments on each execution of the function when the divide by zero error occurs.
The initial value is zero.
TIP: Counter values do not wrap to zero. Counter overflow conditions return a value of -1.
Function Block Diagram Example
errstat_fbdexample
Structured Text Example
ERRSTAT(Reset_count); Reversed_count := ERRSTAT.Reversed; IncorrectParam_count := ERRSTAT.Param; Overflow_count := ERRSTAT.Overflow; Underflow_count := ERRSTAT.Underflow; ZeroDivide_COUNT := ERRSTAT.ZeroDivide;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal