Chapter 5. Function Block Diagram (FBD)
260
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
5.9.3
Divide
Divides the operand IN1 by the operand IN2 of the same data type as IN1 and stores
the quotient in the output variable assigned to Q, also of the same data type as IN1
and IN2.
The result is output to Q when DIV is performed without
, unless one of the
following invalid conditions occurs:
▪
0 divided by 0 (Results in an application fault.)
▪
IN1 and/or IN2 is NaN (Not a Number).
If an
occurs, the result wraps around.
Notes:
▪
DIV rounds down; it does not round to the closest integer. For example, 24 DIV 5 = 4.
▪
Be careful to avoid overflows.
Operands for DIV_UINT, DIV_INT, DIV_DINT, and DIV_REAL
Parameter Description
Allowed Types Allowed Operands Optional
Solve Order Calculated by the FBD editor.
NA
NA
No
IN1
Dividend: the value to be divided; shown to
the left of
DIV
in the equation IN1 DIV IN2=Q.
INT, DINT, UINT,
REAL, LREAL
All except S, SA, SB,
SC
No
IN2
Divisor: the value to divide into IN1; shown to
the right of
DIV
in the equation IN1 DIV
IN2=Q.
INT, DINT, UINT,
REAL, LREAL
All except S, SA, SB,
SC
No
Q
The quotient of IN1/IN2. If an
occurs, the result is the largest value with the
proper sign.
INT, DINT, UINT,
REAL or LREAL
variable
All except S, SA, SB,
SC and constant
No
Summary of Contents for PACSystems RX7i
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...