What’s next – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 109

Advertising
background image

Chapter
Data Types

8

8 -9

Floating Point

The PLC-5 floating point number is a 7-digit binary floating point number
(IEEE Float 32- bit value). The values range from:

±

1.1754944E

–38

to

±

3.4028237E

+38

The BASIC module floating point number us an 8-digit BCD floating
point number. The range of the BASIC module floating point number is:

±

1E

–127

to

±

.99999999E

+127

The BASIC module has a floating point range larger than the floating point
range of the PLC-5 processor. If CALL 88 attempts to convert a number
larger than

±

3.4028237E

+38

, the converted number is a assigned a value of

±

3.4028237E

+38

. If CALL 88 attempts to convert a number smaller than

±

1.1754944E

–38

, the converted number is assigned a value of

±

1.1754944E

–38

.

PLC-5 floating point numbers are stored in 2 words of the BTR or BTW
buffer. See CALLs 88 and 89 (page 13 -16).

Important: Due to the fact that the PLC-5 floating point number is a
7-digit floating point number, and the BASIC module is an 8-digit floating
point number, some round off error may be introduced during number
conversions.

15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

Mantissa (23 bits)

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

sign bit (1 = negative; 0 = positive)

Exponent (8 bits)

Expressions,
Variables, and
Operators

9

What’s Next?

Advertising