163
In the following example, CIO bits 000005, 000006, 000007, and 000008 are
used to control the bits of C used in j SFTR(051). The shift register is between
words 0020 and 0021, and it is controlled through bit 000009.
00000 LD 000005
00001 OUT 005012
00002 LD 000006
00003 OUT 005013
00004 LD 000007
00005 OUT 005014
00006 LD 000008
00007 OUT 005015
00008 LD 000009
00009 jSFTR(051)
0050
0020
0021
(051)
jSFTR 0050 0020 0021
0000
05
0000
06
0000
07
0000
08
0000
09
0050
12
0050
13
0050
14
0050
15
Direction
Status to input
Shift pulse
Reset
Address Instruction Operands
5-14-3 ASYNCHRONOUS SHIFT REGISTER: ASFT(052)
Variations
j ASFT(052)
(052)
ASFT C St E
Operand Data AreasLadder Symbol
C: Control word CIO, G, A, DM, DR, IR
E: End word CIO, G, A, DM
St: Starting word CIO, G, A, DM
Description When the execution condition is OFF, ASFT(052) is not executed. When the ex-
ecution condition is ON, ASFT(052) is used to create and control a reversible
asynchronous word shift register between St and E. This shift register reverses
the contents of adjacent words when the content of one of the words is zero and
the other is non-zero.
Bit 13 of C determines whether the non-zero is shifted toward St or toward E. By
repeating the instruction several times, all of the words with a content of zero
accumulate at the lower or higher end of the range defined by St and E. If no
words in the register contain zero or all of the words with a content of zero have
accumulated at one end of the range, nothing is shifted.
When the Reset Bit is ON, the content of every word from St to E is set to zero.
Control Word Bits 00 through 12 of C are not used. Bit 13 is the shift direction: turn bit 13 OFF to
shift the non-zero data toward E (toward higher addressed words) and ON to
shift toward St (toward lower addressed words). Bit 14 is the Shift Enable Bit:
turn bit 14 OFF to enable shift register operation according to bit 13, and ON to
disable the register. Bit 15 is the Reset Bit: the register will be reset (set to zero)
between St and E when ASFT(052) is executed with bit 15 OFF. Turn bit 15 ON
for normal operation.
15 14 13 Not used.
Shift direction
0 (OFF): Non-zero data shifted toward E
1 (ON): Non-zero data shifted toward St
Shift Enable Bit
Reset
Example
Shift Instructions Section 5-14