Specifications

Chapter 1 - AsconACLib
25
1-3-18 COUNTER
FB Prototype
COUNTER
Input parameters
Output parameters
Description
This function block counts the number of the input transitions (FALSE to TRUE
transitions). The counter works if DSEL is active and holds the value when DSEL is
inactive. If RES is active the counter is reset. When the AOUT reaches the MAX-
COUNT value the counter is reset, and the output ROLLOVER is TRUE for a cycle.
Default values
Label Type Description Range
DI BOOL Counter input
DSEL BOOL Counter enable
RESET BOOL Counter reset
UP_DOWN BOOL Up/down count
FALSE = up,
TRUE = down
MAXCOUNT REAL Maximum limit for the output max. value = 999999.0
Label Type Description
AOUT REAL Number of transitions of DI since last reset
ROLLOVER BOOL TRUE if
AOUT
=
MAXCOUNT
DI
DSEL
RESET
UP_DOWN
MAXCOUNT
BOOL
BOOL
BOOL
BOOL
REAL
¡
¡
¡
¡
¡
REAL
BOOL
AOUT
ROLLOVER
¡
¡
Input Default values
DI FALSE
DSEL FALSE
RESET FALSE
UP_DOWN FALSE
MAXCOUNT 999999
Output Default values
AOUT 0.0
ROLLOVER FALSE