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
230
number of decimal points (K0-K8).
240
For example, BCDTORD K12345678 with
250-1
an implied number of decimal points equal to
K5, would yield R123.45678
260
DS5 Used
BCDTORD Parameters
N/A
HPP
• 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
Value (DWORD BCD) . . . . . . . . . . . . . . . . . V,P,K
Number of Decimal Points . . . . . . . . . . . . . . . K
Result (DWORD REAL) . . . . . . . . . . . . . . . . . . . V
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
store 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.
Chapter 5: Intelligent Box (IBox) Instructions
Parameter
DL205 User Manual, 4th Edition, Rev. B
DL205 Range
K0-99999999; See DL205 V-memory map - Data Words
K0-8
See DL205 V-memory map - Data Words
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–257
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?