6 - 33 6 - 33
6 IEC FUNCTIONS
6.5.3 Subtraction SUB_E
Subtraction is performed between the specified data.
Function definition
BOOL SUB_E( BOOL EN, ANY_NUM S1, ANY_NUM S2, ANY_NUM D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1 IN
Minuend
data
S2 IN
Subtrahend
data
D1
OUT
Subtraction operation result
Return value
Return Value
Description
BOOL
Execution condition (bit data)
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
REAL
b_result := SUB_E( b_select,
r_data1, r_data2, r_data3 );
LD b_select
E- r_data1
r_data2
r_data3
LD b_select
OUT b_result
LD, E-, OUT
INT
b_result := SUB_E( b_select,
32767, D100, i_data1 );
LD b_select
- K32767
D100
i_data1
LD b_select
OUT b_result
LD, -, OUT
DINT
b_result := SUB_E( b_select,
di_data1,
di_data2, di_data3 );
LD b_select
D- di_data1
di_data2
di_data3
LD b_select
OUT b_result
LD, D-, OUT
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: ......