5.4 Shift Instructions
5.4.1 Bit device shift
5-45
5
SE
Q
U
EN
C
E
INSTRUCTION
S
SFT
SFT
(c) When the SFT and SFTP instructions are to be used consecutively, the program starts
from the device with the larger number.
(2) When bit specification for word devices is used
(a) Shifts to a bit in the device specified for
the 1/0 status of the bit immediately prior to
the one specified for
, and turns the prior bit to 0.
For example, if D0.5 (bit 5 [b5] of D0) has been specified in the SFT instruction, when
the SFT instruction is executed, it will shift the 1/0 status of b4 of D0 to b5, and turns b4
to 0.
O
p
erat
i
on
E
rror
In the following case, an operation error occurs, the error flag (SM0) is turned ON, and the
corresponding error code is stored to SD0.
• The device specified for
exceeds the corresponding device range. (For Universal
model QCPU only)
(Error code: 4101)
S
h
i
f
t in
p
ut
Start device o
f
s
h
i
f
t
(
1
)
0
0
M
15
M
1
4
0
M
1
3
0
M
12
0
M
11
1
M
1
0
1
M9
0
M8
(7)
0
0
1
0
0
0
1
0
(
2
)
0
0
0
0
1
0
1
0
(3)
0
0
0
1
0
0
1
0
(4)
0
0
0
1
0
1
1
0
(
5
)
0
0
1
0
1
0
1
0
(
6
)
1
0
0
1
0
0
1
0
S
h
i
f
t range
X
0
2
ON
A
f
ter t
h
e
1
st s
h
i
f
t in
p
ut
A
f
ter t
h
e
2
nd s
h
i
f
t in
p
ut
X
0
2
ON
A
f
ter t
h
e 3rd s
h
i
f
t in
p
ut
A
f
ter t
h
e 4t
h
s
h
i
f
t in
p
ut
A
f
ter t
h
e
5
t
h
s
h
i
f
t in
p
ut
*
At M8 to M
15
, "
1
" indicates ON and "0" indicates OFF.
0
0
0
0
0
d
d
1
Be
f
ore t
h
e
execution o
f
s
h
i
f
t
0
0 0
1
0 0 0
1 1
0
1
0 0 0
1
to
b
0
b
4
to
b15
b5
1
A
f
ter t
h
e
execution o
f
s
h
i
f
t
0
0 0
1
0 0 0
1 1 1
0 0 0 0
1
0
D0
d
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......