Automationdirect.com DirectLOGIC DL205 Series User Manual page 281

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
$
STR
1
SHFT
2
SHFT
GX
OUT
3
SHFT
SHFT
4
SHFT
5
SHFT
SHFT
6
Load Real Number (LDR)
The Load Real Number instruction loads a real number
7
230
contained in two consecutive V-memory locations, or an 8-
240
digit constant into the accumulator.
8
250-1
260
9
V-memory
DS
Used
Pointer
HPP
N/A
10
Real Constants
11
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
12
the example to the right. To enter negative numbers,
use a minus (–) after the "R".
13
For very large numbers or very small numbers, you can
use exponential notation. The number to the right is
14
5.3 million. The OUTD instruction stores it in V1400
and V1401.
A
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.
B
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.
C
The previous example above stored a real number in V1400
and V1401. Suppose that now we want to retrieve that
D
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.
5–64
DL205 User Manual, 4th Edition, Rev. B
B
ENT
1
L
D
SHFT
ANDST
3
L
D
S
X
ANDST
3
RST
SET
V
C
SHFT
AND
2
E
N
D
ENT
4
TMR
3
D
L
B
L
3
ANDST
1
ANDST
N
C
O
N
TMR
2
INST#
TMR
N
C
O
N
TMR
2
INST#
TMR
N
C
O
N
TMR
2
INST#
TMR
Operand Data Type
Handheld Programmer Keystrokes
K
B
ENT
JMP
1
C
ENT
2
A
A
A
ENT
0
0
0
C
ENT
2
D
D
D
3
3
3
C
D
C
2
3
2
E
F
E
4
5
4
DL250-1 Range
A
aaa
V
All. See memory map
P All V-memory. See memory map All V-memory. See memory map
-3.402823E+038 to
R
+3.402823E+038
D
ENT
3
D
ENT
3
J
ENT
9
LDR
A aaa
DL260 Range
aaa
All. See memory map
-3.402823E+038 to
+3.402823E+038
LDR
R3.14159
LDR
R5.3E6
OUTD
V1400
LDR
V1400

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Table of Contents

Save PDF