262
Shift Instructions
Section 5-17
Example
The following example uses the 1-second clock pulse bit (25502) so that the
execution condition produced by 00000 is shifted into IR 010 every second.
Output 10000 is turned ON whenever a “1” is shifted into 01007.
5-17-2 WORD SHIFT – WSFT(16)
Limitations
St and E must be in the same data area, and E must be greater than or equal
to St.
DM 6144 to DM 6655 cannot be used for St or E.
Description
When the execution condition is OFF, WSFT(16) is not executed. When the
execution condition is ON, WSFT(16) shifts data between St and E in word
units. Zeros are written into St and the content of E is lost.
Flags
ER:
The St and E words are in different areas, or St is greater than E.
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
I
P
SFT(10)
010
010
R
00000
25502
00001
Address Instruction
Operands
00000
LD
00000
00001
LD
25502
00002
LD
00001
00003
SFT(10)
010
010
00004
LD
01007
00005
OUT
10000
10000
01007
Ladder Symbols
Operand Data Areas
WSFT(16)
St
E
@WSFT(16)
St
E
St
:
Starting word
IR, SR, AR, DM, EM, HR, LR
E
:
End word
IR, SR, AR, DM, EM, HR, LR
F 0 C 2 3 4 5 2 1 0 2 9
E
St + 1
St
3 4 5 2 1 0 2 9 0 0 0 0
E
St + 1
St
Lost
0000