Standard Bit Shift Functions; Shl_E - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
5.4

Standard Bit Shift Functions

5.4.1
SHL(_E)
Outline
This function shifts data of specified bit length leftward by the specified number of bits.
1. Format
Function name
SHL

SHL_E

*1.
Output variable
2. Set data
Variable
EN
Input
_IN (
variable
_N (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function shifts word [unsigned]/bit string [16-bit]/double word [unsigned]/bit string [32-bit] data stored
in a device specified in
using the data type of data stored in a device specified in
d
Data is shifted leftward by "n" bits specified in
Example: When word [unsigned]/bit string [16-bit] data is stored in a device specified in
s
bit string [16-bit] data)
270FH
0
0
F00H
2) "n" bits from the least significant bit become "0".
150
FX
3U(C)
Structured ladder
D0
_IN
K1
_N
X000
SHL_E
EN
D0
_IN
K1
_N
Execution condition
Word device which stores data to be shifted leftward
)
s
Number of shifted bits
)
n
Execution status
Word device which will store data obtained by shift
(
)
d
leftward by "n" bits, and outputs the obtained data to a device specified in
s
specified in
n
270FH
(Word [unsigned]/
0
1
0
0
1
1
0
0
0
1
1
1
FX
FX
3G
2N(C)
Expression in each language
SHL(_IN,_N);
SHL
Example:
*1
D10
D10:=
SHL(D0,K1);
SHL_E(EN,_IN,_N,Output label);
Example:
ENO
SHL_E(X000,D0,K1,D10);
*1
D10
Description
.
n
F00H
d
(Word [unsigned]/
bit string [16-bit] data)
1
0
0
0
0
1
1
0
0
0
0
0
These bits become "0".
5.4 Standard Bit Shift Functions
FX
FX
FX
/FX
1N(C)
1S
U
2C
ST
Bit
ANY_BIT
ANY_BIT
Bit
ANY_BIT
.
s
1
1
1
0
0
0
FX
FX
0N
0(S)
Data type
, and "8" is
s

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents