DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-63
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Load Real Number (LDR)
The Load Real Number instruction loads a real number
contained in two consecutive V-memory locations, or an 8-digit
constant into the accumulator.
Operand Data Type DL06 Range
A
aaa
V-memory V See memory map
Pointer P See memory map
Real Constant R -3.402823E
+38
to + -3.402823E
+38
V1400
LDR
Discrete Bit Flags Description
SP70 On anytime the value in the accumulator is negative.
SP76 On when any instruction loads a value of zero into the accumulator.
DS Used
HPP
N/A
DirectSOFT allows you to enter real numbers directly, by using
the leading “R” to indicate a real number entry. You can enter a
constant such as Pi, shown in the example to the right. To enter
negative numbers, use a minus (–) after the “R”.
For very large numbers or very small numbers, you can use
exponential notation. The number to the right is 5.3 million. The
OUTD instruction stores it in V1400 and V1401.
These real numbers are in the IEEE 32-bit floating point format,
so they occupy two V-memory locations, regardless of how big or
small the number may be! If you view a stored real number in hex,
binary, or even BCD, the number shown will be very difficult to
decipher. Just like all other number types, you must keep track of
real number locations in memory, so they can be read with the
proper instructions later.
The previous example above stored a real number in V1400 and
V1401. Suppose that now we want to retrieve that number. Just
use the Load Real with the V data type, as shown to the right.
Next we could perform real math on it, or convert it to a binary
number.