EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 502

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
469
Special Math Instructions Section 3-13
Floating-point Division of Two BCD Numbers
In this example, the 4-digit BCD number in D0 is divided by the 4-digit BCD
number in D1 and the floating-point result is written to D2 and D3.
To perform the floating point division, the BCD value in D0 is converted to
floating-point format in D2001 and D2000 and the BCD value in D1 is con-
verted to floating-point format in D2003 and D2002.
1
2
3
4
@MOV
@MOV
@MOV
@MOV
@MOVD
@MOVD
@MOVD
@MOVD
@FDIV
0.00
#0
D2000
#0
D2002
D2001
D2003
#21
D2001
D0
#300
D1
#21
D2003
#300
D2002
D2000
D2002
D2
D0
D1
D2000

Table of Contents

Related product manuals