
320
7 APPLICATION INSTRUCTION
7.1 Rotation Instruction
Rotating 16-bit data to the left
ROL(P), RCL(P)
• ROL(P): These instructions rotate the 16-bit binary data in the device specified by (d) to the left by (n) bit(s) (not including
the carry flag).
• RCL(P): These instructions rotate the 16-bit binary data in the device specified by (d) to the left by (n) bit(s) (including the
carry flag).
*1
The ROL instruction is not supported by the ST language. Use ROL of the standard function.
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
■
ROL(P)
• These instructions rotate the 16-bit binary data in the device specified by (d) to the left by (n) bit(s) (not including the carry
flag). The carry flag is on or off depending on the status prior to the execution of the instruction.
Ladder diagram
Structured text
ENO:=ROLP(EN,n,d);
ENO:=RCL(EN,n,d);
ENO:=RCLP(EN,n,d);
Operand
Description
Range
Data type
Data type (label)
(d)
Head device number where the rotation target data is stored
16-bit signed binary
ANY16
(n)
Number of rotations
0 to 15
16-bit unsigned binary
ANY16
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(d)
(n)
(d)
(n)
b0
b7
b15
b8
b14 b13 b12 b11 b10
b9
b6
b5
b4
b3
b2
b1
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
b0
b7
b15
b8
b14 b13 b12 b11 b10
b9
b6
b5
b4
b3
b2
b1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
b0
b7
b15
b8
b14 b13 b12 b11 b10
b9
b6
b5
b4
b3
b2
b1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
b0
b7
b15
b8
b14 b13 b12 b11 b10
b9
b6
b5
b4
b3
b2
b1
(d)
(d)
(d)
(d)
Value of b15
Rotating n-bit data to the left
Rotating 1-bit data to the left
Rotating 1-bit data to the left
Value of b15
Value of b15
Value of b(16-n)
Carry flag (SM700, SM8022)
Carry flag (SM700, SM8022)
Carry flag (SM700, SM8022)
Carry flag (SM700, SM8022)
Value of b(16-n)
Value of b15
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......