Left Rotation (Carry Flag Not Included); Left Rotation (Carry Flag Included) - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.11.3 Left rotation (carry flag not included)

The specified BIN 16-bit data are rotated n bits to the left, without the carry flag being included.
Function definition

5.11.4 Left rotation (carry flag included)

The specified BIN 16-bit data are rotated n bits to the left, with the carry flag being included.
Function definition
5 - 50
BOOL ROL_M (BOOL EN, ANY16 n, ANY16 D);
Argument Name
EN
n
D
Remarks: When a bit device is specified in "D", the data in the specified number of
digits are rotated.
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data in D0 are rotated 3 bits to
(* the left, without the carry flag being included.
ROL_M (X0, K3, D0);
Corresponding MELSEC command
ROL (Left rotation of 16-bit data)
BOOL RCL_M (BOOL EN, ANY16 n, ANY16 D);
Argument Name
EN
n
D
Remarks: When a bit device is specified in "D", the data in the specified number of
digits are rotated.
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data in D0 are rotated 3 bits to
(* the left, with the carry flag being included.
RCL_M (X0, K3, D0);
Corresponding MELSEC command
RCL (Left rotation of 16-bit data)
ROL_M
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
IN
Number of rotations (0 to 15) (BIN 16-bit data)
IN/OUT
Data to be rotated, rotation result (BIN 16-bit data)
RCL_M
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
IN
Number of rotations (0 to 15) (BIN 16-bit data)
IN/OUT
Data to be rotated, rotation result (BIN 16-bit data)
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 50

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents