DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-256
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
BCD to Real with Implied Decimal Point (BCDTOR) (IB-560)
BCD to Real with Implied Decimal Point converts the given 4 digit WORD BCD value to a
Real number, with the implied number of decimal points (K0-K4).
For example, BCDTOR K1234 with an implied number of decimal points equal to K1, would
yield R123.4
BCDTOR Parameters
• Value (WORD BCD): specifies the word 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
BCDTOR Example
In the following example, the BCDTOR instruction is used to convert the 16-bit data in
V2000 from a 4-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 (WORD BCD)
V,P,K
K0-9999; See DL06 V-memory map - Data Words
Number of Decimal Points
K
K0-4
Result (DWORD REAL)
V
See DL06 V-memory map - Data Words
DS
Used
HPP
N/A