132
After executing LSL once, the lowest bit is filled with 0; the last bit is stored in carry flag.
LSL meaning and operation are the same to SHL.
After executing LSR once, the highest bit is filled with 0; the last bit is stored in carry flag.
LSR and SHR are different, LSR add 0 in the highest bit when moving, SHR all bits are
moved.
< Logic shift left > < Logic shift right >
LSL
D0
K4
D.
n
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
SM22
1
SM22
※
※
Highest
bit
Lowest
bit
Move left
Highest
bit
Lowest
bit
After
executing
once
M0
N bits
LSR
D0
K4
D.
n
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
SM22
0
SM22
※
※
Highest
bit
Lowest
bit
Move right
Highest
bit
Lowest
bit
After
executing
once
M1
N bits
4-7-3
.
Rotation shift left [ROL], Rotation shift right [ROR]
1. Summary
Cycle shift left or right
Rotation shift left [ROL]
16 bits
ROL
32 bits
DROL
Execution
condition
rising/falling edge
Suitable
Models
XD, XL
Hardware
requirement
-
Software
requirement
-
Rotation shift right [ROR]
16 bits
ROR
32 bits
DROR
Execution
condition
rising/falling edge
Suitable
Models
XD, XL
Hardware
requirement
-
Software
requirement
-
2. Operands
Operands Function
Data Type
D
Source data address
16 bits/32 bits, BIN
n
Shift right or left times
16 bits/32 bits, BIN
Description
Содержание XD Series
Страница 1: ...XD XL series PLC User manual Instruction WUXI XINJE ELECTRIC CO LTD Data No PD05 20201022 3 5 ...
Страница 210: ...209 ...
Страница 314: ...313 B Double click the middle part to modify ...