5 - 54 5 - 54
5 MELSEC FUNCTIONS
5.12.3 n-bit data 1-bit right shift BSFR_M
n points of bit data, starting at the specified device, are shifted one bit to the right.
Function definition
BOOL BSFR_M (BOOL EN, ANY16 n, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when
the result is TRUE)
n
IN
Number of devices to be shifted (BIN 16-bit data)
D
IN/OUT
Data to be shifted, shift result (bit data)
Return Value
Description
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)
5.12.4 n-bit data 1-bit left shift BSFL_M
n points of bit data, starting at the specified device, are shifted one bit to the left.
Function definition
BOOL BSFL_M (BOOL EN, ANY16 n, BOOL D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when
the result is TRUE)
n
IN
Number of devices to be shifted (BIN 16-bit data)
D
IN/OUT
Data to be shifted, shift result (bit data)
Return Value
Description
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)
For the usable data type, refer to "3.2.2
About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......