5-45
SFT(P)
1
2
3
4
5
6
7
8
5.4 Shift Instructions
5.4.1 Bit device shifts (SFT(P))
(2) When word device bit designation is used
(a) Shifts to a bit in the device designated by the 1/0 status of the bit immediately prior to
the one designated by , and turns the prior bit to 0.
For example, if D0.5 (bit 5 [b5] of D0) has been designated by the SFT instruction, when
the SFT instruction is executed, it will shift the 1/0 status of b4 of D0 to b5, and turn b4
to 0.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• The device specified by exceeds the range of the corresponding device.
(For the Universal model QCPU only.) (Error code: 4101)
D
D
1
Before the
execution of shift
000 1 0 0 0 1 1 0 1 0 0 01
to
b0b4
to
b15
b5
1
After the
execution of shift
000
1
0 0 0
1 1 1
0 0 0 0
1
0
D0
D