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.
The function also provides status outputs UPCNT_STS and DNCNT_STS. The
UPCNT_STS is set to "True" when the CNT_VAL is greater than or equal to the setting
Counter load value. DNCNT_STS is set to "True" when the CNT_VAL is zero.
The RESET input is used for resetting the function. When this input is set to "True"
or when
Reset counter
is set to "reset", the CNT_VAL is forced to zero.
3.20.18.5 Signals
Table 270: UDFCNT Input signals
Name Type Default Description
UP_CNT BOOLEAN 0=False Input for up counting
DOWN_CNT BOOLEAN 0=False Input for down count-
ing
RESET BOOLEAN 0=False Reset input for coun-
ter
LOAD BOOLEAN 0=False Load input for coun-
ter
Table 271: UDFCNT Output signals
Name Type Description
UPCNT_STS BOOLEAN Status of the up counting
DNCNT_STS BOOLEAN Status of the down counting
3.20.18.6 Settings
Table 272: UDFCNT Non group settings (Basic)
Parameter Values (Range) Unit Step Default Description
Operation
1=on
5=off
1=on
Operation Off / On
Counter load value 0...2147483647 1 10000 Preset counter value
Reset counter
0=Cancel 0=Cancel
Resets counter value
Table continues on the next page
Basic functions 1MRS759142 F
282 REX640
Technical Manual