DL205 User Manual, 4th Edition, Rev. B
5–136
Chapter 5: Standard RLL Instructions - Number Conversion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Radian Real Conversion (RADR)
The Radian Real Conversion instruction converts the real
degree value stored in the accumulator to the equivalent real
number in radians. The result resides in the accumulator.
Degree Real Conversion (DEGR)
The Degree Real instruction converts the degree real radian
value stored in the accumulator to the equivalent real number
in degrees. The result resides in the accumulator.
The two instructions described above convert real numbers in
the accumulator from degree format to radian format, and
visa-versa. In degree format, a circle contains 360 degrees. In radian format, a circle contains
2
⌸
. These convert between both positive and negative real numbers, and for angles greater
than a full circle. These functions are very useful when combined with the transcendantal
trigonometric functions (see the section on math instructions).
NOTE:
The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
format. You must use
Direct
SOFT for entering real numbers, using the LDR (Load Real) instruction.
The following example takes the sine of 45 degrees. Since transcendental functions operate
only on real numbers, we do a LDR (Load Real) 45. The trig functions operate only in
radians, so we must convert the degrees to radians by using the RADR command. After using
the SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move the
result from the accumulator to V-memory. The result is 32-bits wide, requiring the Out
Double to move it.
RADR
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0
DEGR
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0
Discrete Bit Flags
Description
SP63
On when the result of the instruction causes the value in the accumulator to be zero.
SP70
On anytime the value in the accumulator is negative.
SP71
On anytime the V-memory specified by a pointer (P) is not valid.
SP72
On anytime the value in the accumulator is a valid floating point number.
SP74
On anytime a floating point math operation results in an underflow error.
SP75
On when a BCD instruction is executed and a NON-BCD number was encountered.
LDR
R45
X1
Load the real number 45 into
the accumulator.
RADR
Convert the degrees into radians,
leaving the result in the
accumulator.
OUTD
V2000
Copy the value in the
accumulator to V2000
and V2001.
45.000000
Accumulator contents
(viewed as real number)
0.7853982
SINR
Take the sine of the number in
the accumulator, which is in
radians.
0.7071067
0.7071067
Direct
SO
F
T
DS
Used
HPP
N/A