2-167
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
DIV (/)
The functions of the DIV instruction and the / instruction are exactly the same. Use the form that is eas-
ier to use.
When you calculate real numbers, use the CheckReal instruction (page 2-209) to see if Out is positive
infinity, negative infinity, or nonnumeric data.
• Set the data type of Out to include the valid ranges of In1 and In2.
• If In1, In2, and Out are integers, make sure the division result will fit in the valid range of Out. Other-
wise, the value of Out will be an illegal value. An error will not occur.
• The results for underflows in division are different for ladder diagrams and ST. In a ladder diagram,
the calculation is performed within the range of the data type of the input variables. In ST, the preci-
sion of the numbers is increased to perform the calculation.
• Division results of positive infinity, negative infinity, or 0 are handled as follows for real number values.
• If the value of either In1 or In2 is nonnumeric data, the value of Out is nonnumeric data.
• An error occurs in the following case. ENO will be FALSE, and Out will not change.
• In1, In2, and Out are integers and the value of In2 is 0.
Additional Information
Precautions for Correct Use
In1
+∞
Positive
number
0
Negative
number
−∞
In2
+∞
Nonnu-
meric data
000Nonnu-
meric data
Positive
number
+∞
Positive
number
0 Negative
number
−∞
0
+∞ +∞
Nonnu-
meric data
−∞ −∞
Negative
number
−∞
Negative
number
0 Positive
number
+∞
−∞
Nonnu-
meric data
000Nonnu-
meric data