
93
TC 11 through TC 15 should not be used in RDM(23) if they are required for
the specific instruction to which they are assigned. Refer to the table on page
82.
The reversible drum counter is a ring counter with a counting range of 0000
to 9999. It uses three execution conditions, the count input (II), the decre-
ment/increment input (DI) and the reset input (RI).
RDM(23) is executed each time the ON execution condition for II has
changed from OFF to ON since the last scan, i.e., on the rising edge of II.
RDM(23) increments the present value if DI is OFF and decrements the pres-
ent value if it is ON.
The value (n) in St indicates the number of comparison ranges with which the
PV is to be compared. Up to 6 ranges are possible (4 in the SP10). The num-
ber of ranges is one greater than the value in St. The present value of the
counter is compared with the upper and lower limits of a set of ranges which
have been preset in St+1 through St+2(n+1).
If the lower limit is less than the upper limit, the corresponding bit of the result
word, R, will be turned ON whenever the present value is within the preset
range. The bit in the result word will remain ON until the current value is no
longer within the specified range.
If the lower limit is greater than the upper limit, the corresponding bit of the
result word, R, will be turned ON whenever the present value is outside of
the preset range. The bit in the result word will remain ON until the current
value moves within the specified range.
When the reset input (RI) goes ON, the present value is reset to 0000.
The following table shows the upper and lower limits that need to be set in St
+ 1 through St + 2n +2. PV is the present value of the counter.
Lower limit
Upper limit
Present value of the counter
Corresponding
bit of R
Applicable PCs
St + 1
St + 2
Value of St + 1
≤
PC
≤
value of St + 2
00
SP10, SP16, SP20
St + 3
St + 4
Value of St + 3
≤
PC
≤
value of St + 4
01
St + 5
St + 6
Value of St + 5
≤
PC
≤
value of St + 6
02
St + 7
St + 8
Value of St + 7
≤
PC
≤
value of St + 8
03
St + 9
St + 10
Value of St + 9
≤
PC
≤
value of St + 10
04
SP16, SP20
St + 11
St + 12
Value of St + 11
≤
PC
≤
value of St + 12
05
The values must be four-digit BCD in the range 0000 through 9999.
The following timing example uses DR 00 as the results word. Here, the first
range is 0001 to 0002 (the content of St+1 is 0001 and St+2 is 0002), and
the second range is 0004 to 0002 (the content of St+3 is 0004 and St+4 is
0002).
Description
Upper and Lower Limit
Settings
Timing Example
Instruction Set
Section 3-7