Omron FQM1-CM001 Home Security System User Manual


 
276
Programming Appendix A
Data Formats
The following table shows the data formats that the FQM1 can handle.
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.
Data type Data format Decimal 4-digit
hexadecimal
Unsigned
binary
0 to
65535
0000 to FFFF
Signed
binary
0 to
–32768
0 to
+32767
8000 to 7FFF
BCD
(binary
coded dec-
imal)
0 to 9999 0000 to 9999
Single-pre-
cision
floating-
point deci-
mal
--- ---
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2
15
2
14
2
13
2
12
2
11
2
10
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
3276816384 81924096 2048 1024 512 256 128 64 32 16 8 4 2
1
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
Decimal
Hex
Binary
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2
15
2
14
2
13
2
12
2
11
2
10
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
3276816384 81924096 2048 1024 512 256 128 64 32 16 8 4 2
1
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
Sign bit: 0: Positive, 1: Negative
Binary
Decimal
Hex
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
Decimal
0 to 9 0 to 9 0 to 9 0 to 9
Binary
31 30 29 23 22 21 20 19 18 17 3 2 1 0
Sign of
mantissa
Exponent
Mantissa
x 1.[Mantissa] x 2
Exponent
Sign (bit 31)
Mantissa
Exponent
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.
1: negative or 0: positive
The 23 bits from bit 00 to bit 22 contain the mantissa,
i.e., the portion below the decimal point in 1.@@@.....,
in binary.
The 8 bits from bit 23 to bit 30 contain the exponent.
The exponent is expressed in binary as 127 plus n in
2
n
.
Value = (1)
Sign
Binary