9 CREATING A HARDWARE LOGIC
9.2 Multi Function Counter Block
155
9
Ring counter mode
When the ring counter mode is selected, the count operation is performed between "Lower Limit" and "Upper Limit"
repeatedly. The overflow error and underflow error do not occur.
■
Lower limit value
≤
Count value < Upper limit value
In up count, when "Count Value" has reached "Upper Limit", the value of "Lower Limit" is stored in "Count Value"
automatically. In down count, the count value is held at the value of "Lower Limit" even if "Count Value" has reached "Lower
Limit", and the value obtained by subtracting 1 from "Upper Limit" is stored in the count value in the next down count.
In both up count and down count, the value of "Upper Limit" is not stored in "Count Value". However, this excludes the case
where "Count Enable" is turned on from off or the values of "Count Value" and "Upper Limit" are the same when the preset
function is performed.
Ex.
The following figure shows how the counting range and the count value change when the preset function is performed with the
following settings: "Lower Limit" is 0, "Upper Limit" is 2000, and "Preset Value" is 500.
When the same values are set for "Upper Limit" and "Lower Limit", the ring counter operation can be
performed with the maximum valid range.
The following show examples for a 32-bit signed counter timer block.
• When up count is performed with the count value 2147483647, the count value becomes -2147483648.
• When down count is performed with the count value -2147483648, the count value becomes 2147483647.
When up count is performed from 2147483646 with "Upper Limit" = 2147483647 and "Lower Limit" = -
2147483648, the count value becomes -2147483648. Thus, the count range is one less than that of when the
same value is set to the "Upper Limit" and the "Lower Limit".
(1)
The value 2000 of "Upper Limit" is not stored in "Count Value".
0
Counting up
Counting down
Upper limit value
Lower limit value
Count value
-2147483648
0
500
2000
2147483647
(2000)
500
501
1998
1999
0
(1)
1
2
498
499
to
to
Counting range
"Upper Limit"
"Lower Limit"
"Upper Limit"
Count value
"Lower Limit"
Count value
Summary of Contents for MELSEC-L Series LD40PD01
Page 2: ......
Page 9: ...7 MEMO ...
Page 24: ...22 2 PART NAMES MEMO ...
Page 35: ...4 PROCEDURES BEFORE OPERATION 33 4 MEMO ...
Page 263: ......