5 - 55 5 - 55
5 MELSEC FUNCTIONS
5.12.5 1-word right shift DSFR_M
n points of 16-bit data, starting at the specified device, are shifted one word to the right.
Function definition
BOOL DSFR_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 (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the data in D100 to D106 are
*)
(* shifted 1 word to the right.
*)
DSFR_M (X0, K7, D100);
Corresponding MELSEC command
DSFR (1-word right shift of n-word data)
5.12.6 1-word left shift DSFL_M
n points of 16-bit data, starting at the specified device, are shifted one word to the left.
Function definition
BOOL DSFL_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
OUT
Data to be shifted, shift result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the data in D100 to D106 are
*)
(* shifted 1 word to the left.
*)
DSFL_M (X0, K7, D100);
Corresponding MELSEC command
DSFL (1-word left shift of n-word 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: ......