Mitsubishi Electronics FX3S ユーザーズマニュアル

ページ / 964
649
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
27 Data Operation 3 – FNC210 to FNC219
27.4 FNC213 – SFR / Bit Shift Right with Carry
21
FNC160
-F
NC1
69
R
eal
 T
ime C
lock
 
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate 
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
 
Op
er
ation
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta 
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
Operation
30
FNC2
70-
FNC276
Ex
-Dev
ice
When a bit device is specified by digit specification
4 K  bits are shifted according to the data bit specification.
Related device
→ For the carry flag use method, refer to Subsection 6.5.2.
Error
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When a negative value is set to “n” (error code: K6706)
Program example
In the program example shown below, the contents of Y010 to Y023 are shifted rightward by the number of bits
specified by D0 when X020 turns ON.
Device
Name
Description
M8022
Carry flag
Shifts the ON/OFF status of bit “n-1”.
FNC213
SFRP
K3M0
K4
Command
input
1
M11
0
1
0
M8
1
0
1
0
1
0
1
0
1
Carry flag
M8022
M7
M4 M3
M0
0
0
0
0
1
0
1
0
1
0
1
0
M11
M8 M7
M4 M3
M0
Become “0”.
X020
FNC213
SFRP
K3Y010
D0
END
1
Y23
0
1
0
Y20
1
0
1
0
1
0
1
0
1
Y17
Y14 Y13
Y10
0
0
0
0
1
0
1
0
1
0
1
0
Y23
Y20 Y17
Y14 Y13
Y10
4
D0
Become “0”.
Carry flag
M8022