Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
/
In1
In2
Processing for Overflows
An overflow occurs if the quotient of In1 and In2 exceeds the valid range of the data type of the division
result. If an overflow occurs, the data types of In1 and In2, the data type of the division result, and the
value of the division result will be as shown in the following table.
Data types of In1 and In2
At least one real number
* If the quotient of In1 and In2 is positive, the division result will be positive infinity. If the quotient is negative, the
division result will be negative infinity.
Notation Examples
The following example is for when In1 is INT#100 and In2 is INT#5. The value of INT variable abc will
be INT#20.
LD
EN
In1
INT#100
In2
INT#5
The DIV instruction divides In1 by InN.
The calculation is 100/5 = 20, so the value of abc will be INT#20.
In1
INT#100
/ In2
2-190
Data type that includes In1 and In2
Examples:
If division is performed for INT data, then
INT data is used.
If division is performed for INT and DINT
data, then DINT data is used.
If In1 and In2 are integers and there is a
remainder, the remainder is truncated.
Division result
Assignment
=
Out
Data type of divi-
sion result
Real number data
ST
abc:=INT#100/INT#5;
DIV
ENO
abc
Divided.
Out=abc
INT#5
Value of division
result
±∞*
INT#20

NY-series Instructions Reference Manual (W560)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents