DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-257
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Double BCD to Real with Implied Decimal Point (BCDTORD) (IB-562)
Double BCD to Real with Implied Decimal Point converts the given 8 digit DWORD BCD
value to a Real number, given an implied number of decimal points (K0-K8).
For example, BCDTORD K12345678 with an implied number of decimal points equal to K5,
would yield R123.45678
BCDTORD Parameters
• Value (DWORD BCD): specifies the Dword or constant that will be converted to a Real number
• Number of Decimal Points: specifies the number of implied decimal points in the Result DWORD
• Result (DWORD REAL): specifies the location where the Real number will be placed
BCDTORD Example
In the following example, the BCDTORD instruction is used to convert the 32-bit data in
V2000 from an 8-digit BCD data format to a 32-bit REAL (floating point) data format and
stored into V3000 and V3001 when C100 turns on.
K2 in the Number of Decimal Points implies the data will have two digits to the right of the
decimal point.
Parameter
DL06 Range
Value (DWORD BCD)
V,P,K
K0-99999999; See DL06 V-memory map - Data Words
Number of Decimal Points
K
K0-8
Result (DWORD REAL)
V
See DL06 V-memory map - Data Words
DS
Used
HPP
N/A