Shift Instructions - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

5.4

Shift Instructions

Bit device shift
SFT(P)
High
Basic
Process
Redundant Universal
performance
SFT
SFTP
(D): Head number of the devices to be shifted (bits)
Setting
Internal device
data
Bit
Word
 (Other than T, ST, C)
(D)
Processing details
■When bit device is used
• Shifts to a device designated by (D) the ON/OFF status of the device immediately prior to the one designated by (D), and
turns the prior device OFF. For example, if M11 has been designated by the SFT instruction, when the SFT instruction is
executed, it will shift the ON/OFF status of M10 to M11, and turn M10 OFF.
• Turn the first device to be shifted ON with the SET instruction.
• When the SFT and SFTP are to be used consecutively, the program starts from the device with the larger number.
Shift input
M0
SFTP
SFTP
SFTP
SFTP
X2
SET
Head device to shift
■When word device bit designation is used
• Shifts to a bit in the device designated by (D) the 1/0 status of the bit immediately prior to the one designated by (D), 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.
b15
to
Before the
0
1
0 0 1 0 0 0 1 1 0 1 0 0 0 1
execution of shift
D0
After the
0
1
0 0 1 0 0 0 1 1 1 0 0 0 0 1
execution of shift
LCPU
Command
Command
R, ZR
J\
Bit
Shift range
M15 M14
M13
M14
0
0
0
(1)
(2)
0
0
0
M13
(3)
0
0
0
M12
(4)
0
0
0
(5)
0
0
1
M11
(6)
0
1
0
M10
0
0
1
(7)
* At M8 to M15, "1" indicates ON and "0" indicates OFF.
b5
b4
to b0
0
SFT
SFTP
U\G
Zn
Word
M12
M11
M10
M9
M8
0
0
1
1
0
X02 ON
0
0
1
0
1
0
After the 1st shift input
0
1
0
0
1
0
After the 2nd shift input
1
0
1
1
0
X02 ON
0
0
1
0
1
0
After the 3rd shift input
0
1
0
0
1
0
After the 4th shift input
0
0
0
0
1
0
After the 5th shift input
5 SEQUENCE INSTRUCTIONS
D
D
Constant
Others
DY
171
5.4 Shift Instructions
5

Advertisement

Table of Contents
loading

Table of Contents