5 - 56 5 - 56
5 MELSEC FUNCTIONS
5.13 Bit Processing
5.13.1 Bit set of word device BSET_M
Bit n of the specified word device is set.
Function definition
BOOL_BSET_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
Bit number to be set (BIN 16-bit data)
D
IN/OUT
Data to be set, bit set result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, bit 8 of D100 is set.
*)
BSET_M (X0, K8, D100);
Corresponding MELSEC command
BSET (Bit set of word device)
5.13.2 Bit reset of word device BRST_M
Bit n of the specified word device is reset.
Function definition
BOOL_BRST_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
Bit number to be reset (BIN 16-bit data)
D
IN/OUT
Data to be reset, bit reset result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, bit 8 of D100 is reset.
*)
BRST_M (X0, K8, D100);
Corresponding MELSEC command
BRST (Bit reset of word device)
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: ......