Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 423

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Shift Instructions
Example
00000
25502
00001
0007
7-16-2 WORD SHIFT – WSFT(16)
Limitations
Description
Flags
7-16-3 ARITHMETIC SHIFT LEFT – ASL(25)
Limitations
The following example uses the 1-second clock pulse bit (25502) so that the
execution condition produced by 00000 is shifted into HR 00 every second. Out-
put 20000 is turned ON whenever a "1" is shifted into HR 0007.
I
P
R
Ladder Symbols
WSFT(16)
@WSFT(16)
St
E
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.
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.
F
Lost
3
ER:
The St and E words are in different areas, or St is greater than E.
Indirectly addressed DM word is non-existent. (Content of *DM word is
not BCD, or the DM area boundary has been exceeded.)
Ladder Symbols
ASL(25)
@ASL(25)
Wd
DM 6144 to DM 6655 cannot be used for Wd.
Address Instruction
SFT(10)
00000
LD
00001
LD
HR 00
00002
LD
HR 00
00003
SFT(10)
00004
LD
00005
OUT
20000
St
E
E
St + 1
0
C 2
3
4
5
2
1
E
St + 1
4
5
2
1
0
2
9
0
Wd
Section
7-16
Operands
00000
25502
00001
HR
00
HR
00
HR
0007
20000
Operand Data Areas
St: Starting word
IR, SR, AR, DM, HR, LR
E: End word
IR, SR, AR, DM, HR, LR
St
0
2
9
0000
St
0
0
0
Operand Data Areas
Wd: Shift word
IR, SR, AR, DM, HR, LR
405

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents