5
- 9
5.2 Selecting Counter Format
5.2.2 Selecting the ring counter
5
FUNCTIONS
c) Count operation
• Addition count
Even if the present value A
(
Un\G10 and 11
)
/present value B
(
Un\G200
and 201
)
reaches the ring counter lower limit value
(
Un\G0 and 1
)
, the ring
counter lower limit value
(
Un\G0 and 1
)
is held as it is. And by the next
addition pulse, "Ring counter upper limit value (Un\G2 and 3) +1" is stored
in the present value A
(
Un\G10 and 11
)
/present value B
(
Un\G200 and
201
).
• Subtraction count
When the present value A
(
Un\G10 and 11
)
/present value B
(
Un\G200
and 201
)
reaches the ring counter upper limit value
(
Un\G2 and 3
)
, the
ring counter lower limit value
(
Un\G0 and 1
)
is automatically stored in the
present value A
(
Un\G10 and 11
)
/present value B
(
Un\G200 and 201
).
In both cases of addition and subtraction counts, the ring counter upper limit
value
(
Un\G2 and 3
)
is not stored in the present value A
(
Un\G10 and 11
)
/
present value B
(
Un\G200 and 201
)
.
d) Setting example
Figure 5.6 Ring counter operation example 2
When the count is enabled with a ring counter lower limit value
(
Un\G0 and
1
)
of 0, ring counter upper limit value
(
Un\G2 and 3
)
of 2000, and present
value A
(
Un\G10 and 11
)
/present value B
(
Un\G200 and 201
)
of 3000
Addition
Subtraction
0
+2147483647
Ring counter upper
limit value (2000)
Ring counter lower
limit value (0)
-2147483648
Present counter value
3000
2147483647
-2147483648
-2147483647
-2147483646
2147483646
1998
1999
0
1
2
(2000)
2000 of ring counter upper limit value (Un\G2 and 3)
is not stored in present value A (Un\G10 and
11)/present value B (Un\G200 and 201).
Ring counter lower
limit value
Ring counter upper
limit value
1998
1999
0
1
2
(2000)
2000 of ring counter upper limit value (Un\G2 and 3)
is not stored in present value A (Un\G10 and
11)/present value B (Un\G200 and 201).
Ring counter lower
limit value
Ring counter upper
limit value