5 Categories & Use of Application Instructions
DVP-PLC Application Manual
5-13
( )
M
B
E
S
.
1
2
1
×
×
−
−
, in which B = 127
Therefore, the range for the 32-bit floating point is ±2
-126
~
±2
+128
, i.e. ±1.1755 × 10
-38
~
±3.4028 × 10
+38
Example 1: Representing "23" in 32-bit floating point
Step 1: Convert “23” into a binary value: 23.0 = 10111
Step 2: Normalize the binary value: 10111 = 1.0111 × 2
4
, in which 0111 is mantissa and 4 is exponent
Step 3: Obtain the exponent:
∵
E – B = 4
Æ
E – 127 = 4
∴
E = 131 = 10000011
2
Step 4: Combine the sign bit, exponent and mantissa into a floating point
0 100
0001
1 011
1000
0000
0000
0000
0000
2
= 41B80000
16
Example 2: Representing “-23.0” in 32-bit floating point
The steps required are the same as those in Example 1. The only difference is you have to alter the sign bit into “1”.
DVP-PLC uses registers of 2 continuous No. to combine into a 32-bit floating point. For example, we use registers
(D1, D0) for storing a binary floating point as below:
S
E7
E6
E5
E1
E0 A22 A21 A20
A6
A5
A4
A3
A2
A1
A0
b0
b1
b2
b3
b4
b5
b6
b20
b21
b22
b23
b24
b28
b29
b30
b31
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
7
6
5
1
0
-1
-2
-3
-17
-18
-19
-20
-21
-22
-23
D1(b15~b0)
D0(b15~b0)
8 bits of exponent
23 bits of mantissa
Sign bit (0: positive 1: negative)
When b0~b31 is 0, the content is 0.
Hidden decimal point
Decimal Floating Point
Since the binary floating point are not very user-friendly, we can convert it into a decimal floating point for use.
Please be noted that the decimal point operation in DVP-PLC is still in binary floating point.
The decimal floating point is represented by 2 continuous registers. The register of smaller No. is for the constant
while the register of bigger No. is for the exponent.
Example: Storing a decimal floating point in registers (D1, D0)
Decimal floating point = [constant D0]
× 10
[exponent D1 ]
Constant D0 =
±1,000 ~ ±9,999
Exponent D1 = -41 ~ +35
The constant 100 does not exist in D0 due to 100 is represented as 1,000 × 10
-1
. The range of decimal floating point
is ±1175 × 10
-41
~ ±3402×10
+35
.
Содержание DVP-PLC
Страница 1: ...PLC PLC...
Страница 28: ...1 Basic Principles of PLC Ladder Diagram DVP PLC Application Manual 1 24 MEMO...
Страница 192: ...4 Step Ladder Instructions DVP PLC Application Manual 4 22 MEMO...
Страница 250: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 38 X0 DIV D0 D10 D20 D0 D10 K4Y0 DIV...
Страница 270: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 58 RST M0 X0 RST T0 RST Y0 FMOV K0 D10 K5...
Страница 337: ...7 Application Instructions API 50 99 DVP PLC APPLICATION MANUAL 7 53 X10 STMR T10 K50 Y0 Y3 X10 Y1 Y2 5 sec 5 sec...
Страница 458: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 56 or relay itself See 2 3 for more information...
Страница 472: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 70 MEMO...
Страница 574: ...9 Application Instructions API 150 199 DVP PLC Application Manual 9 102 MEMO...