5 - 5 5 - 5
MELSEC-Q
5 BASIC USAGE
5.2.2 Selecting the ring counter
(1) Ring counter operation
When the ring counter is selected, the count operation is performed repeatedly
between the ring counter minimum value (addresses CH1: 14
H
to 15
H
, CH2: 34
H
to 35
H
) and maximum value (addresses CH1: 16
H
to 17
H
, CH2: 36
H
to 37
H
) that
were set arbitrarily in the buffer memory.
When the ring counter is being selected, an overflow error does not occur.
The ring counter can be used in combination with the preset function and the
coincidence output function.
Ring counter minimum value
Ring counter maximum value
Addition
Subtraction
Present counter value
(2) Ring counter count range
The count range for the ring counter is determined by the relationship between
the present values in the buffer memory (addresses CH1: 2
H
to 3
H
, CH2: 22
H
to
23
H
) at the time the count enable command {Y04 (Y0C)} turns ON or a preset is
executed and the ring counter minimum value/maximum value.
Normally the range used is "ring counter minimum value
≤
present value
≤
ring
counter maximum value".
• For up count
When the present value reaches the ring counter maximum value, the ring
counter minimum value is automatically stored as the present value.
• For down count
Even if the present value reaches the ring counter minimum value, the ring
counter minimum value will be retained as is. With the next subtraction pulse,
(ring counter maximum value –1) will be stored as the present value.
Whether during up count or down count, the ring counter maximum value will not
be stored in the buffer memory for storing the present values.
For example, if the count is enabled with the ring counter minimum value of 0, the
ring counter maximum value of 2000 and the present value of 500, the count
range and present value will change as shown in the figure below.
– 2147483648
Ring counter minimum value
Present value
Ring counter maximum value
0
500
2000
2147483647
Ring counter
maximum value
Ring counter
minimum value
(2000)
Present value
500
501
1998
1999
to
0
1
2
to
498
499
The ring counter maximum value,
2000, will not be stored in the
buffer memory for storing the
present values.
Count range
Summary of Contents for QD62
Page 1: ......
Page 2: ......
Page 13: ...A 11 A 11 MEMO ...
Page 55: ...4 18 4 18 MELSEC Q 4 SETUP AND PROCEDURE BEFORE STARTING THE OPERATION MEMO ...
Page 97: ...8 5 8 5 MELSEC Q 8 PROGRAMMING 3 Program example a Set only when the linear counter is used ...
Page 100: ...8 8 8 8 MELSEC Q 8 PROGRAMMING 2 Program example a Set only when the ring counter is used ...
Page 127: ......
Page 128: ......