Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 492

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Note The result is expressed as a floating-point value, so it has 7 significant digits. The eighth and higher digits
are eliminated.
To represent the floating-point values, the rightmost seven digits are used for the mantissa and the
leftmost digit is used for the exponent, as shown in the diagram below. The leftmost digit can range from
0 to F; positive exponents range from 0 to 7 and negative exponents range from 8 to F (0 to -7). The
rightmost 7 digits must be BCD.
First word
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
1
0
1
0
0
0
0
exponent (0 to 7)
sign of exponent
Two more examples of floating-point values are:
6123 4567: 0.1234567
B123 4567: 0.1234567
The following table shows the maximum and minimum values allowed.
Maximum value
Minimum value
(Divisor and dividend)
Minimum value
(Result)
Sample program
When CIO 0 is ON in the following example, FDIV(079) divides the floating-point number in D101 and
D100 by the floating-point number in CIO 21 and CIO 20 and writes the result to D301 and D300.
0.00
CS/CJ/NSJ Series Instructions Reference Manual (W474)
1
0
0
0
1
0
0
0
mantissa (leftmost 3 digits)
0: +
1: –
6
10
(6 = 0110 binary)
-3
10
(B = 1011 binary)
Limit
7999 9999
F000 0001
F100 0000
D100
D20
D300
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
1
0
0
0
1
0
0
mantissa (rightmost 4 digits)
=
8-digit hexadecimal
D101
D100
A
5
6
7
0
0
0
0
CIO 21
CIO 20
B
1
2
3
4
5
6
7
D301
D300
2
4
5
9
2
7
0
3
3. Instructions
Second word
0
1
0
0
0
1
0
0
–2
0.1111113 x 10
Floating-point
7
0.9999999
10
-7
0.0000001
10
-7
0.1000000
10
–2
0.5670000 10
–3
0.1234567
10
2
0.4592703 10
1
1
3
455

Advertisement

Table of Contents
loading

Table of Contents