639
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
27 Data Operation 3 – FNC210 to FNC219
27.4 FNC213 – SFR / Bit Shift Right with Carry
21
FN
C
160-FN
C
169
R
eal
Ti
m
e
C
loc
k
C
ont
ro
l
22
FN
C
170
-F
N
C
17
9
E
xt
e
rnal
D
evi
ce
23
FN
C
180
Su
b
st.
I
n
str
. I
n
fo
24
FN
C
181-FN
C
189
O
ther
s
25
FN
C
190-FN
C
19
9
B
loc
k D
a
ta
O
per
at
io
n
26
FN
C
200-FN
C
209
C
har
act
e
r St
ring
C
ont
ro
l
27
F
N
C2
10
-F
NC
21
9
Da
ta
O
per
at
ion 3
28
FN
C
220-FN
C
24
9
Da
ta
Co
m
p
a
ris
o
n
29
FN
C
250-FN
C
269
Da
ta
T
a
b
le
O
per
at
io
n
30
FN
C
27
0-F
N
C
274
Ex
-D
ev
ic
e
In
ve
rte
r C
o
mm
s
27.4
FNC213 – SFR / Bit Shift Right with Carry
Outline
This instruction shifts 16 bits stored in a word device rightward by “n” bits.
1. Instruction format
2. Set data
3. Applicable devices
Explanation of function and operation
1. 16-bit operation (SFR and SFRP)
1) 16 bits stored in a word device
are shifted rightward by “n” bits.
Specify a value in the range from “0” to “15” as “n”.
If “16” or larger value is specified as “n”, 16 bits are shifted rightward by the remainder of “n/16”.
For example, when “n” is set to “18”, 16 bits are shifted rightward by 2 bits (18/16 = 1 ... 2).
2) The ON (1)/OFF (0) status of the “n”th bit (bit “n-1”) in the word device
is transferred to the carry
flag M8022.
3) “0” is set to “n” bits from the most significant bit.
Operand Type
Description
Data Type
Device number storing data to be shifted
16-bit binary
n
Number of times of shift (0
≤
n
≤
15)
Oper-
and
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special
Unit
Index
Con-
stant
Real
Number
Charac-
ter String
Pointer
X Y M T C S D
.b KnX KnY KnM KnS
T
C
D
R U
\G
V
Z Modify K
H
E
"
"
P
3
3
3
3 3 3 3
3
3 3
3
n
3
3
3
3
3 3 3 3
3
3 3
3 3
Mnemonic
Operation Condition
16-bit Instruction
5 steps
SFR
SFRP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
⎯
⎯
P
FNC 213
SFR
D
D
FNC213
SFRP
D
n
Command
input
D
D
1
b15
1
b14
1
b13
0
b12
1
b11
1
b10
1
b9
0
b8
1
b7
1
b6
1
b5
0
b4
1
b3
1
b2
1
b1
0
b0
D
0
b15
0
b14
0
b13
0
b12
0
b11
0
b10
1
b9
1
b8
1
b7
0
b6
1
b5
1
b4
1
b3
0
b2
1
b1
1
b0
D
In the case of “n = 6”
1
Carry flag
M8022
Become “0”.