Omron FQM1-MMP21, FQM1-CM001 Data Formats, Programming, Appendix A, Note Signed Binary Data

Models: FQM1-MMP21 FQM1-MMA21 FQM1-CM001

1 414
Download 414 pages 44.52 Kb
Page 299
Image 299
Data Formats

Programming

Appendix A

Data Formats

The following table shows the data formats that the FQM1 can handle.

Data type

 

 

 

 

 

 

 

 

 

 

 

 

 

Data format

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Decimal

4-digit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

hexadecimal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unsigned

 

 

15

14

 

13

12

11

10

 

9

 

8

 

7

6

5

4

3

2

1

 

 

0

0 to

0000 to FFFF

binary

 

 

 

 

 

 

 

 

65535

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Binary

215

214

 

213

212

211 210

 

29

 

28

 

27

26

25

24

23

22

21

 

 

20

 

 

 

Decimal

3276816384 8192 4096 2048

1024

 

512

 

256

128

64

32

16

8

4

2

 

 

1

 

 

 

Hex

23

22

 

21

20

23

22

 

21

20

 

23

22

21

20

23

22

21

 

 

20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Signed

 

 

15

14

 

13

12

11

10

 

9

 

8

 

7

6

5

4

3

2

1

 

 

0

0 to

8000 to 7FFF

binary

 

 

 

 

 

 

 

 

–32768

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 to

 

 

Binary

215

214

 

213

212

211 210

 

29

 

28

 

27

26

25

24

23

22

21

 

 

20

+32767

 

 

Decimal

3276816384 8192 4096 2048

1024

 

512

 

256

128

64

32

16

8

4

2

 

 

1

 

 

 

Hex

23

22

 

21

20

23

22

 

21

20

 

23

22

21

20

23

22

21

 

 

20

 

 

 

 

 

 

 

 

 

Sign bit: 0: Positive, 1: Negative

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BCD

 

 

15

14

 

13

12

11

10

 

9

 

8

 

7

6

5

4

3

2

1

 

 

0

0 to 9999 0000 to 9999

(binary

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

coded dec-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

imal)

Binary

23

22

 

21

20

23

22

 

21

 

20

 

23

22

21

20

23

22

21

 

 

20

 

 

 

Decimal

 

 

 

 

0 to 9

 

 

 

 

0 to 9

 

 

 

 

0 to 9

 

 

 

 

0 to 9

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Single-pre-

31

30

29

 

 

23

22

21

20

19

18

17

 

 

3

2

1

0

 

 

 

---

---

cision

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

floating-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

point deci-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

mal

Sign of

 

 

 

 

Exponent

 

 

 

 

 

 

 

 

 

Mantissa

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Binary

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

mantissa

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Value = (1)Sign x 1.[Mantissa] x 2Exponent

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sign (bit 31)

 

1: negative or 0: positive

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mantissa

 

 

The 23 bits from bit 00 to bit 22 contain the mantissa,

 

 

 

 

 

 

 

 

 

 

 

 

 

i.e., the portion below the decimal point in 1.@@@.....,

 

 

 

 

 

 

 

 

 

 

 

 

 

in binary.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Exponent

 

 

The 8 bits from bit 23 to bit 30 contain the exponent.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The exponent is expressed in binary as 127 plus n in

 

 

 

 

 

 

 

 

 

 

 

 

 

2n.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note This format conforms to IEEE754 standards for single-precision floating- point data and is used only with instructions that convert or calculate floating-point data. It can be used to set or monitor from the I/O memory Edit and Monitor Screen on the CX-Programmer. As such, users do not need to know this format although they do need to know that the formatting takes up two words.

Note Signed Binary Data

In signed binary data, the leftmost bit indicates the sign of binary 16-bit data. The value is expressed in 4-digit hexadecimal.

Positive Numbers: A value is positive or 0 if the leftmost bit is 0 (OFF). In 4-digit hexadecimal, this is expressed as 0000 to 7FFF hex.

276

Page 299
Image 299
Omron FQM1-MMP21, FQM1-CM001, FQM1-MMA21 operation manual Data Formats, Programming, Appendix A, Note Signed Binary Data