Applied Instructions
《Word shift left》
105
n2 字左移
n2 字右移
《Word shift right》
Function & Action
z The instruction copies n2 source devices to a word stack of length n1. For each addition
of n2 words, the existing data within the word stack is shifted n2 words to the left/right.
Any word data moving to a position exceeding the n1 limit is diverted to an overflow
area. The word shifting operation will occur every time the instruction is processed unless
it is modified with either the pulse suffix or a controller interlock.
① D13~D10→overflow
② D17~D14→D13~D10
③ D21~D18→D17~D14
④ D25~D22→D21~D18
⑤ D 3~D 0→D25~D22
z In every scan cycle, loop shift left/right action will be executed
[WSFL] & [WSFR]
16 bits instruction:WSFL、WSFR 32 bits instruction:DWSFL、DWSFR
Suitable Models:
XC3、XC5
Word
Device
Bit
Device
X
Y
M
S
T
C
Dn.m
D
FD
DM
DX
DY
DS
TD
CD
K/H
n1
n2
D·
S·
① D25~D22→overflow
② D21~D18→D25~D22
③ D17~D14→D21~D18
④ D13~D10→D17~D14
⑤ D 3~D 0→D13~D10