5 - 21 5 - 21
5 MELSEC FUNCTIONS
5.5.17 Increment INC_M
The specified BIN 16-bit data is incremented (by 1).
Function definition
BOOL INC_M (BOOL EN, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
D
IN/OUT
Increment data, incrementing result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the data stored in D0 is incremented by 1. *)
INC_M (X0, D0);
Corresponding MELSEC command
INC (BIN 16-bit increment)
5.5.18 Decrement DEC_M
The specified BIN 16-bit data is decremented (by 1).
Function definition
BOOL DEC_M (BOOL EN, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
D IN/OUT
Decrement data, decrementing result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the data stored in D0 is decremented by 1. *)
DEC_M (X0, D0);
Corresponding MELSEC command
DEC (BIN 16-bit decrement)
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: ......