EasyManua.ls Logo

Delta DVP-20PM

Delta DVP-20PM
580 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5 Applied Instructions and Basic Usage
A 32-bit floating-point value is in the range of ±2
-126
to ±2
+128
, that is, a 32-bit floating-point value is in the
range of ±1.1755×10
-38
to ±3.4028×10
+38
.
Example 1: 23 is represented by a 32-bit floating-point value.
Step 1: Converting 23 into a binary value: 23.0=10111
Step 2: Normalizing the binary value: 10111=1.0111×24 (0111 is a mantissa, and 4 is an exponent)
Step 3: Getting the exponent which is stored
E-B=4 E-127=4 E=131=10000011
2
Step 4: Combining the sign bit, the exponent, and the mantissa to form a floating-point value.
0 10000011 01110000000000000000000
2
=41B80000
16
Example 2: -23.0 is represented by a 32-bit floating-point value.
-23.0 is converted in the same way as 23.0. Users only need to change the sign bit to 1.
A DVP-20PM series motion controller uses two consecutive registers to form a 32-bit floating-point values.
Take (D1, D0) in which a bianry floating-point value is stored for instance.
S E7 E6 E5 E1 E0 A22 A21 A20 A6 A5 A4 A3 A2 A1 A0
b0b1b2b3b4b5b6b20b21b22b23b24b28b29b30b31
222 22222 2222 222
D1(b15~b0) D0(b15~b0)
Exponent
(8 bits; signed number)
Mantissa (23 bits)
Mantissa sign bit (0: Positive number; 1: Negative number)
When the value of b0~b31 is 0, the value of b31 is 0.
Position where a decimal point is hidden
Decimal floating-point value
Since binary floating-point values are not widely accepted by people, they can be converted into
decimal floating-point values. However, the decimals on which operations are performed in a
DVP-20PM series motion controller are still binary floating-point values.
A decimal floating-point value is stored in two consecutive registers. The constant part is stored in the
register whose device number is smaller, and the exponent part is stored in the register whose device
number is bigger.
Take (D1, D0) for instance.
10
Decimal floating-point number=[Constant ]*
D0
[Exponent ]
D1
Base: D0=±1,000~±9,999
Exponent: D1=-41~+35
Besides, the base 100 does not exist in D0 because 100 is represented by 1,000×10
-1
. A decimal
floating-point value is in the range of ±1,175×10
-41
to ±3,402×10
+35
.
If the instruction ADD/SUB/MUL/DIV is used in the main program O100~M102, the operation result
gotten will affect the states of M1968~M1970. If a floating-point operation instruction is used, the result
gotten will also affect the state of the zero flag M1968, the state of the borrow flag M1969, and the state
of the carry flag M1970.
Zero flag: If the operation result gotten is 0, M1968 will be ON.
Carry flag: If the absolute value of the operaiton result gotten is greater than the maximum value
allowed, M1969 will be ON.
Borrow flag: If the absolute value of the operation result gotten is less than the minimum value
allowed, M1970 will be ON.
DVP-20PM Application Manual
5-9

Table of Contents

Other manuals for Delta DVP-20PM

Related product manuals