6 - 34 6 - 34
6 IEC FUNCTIONS
6.5.4 Division DIV_E
Division is performed between the specified data.
Function definition
BOOL DIV_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
Dividend
data
S2 IN
Divisor
data
D1
OUT
Division 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 := DIV_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 := DIV_E( b_select,
D10, D20, D30 );
LD b_select
/ D10
D20
D10238
MOV D10238
D30
LD b_select
OUT b_result
LD, /, MOV, OUT
DINT
b_result := DIV_E( b_select,
di_data1,
di_data2, di_data3 );
LD b_select
D/ di_data1
di_data2
D10236
DMOV D10236
di_data3
LD b_select
OUT b_result
LD, D/, DMOV,
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: ......