Subtraction - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

6 IEC FUNCTIONS

6.5.3 Subtraction

Subtraction is performed between the specified data.
Function definition
6 - 33
SUB_E
BOOL SUB_E( BOOL EN, ANY_NUM S1, ANY_NUM S2, ANY_NUM D1 );
Argument
Argument Name
IN/OUT
EN
IN
S1
IN
S2
IN
D1
OUT
Return value
Return Value
BOOL
Execution condition (bit data)
Example of use
Argument Type
REAL
b_result := SUB_E( b_select,
r_data1, r_data2, r_data3 );
INT
b_result := SUB_E( b_select,
32767, D100, i_data1 );
DINT
b_result := SUB_E( b_select,
di_data1,
di_data2, di_data3 );
Execution condition (Function is executed only when the result is TRUE)
Minuend data
Subtrahend data
Subtraction operation result
ST Program
Conversion Result
LD
E-
LD
OUT
LD
-
LD
OUT
LD
D-
LD
OUT
For the usable data type, refer to "3.2.2 About ANY type".
Description
Description
Used Instruction
b_select
LD, E-, OUT
r_data1
r_data2
r_data3
b_select
b_result
b_select
LD, -, OUT
K32767
D100
i_data1
b_select
b_result
b_select
LD, D-, OUT
di_data1
di_data2
di_data3
b_select
b_result
6 - 33

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents