beautypg.com

2 instructions, Converting to ascii text in scientific notation – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 284

background image

2 Instructions

2-248

CP1E CPU Unit Instructions Reference Manual(W483)

Converting to ASCII Text in Scientific Notation

When CIO 0.00 is ON in the following example, FSTR(448) converts the floating-point data in D1 and
D0 to scientific-notation ASCII text and writes the ASCII text to the destination words beginning with
D100. The contents of the control words (D10 to D12) specify the details on the data format (scientific
notation, 11 characters total, 3 fractional digits).

20(Space)

2E(.)

37(7)

45(E)

30(0)

00

1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0
0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1

0.00

15

0

D0

D1

0001(Hex)

000B(Hex)

0003(Hex)

D10

D11

D12

0.327457

20(Space)

33(3)
32(2)
35(5)
2D(-)
31(1)

D100
D101
D102
D103
D104
D105

3 . 2 7 4 5 7 E - 0 1

FSTR

D0

D10

D100

Conversion

Storage
conditions

Scientific notation
Total characters = 11 characters
Fractional digits = 3 digits (characters)

Total number of characters

Spaces Fractional part

Rounded off

This manual is related to the following products: