20.4
Division
DIV(_E)
These functions output the quotient of input values ((s1) (s2)).
Ladder diagram, FBD/LD
[Without EN/ENO]
s1
d
s2
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s1(IN1)
Dividend
s2(IN2)
Divisor
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d(DIV(_E))
Output
Processing details
■Operation processing
• These functions divide the INT, DINT, or REAL type data input to (s1) and (s2) ((s1) (s2)), and output the operation result
from (d) in the same data type as (s).
Ex.
Data type is INT
(s1)
(s2)
5
2
INT
INT
• A value input to (s1) and (s2) is the INT, DINT, or REAL type data value. (However, input other than 0 to (s2).)
• When the operation result is 0, the zero flag (SM8020) turns on. When the operation result exceeds "32767" (16-bit
operation) or "2147483647" (32-bit operation), the carry flag (SM8022) turns on.
[With EN/ENO]
EN
ENO
s1
d
s2
(d)
(Quotient)
2
INT
Structured text
[Without EN/ENO]
d:=DIV(s1,s2);
[With EN/ENO]
d:=DIV_E(EN,ENO,s1,s2);
Type
Input variable
Input variable
Input variable
Output variable
Output variable
(Remainder)
1
Not output
20 ARITHMETIC OPERATION FUNCTIONS
20
Data type
BOOL
ANY_NUM
ANY_NUM
BOOL
ANY_NUM
993
20.4 Division