EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 394

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
392
7 APPLICATION INSTRUCTIONS
7.3 Shift Instructions
SFL
Shifts 16-bit data at device designated by (D) n bits to the left. Bits starting from the lowest bit to n bit are filled with 0s.
When a bit device is designated for (D), a left shift is executed within the device range specified by digit specification. The
number of bits by which a shift is executed is the remainder of n / (specified number of bits). For example, when n = 15 and
(specified number of bits) = 8 bits, the remainder of 15 / 8 = 1 is "7", and the data is shifted 7 bits.
Specify any of 0 to 15 as n. If the value specified as n is 16 or greater, the remainder of n / 16 is used for a shift to the left.
For example, when n = 18, the data is shifted 2 bits to the left since the remainder of 18 / 16 = 1 is "2".
Operation error
There is no operation error in the SFR(P) or SFL(P) instruction.
1111001100001111
0000
1111
00000000
b15 b8 b0
b7
b0
b7
b15 b8
1
b14b13 b12 b11b10 b9 b6
b5
b4 b3 b2 b1
b14b13 b12 b11b10 b9 b6
b5
b4 b3 b2 b1
Carry flag
(SM700)
Filled with 0s.
When n=8:
D
D
00
11
00
11
1 0011000
X14X13
X13X14
1
X17X10
X17X10
Carry flag
(SM700)
Filled with 0s.
X12

Table of Contents

Related product manuals