7-17
Section
Data Movement Instructions
411
Control Word
Bits 00 through 12 of C are not used. Bit 13 is the shift direction: turn bit 13 ON to
shift down (toward lower addressed words) and OFF to shift up (toward higher
addressed words). Bit 14 is the Shift Enable Bit: turn bit 14 ON to enable shift
register operation according to bit 13 and OFF to disable the register. Bit 15 is the
Reset bit: the register will be reset (set to zero) between St and E when
ASFT(17) is executed with bit 15 ON. Turn bit 15 OFF for normal operation.
Note
If the non-differentiated form of ASFT(17) is used, data will be shifted every cycle
while the execution condition is ON. Use the differentiated form to prevent this.
Flags
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.)
Example
The following example shows instruction ASFT(17) used to shift words in an
11-word shift register created between DM 0100 and DM 0110 with C=#6000.
Non-zero data is shifted towards St (DM 0110).
ASFT(17)
#6000
DM 0100
DM 0110
00000
Address
Instruction
Operands
00000
LD
00000
00001
ASFT(17)
#
6000
DM
0100
DM
0110
DM 0100
1234
1234
1234
DM 0101
0000
0000
2345
DM 0102
0000
2345
3456
DM 0103
2345
0000
4567
DM 0104
3456
3456
5678
DM 0105
0000
4567
6789
DM 0106
4567
0000
789A
DM 0107
5678
5678
0000
DM 0108
6789
6789
0000
DM 0109
0000
789A
0000
DM 0110
789A
0000
0000
Before
execution
After one
execution
After seven
executions
Note
The zeroes are shifted “upward” if C=4000, and the entire shift register is set to
zero if C=8000.
7-17 Data Movement Instructions
7-17-1
MOVE – MOV(21)
S
: Source word
IR, SR, AR, DM, HR, TC, LR, #
D
: Destination word
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
MOV(21)
S
D
@MOV(21)
S
D
Содержание SRM1 - PROGRAMING 02-2001
Страница 1: ...Programmable Controllers Cat No W353 E1 06 SYSMAC CPM1 CPM1A CPM2A CPM2C SRM1 V2 PROGRAMMING MANUAL ...
Страница 2: ...CPM1 CPM1A CPM2A CPM2C SRM1 V2 Programmable Controllers Programming Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 9: ...x ...
Страница 15: ...xvi ...