DL205 User Manual, 4th Edition, Rev. B
5–122
Chapter 5: Standard RLL Instructions - Transcendental Functions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Arc Cosine Real (ACOSR)
The Arc Cosine Real instruction takes the inverse cosine of the
real number stored in the accumulator. The result resides in the
accumulator. Both the original number and the result are in
IEEE 32-bit format.
Arc Tangent Real (ATANR)
The Arc Tangent Real instruction takes the inverse tangent of
the real number stored in the accumulator. The result resides in
the accumulator. Both the original number and the result are in
IEEE 32-bit format.
Square Root Real (SQRTR)
The Square Root Real instruction takes the square root of the
real number stored in the accumulator. The result resides in the
accumulator. Both the original number and the result are in
IEEE 32-bit format.
NOTE:
The square root function can be useful in several situations. However, if you are trying to do the
square-root extract function for an orifice flow meter measurement as the PV to a PID loop, note that the
PID loop already has the square-root extract function built in.
The following example takes the
sine
of 45 degrees. Since these 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.
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.
ACOSR
ATANR
SQRTR
LDR
R45
X1
Load the real number 45
into the accumulator.
RADR
Convert the degrees into
radians, leaving the result
in the accumulato r.
OUTD
V2000
Copy the valus in the
accumulator to V2000
and V2001.
45.000000
0.7358981
SINR
Take the sine of the number
in the accumulator, which
is in radians.
0.7071067
0.7071067
Direct
SO
F
T
Accumulator contents
(
viewed as real number
)
DS
Used
HPP
N/A