Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
27 Applied Instructions (Data Operation 3)
27.5 SFL / Bit Shift Left with Carry
667
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
3) "0" is set to "n" bits from the least significant bit.
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 Section 1.3.4.
Error
An operation error is caused in the following cases. The error flag M8067 turns ON, and the error code is
stored in D8067.
1) When a negative value is set to "n" (Error code: 6706)
Program examples
In the program example shown below, the contents of Y010 to Y017 are shifted leftward 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
b15
1
b14
1
b13
1
b12
0
b11
0
b10
1
b9
1
b8
0
b7
0
b6
0
b5
0
b4
1
b3
1
b2
1
b1
1
b0
0
b15
0
b14
0
b13
0
b12
1
b11
1
b10
1
b9
1
b8
0
b7
0
b6
0
b5
0
b4
0
b3
0
b2
0
b1
0
b0
In the case of "n = 8"
1
Carry flag
M8022
Becomes "0"
d
d
K2M10
LDP
EN
s
ENO
Command
input
SFL
EN
n
ENO
K3
d
0 0 1 1 0 0 1 1
1 0 0 1 1 0 0 01
Carry flag
M8022
Becomes "0".
M17 M14M13 M10
M17 M14M13 M10
M12
X020
SFLP
EN
n
ENO
d
K2Y10
D0
[Structured ladder/FBD] [ST]
SFLP(X020,D0,K2Y10);
0 0 1 1 0 0 1 1
1 0 0 1 1 0 0 01
Carry flag
M8022
Becomes "0".
Y17 Y14 Y13 Y10
Y17 Y14 Y13 Y10
Y12
3
D0