Modulus - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

5.9.4

Modulus

Divides input IN1 by input IN2 and outputs the remainder of the division to Q.
All three operands must be of the same data type. The sign of the result is always
the same as the sign of input parameter IN1. Output Q is calculated using the
formula:
Q = IN1-((IN1 DIV IN2) * IN2)
where DIV produces an integer number.
The result is output to Q 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)
Operands for Modulus Function
Parameter Description
Solve Order Calculated by the FBD editor.
IN1
Dividend: the value to be divided into in
order to obtain the remainder; shown to the
left of MOD in the equation IN1 MOD IN2=Q.
IN2
Divisor: the value to divide into IN1; shown
to the right of MOD in the equation
IN1 MOD IN2=Q.
Q
The remainder of IN1/IN2.
GFK-2950C
Chapter 5. Function Block Diagram (FBD)
Allowed Types Allowed Operands
NA
INT, DINT, UINT All except S, SA, SB, SC No
INT, DINT, UINT All except S, SA, SB, SC No
INT, DINT, UINT
variable
February 2018
Optional
NA
No
All except S, SA, SB, SC
No
and constant
261

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents