Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1922

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
■Operation processing
• These functions shift the WORD or DWORD data type value input to (s) to the left by (n) bit(s), and output the operation
result, in the same data type as (s), from (d).
• Specify the number of bits to be shifted in (n).
Ex.
Data type of (s): WORD, Value input to (n): 8
270FH
WORD
0
0
1
270FH
0
0
0
F00H
• The (n) bit(s) from the least significant bit is/are filled with 0(s).
• Input a WORD or DWORD data type value to (s).
• Input an INT data type value to (n) (Number of bits to be shifted) within the following range.
Data type of (s): WORD
Range: 0 to 15
The lower 4-bit data is used.
[Example]
If the input value is 6: 6
If the input value is 22: 6
■Operation result
1.
Function without EN/ENO
The operation processing is performed. The operation result is output from (d).
2.
Function with EN/ENO
The execution conditions and operation results will be as follows.
Execution condition
EN
TRUE (executed)
FALSE (not executed)
*1 If the value FALSE is output from ENO, the output data from (d) will be undefined. Create a program so that the undefined value will not
be used in operations.
Operation error
There is no operation error.
28 BIT SHIFT FUNCTIONS
1920
28.1 Shifting Data to the Left by n Bit(s)
(s)
0
0
1
1
1
0
0
1
1
1
1
0
Operation result
ENO
TRUE
FALSE
(d)
F00H
WORD
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
Data type of (s): DWORD
Range: 0 to 31
The lower 5-bit data is used.
[Example]
If the input value is 6: 6
If the input value is 22: 22
*1
(d)
Operation result output value
Undefined value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents