Divide - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Chapter 5. Function Block Diagram (FBD)
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 Overflow, 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 Overflow 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
Solve Order Calculated by the FBD editor.
IN1
Dividend: the value to be divided; shown to
the left of DIV in the equation IN1 DIV IN2=Q.
IN2
Divisor: the value to divide into IN1; shown to
the right of DIV in the equation IN1 DIV
IN2=Q.
Q
The quotient of IN1/IN2. If an
occurs, the result is the largest value with the
proper sign.
260
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Allowed Types
NA
INT, DINT, UINT,
REAL, LREAL
INT, DINT, UINT,
REAL, LREAL
Overflow
INT, DINT, UINT,
REAL or LREAL
variable
Allowed Operands Optional
NA
No
All except S, SA, SB,
No
SC
All except S, SA, SB,
No
SC
All except S, SA, SB,
No
SC and constant
GFK-2950C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents