Download Print this page

Shifting 16-Bit Data To The Right By N Bit(S) - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Shifting 16-bit data to the right by n bit(s)

SFR(P)
These instructions shift the 16-bit data in the device specified by (d) to the right by (n) bit(s).
Ladder diagram
(d)
(n)
FBD/LD
EN
ENO
n
d
Setting data
■Descriptions, ranges, and data types
Operand
Remarks
(d)
Head device number where the shift-target data is stored
(n)
Number of shifts
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(d)
(n)
Processing details
• This instruction shifts the 16-bit data in the device specified by (d) to the right by (n) bit(s) from the most significant bit. The
(n) bit(s) from the most significant bit is/are filled with 0(s).
When (n)=6
b15
b14 b13 b12 b11 b10 b9
(d)
1
1
1
0
1
1
1
b15
b14 b13 b12 b11 b10 b9
0
0
0
0
0
0
1
(d)
0
• When (d) is a bit device, bits are shifted to the right within the device range specified by nibble specification.
When (n)=4
Y23
Y20
Y17
···
···
1
0
1
0
1
0
1
Y23
Y20
Y17
···
···
0
0
0
0
0
1
1
0
Word
T, ST, C, D, W,
U\G
SD, SW, R
b8
b6 b5 b4 b3 b2 b1
b7
0
1
1
1
0
1
1
1
b8
b7
b6 b5 b4 b3 b2 b1
1
1
0
1
1
1
0
1
Y14 Y13
Y10
···
0
1
0
1
0
(SM700, SM8022)
Y14 Y13
Y10
···
0
0
0
1
1
Structured text
ENO:=SFR(EN,n,d);
ENO:=SFRP(EN,n,d);
Range
Data type
16-bit signed binary
0 to 15
16-bit unsigned binary
Bit
Bit
Double word Indirect
specification
Z
LC
LZ
b0
0
(SM700, SM8022)
b0
1
1
1
Data type (label)
ANY16
ANY16
BOOL
BOOL
Constant
Others
K, H
E
$
6 SEQUENCE INSTRUCTIONS
6.4 Shift Instructions
6
141

Hide quick links:

Advertisement

loading