3.17.16 Generic up-down counter UDFCNT
3.17.16.1 Function block
Figure 106: Function block
3.17.16.2 Functionality
The multipurpose generic up-down counter function UDFCNT counts up or down for
each positive edge of the corresponding inputs. The counter value output can be
reset to zero or preset to some other value if required.
The function provides up-count and down-count status outputs, which specify the
relation of the counter value to a loaded preset value and to zero respectively.
3.17.16.3 Operation principle
The function can be enabled and disabled with the
Operation
setting. The
corresponding parameter values are "On" and "Off".
The operation of UDFCNT can be described with a module diagram. All the modules
in the diagram are explained in the next sections.
Figure 107: Functional module diagram
Up-down counter
Each rising edge of the UP_CNT input increments the counter value CNT_VAL by one
and each rising edge of the DOWN_CNT input decrements the CNT_VAL by one. If
there is a rising edge at both the inputs UP_CNT and DOWN_CNT, the counter value
CNT_VAL is unchanged. The CNT_VAL is available in the monitored data view.
The counter value CNT_VAL is stored in a nonvolatile memory. The range of the
counter is 0...+2147483647. The count of CNT_VAL saturates at the final value of
2147483647, that is, no further increment is possible.
The value of the setting
Counter load value
is loaded into counter value CNT_VAL
either when the LOAD input is set to "True" or when the
Load Counter
is set to
"Load" in the LHMI. Until the LOAD input is "True", it prevents all further counting.
1MRS758755 C
Basic functions
REC615 & RER615
Technical Manual
189