● The preset value in [S] is transferred to [CEn] when the reset input changes from ON to OFF.
● When the count input changes from OFF to ON, the counter starts counting from the value
set in [CEn].
● When the reset input turns ON, the elapsed value in [CEn] will be cleared.
● The count result can be judged by comparing the elapsed value in [CEn] with an arbitrary set
value by the data comparison instruction.
● Be sure to execute the data comparison instruction immediately after the UDC instruction.
■
Setting the count value
● The count value is specified within the range from U1 to 4294967295, using a decimal (U)
constant.
■
Operation Example
R2
R1
R0
Y150
10
0
CE100
CE100
1) When the reset input R2 changes from ON to OFF, the set value: U100 is transferred
to the elapsed value: CE100. This value is used as the target.
2) When R1 turns ON while R0 is OFF, 1 is subtracted from the elapsed value: CE100
(decremental counting).
When R1 turns ON while R0 is ON, 1 is added to the elapsed value: CE100
(incremental counting).
3) The counter elapsed value: CE100 and U0 are compared, and if CE100=U0, the
external output Y150 turns ON.
③①
C100
3.22 UDC (Up/Down Counter)
WUME-FP7CPUPGR-12 3-67