N-Bit Data 1-Bit Right Shift; N-Bit Data 1-Bit Left Shift - 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.12.3 n-bit data 1-bit right shift

n points of bit data, starting at the specified device, are shifted one bit to the right.
Function definition

5.12.4 n-bit data 1-bit left shift

n points of bit data, starting at the specified device, are shifted one bit to the left.
Function definition
5 - 54
BSFR_M
BOOL BSFR_M (BOOL EN, ANY16 n, ANY16 D);
Argument Name
EN
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data in M100 to M104 are
(* shifted 1 bit to the right.
BSFR_M (X0, K5, M100);
Corresponding MELSEC command
BSFR (1-bit right shift of n-bit data)
BSFL_M
BOOL BSFL_M (BOOL EN, ANY16 n, BOOL D);
Argument Name
EN
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data in M100 to M104 are
(* shifted 1 bit to the left.
BSFL_M (X0, K5, M100);
Corresponding MELSEC command
BSFL (1-bit left shift of n-bit data)
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
IN
Number of devices to be shifted (BIN 16-bit data)
IN/OUT
Data to be shifted, shift result (bit data)
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
IN
Number of devices to be shifted (BIN 16-bit data)
IN/OUT
Data to be shifted, shift result (bit data)
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 54

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents