Table of Contents

Advertisement

3. Instructions

FDIV

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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents