5 - 6 5 - 6
5 MELSEC FUNCTIONS
5.1.5 Set of device SET_M
When the execution condition is satisfied, the specified device is operated as described below.
Bit device: The coil/contact is turned ON.
When bit of word device is specified: The specified bit is turned to 1.
Function definition
BOOL SET_M (BOOL EN, BOOL D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only
when the result is TRUE)
D OUT
Data to be set
Return Value
Description
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the assigned device of bData is
*)
(* turned ON.
*)
SET_M (X0, bData);
Corresponding MELSEC command
SET (Set of device)
5.1.6 Reset of device RST_M
When the execution condition is satisfied, the specified device is operated as described below.
Bit device: The coil/contact is turned OFF.
Timer, counter: 0 is assigned to the present value and the coil/contact is turned OFF.
When bit of word device is specified: The specified bit is turned to 0.
Word device other than timer and counter: 0 is assigned to the device data.
Function definition
BOOL RST_M (BOOL EN, BOOL ANY_SIMPLE D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only
when the result is TRUE)
D OUT
Data to be reset
Remarks: The DINT/REAL/STRING type cannot be used in argument "D".
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the assigned device of bData is
*)
(* turned OFF.
*)
RST_M (X0, bData);
Corresponding MELSEC command
RST (Reset of 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: ......