5
FUNCTIONS
5.2 Selecting Counter Format
5.2.2 Selecting the ring counter
5
- 10
1
OVE
R
VI
EW
2
SYS
TEM
CONFIGURA
T
ION
3
SP
ECIFI
C
A
T
IO
N
S
4
PRO
C
EDURES AND
SETT
ING
S
BEFO
RE
O
PERA
T
IO
N
5
FUNCTIONS
6
UTIL
IT
Y P
A
C
K
A
G
E
(G
X Conf
igu
rat
or-CT)
7
PROGRA
MMING
8
T
R
OUB
L
ES
HO
O
T
ING
(b) When using in the entire range
a) General operation
By setting the same value in the ring counter upper limit value (Un\G2 and 3) and
ring counter lower limit value (Un\G0 and 1), the count operation is repeated in the
entire range of the QD63P6 (from -2147483648 (lower limit value) to 2147483647
(upper limit value)).
Although it operates like the linear counter, no overflow error will occur even if the
present value A (Un\G10 and 11)/present value B (Un\G200 and 201) reaches the
counting range of the QD63P6.
Figure 5.7 Ring counter operation image 3
b) Setting method
• Set any value in the preset value setting (Un\G4 and 5), set the ring counter
upper limit value (Un\G2 and 3) and ring counter lower limit value (Un\G0 and
1) as shown below, and then turn ON the preset command (Y02).
• After the preset value setting (Un\G4 and 5) became effective, turn OFF the
preset command (Y02) and turn ON the count enable command (Y04).
c) Count operation
When the following setting is made, regardless of the present value A
(
Un\G10
and 11
)
/present value B
(
Un\G200 and 201
)
, the count range is the entire
range of signed 32-bit binary numbers (-2147483648 to 2147483647).
d) Setting example
When the count is enabled with a ring counter lower limit value (Un\G0 and 1)
of 1000, ring counter upper limit value
(
Un\G2 and 3
)
of 1000, and present
value A
(
Un\G10 and 11
)
/present value B
(
Un\G200 and 201
)
of 3000, the
count is operated in the entire range of the QD63P6 (-2147483648 (lower limit
value) to 2147483647 (upper limit value)).
"Ring counter lower limit value = Ring counter upper limit value"
(Un\G0 and 1)
(Un\G2 and 3)
"Ring counter lower limit value = Ring counter upper limit value"
(Un\G0 and 1)
(Un\G2 and 3)
+2147483647
Ring counter lower limit value (Un\G0 and 1)
= Ring counter upper limit value (Un\G2 and 3)
-2147483648
Present counter value
Addition
Subtraction
0