3. Instructions
462
CS/CJ/NSJ Series Instructions Reference Manual (W474)
FDIV
Applicable Program Areas
Operands
z Operand Specifications
Flags
Function
FDIV(079) divides the floating-point value in Dd and Dd+1 by that in Dr and Dr+1 and places the result
in R and R+1.
Instruction Mnemonic Variations
Function
code
Function
FLOATING POINT DIVIDE
(BCD)
FDIV @FDIV 079
Divides one 7-digit floating-point number by
another. The floating-point numbers are
expressed in scientific notation (7-digit mantissa
and 1-digit exponent).
Symbol
FDIV
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
Dd First dividend word UDINT 2
Dr First divisor word UDINT 2
R First result word UDINT 2
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
Dd
OK OK OK OK OK OK OK OK OK OK --- --- --- OK --- --- --- ---Dr
R
Name Label Operation
Error Flag ER • ON if the mantissa (leftmost 7 digits) in Dd+1 and Dd is not BCD.
• ON if the mantissa (leftmost 7 digits) in Dr+1 and Dr is not BCD.
• ON if the divisor (Dr+1 and Dr) is 0.
• ON if the result is not between 0.1000000
× 10
-7
and 0.9999999 × 10
7
.
• OFF in all other cases.
Equals Flag = • ON if the result is 0.
• OFF in all other cases.
Dd: First dividend word
Dr: First divisor word
R: First result word
FDIV(079)
Dd
Dr
R
R+1 R
Quotient
Dr+1 Dr Dd+1 Dd