IDEC WindO/I-NV4 User Manual page 35

Automation organizer
Table of Contents

Advertisement

Example:
Data handling
Data type
Storing 0FFF (Hex) in LDR0
UBIN16(W)
0FFF (Hex) is handled as 4095 (Dec).
BIN16(I)
0FFF (Hex) is handled as 4095 (Dec).
Data type
Storing FFFF (Hex) in LDR0, 0FFF (Hex) in LDR1
bit
31
UBIN32(D)
00001111111111111111111111111111
0FFFFFFF (Hex) is handled as 268435455 (Dec).
bit
31
00001111111111111111111111111111
BIN32(L)
+
The sign bit is 0, so the positive number 0FFFFFFF
(Hex) is handled as 268435455 (Dec).
Data type
Storing 1234 (Hex) in LDR0
BCD4(B)
The sign is 1 (Hex), so the binary-coded decimal
value of the positive number 234 (Hex),
handled as 1234 (Dec).
Storing 5678 (Hex) in LDR0, 1234 (Hex) in
Data type
bit
31
00010010001101000101011001111000
BCD8(EB)
+
The sign is 1 (Hex), so the binary-coded decimal
value of the positive number 2345678 (Hex),
handled as 2345678 (Dec).
Data type
BFA0 (Hex)
bit
31
10111111101000000000000000000000
Float32(F)
Sign
Exponent
1
01111111
0
1
2
2
+2
+2
+2
Negative
−1.25×2
bit
bit
LDR0
15
0
0000111111111111
0FFF (Hex)
bit
bit
LDR0
15
0
0000
1111
1111
1111
+
0FFF (Hex)
bit
LDR1
LDR0
0
0FFFFFFF (Hex)
bit
LDR1
LDR0
0
0FFFFFFF (Hex)
bit
bit
LDR0
15
0
0001001000110100
+
234 (Hex)
LDR1
bit
LDR1
LDR0
0
2345678 (Hex)
Storing 0000 (Hex) in LDR0, BFA0 (Hex) in LDR1
LDR1
LDR0
0000 (Hex)
bit
bit
bit
23
22
0
Significand
01000000000000000000000
3
4
5
6
2
-2
= 0.25
+2
+2
+2
= 127
127-127
= −1.25
WindO/I-NV4 User's Manual
1 WindO/I-NV4 Specifications
Storing FFFF (Hex) in LDR0
bit
LDR0
15
1111
111111111111
FFFF (Hex)
FFFF (Hex) is handled as 65535 (Dec).
bit
LDR0
15
1111
1111
1111
FFFF (Hex)
Sign bit is 1, so FFFF (Hex) is two's complement,
handled as -1 (Dec).
Storing FFFF (Hex) in LDR0, FFFF (Hex) in LDR1
bit
LDR1
31
1111
1111111111111111111111111111
FFFFFFFF (Hex)
FFFFFFFF (Hex) is handled as 4294967295 (Dec).
bit
LDR1
31
11111111111111111111111111111111
FFFFFFFF (Hex)
Sign bit is 1, so two's complement of the negative
number FFFFFFFF (Hex), handled as -1 (Dec).
Storing F765 (Hex) in LDR0
bit
LDR0
15
1111011101100101
765 (Hex)
The sign is F (Hex), so the binary-coded decimal
value of the negative number 765 (Hex),
handled as -765 (Dec).
Storing 4321 (Hex) in LDR0, F765 (Hex) in
LDR1
bit
LDR1
31
1111
0111
0110
0101
0100
7654321 (Hex)
The sign is F (Hex), so the binary-coded decimal
value of the negative number 7654321 (Hex),
handled as -7654321 (Dec).
2
bit
0
bit
0
1111
bit
LDR0
0
bit
LDR0
0
bit
0
bit
LDR0
0
0011
0010
0001
2-3

Advertisement

Table of Contents
loading

Table of Contents