Chapter 5: Standard RLL Instructions - Transcendental Functions
Arc Cosine Real (ACOSR)
1
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
2
IEEE 32-bit format.
Arc Tangent Real (ATANR)
3
The Arc Tangent Real instruction takes the inverse tangent of
the real number stored in the accumulator. The result resides in
4
the accumulator. Both the original number and the result are in
IEEE 32-bit format.
5
Square Root Real (SQRTR)
The Square Root Real instruction takes the square root of the
6
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.
7
NOTE: The square root function can be useful in several situations. However, if you are trying to do the
8
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.
9
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
DS
Used
in radians, so we must convert the degrees to radians by using the RADR command. After
10
HPP
N/A
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
11
Double to move it.
12
13
14
A
B
C
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
D
format. You must use DirectSOFT for entering real numbers, using the LDR (Load Real) instruction.
5–122
DL205 User Manual, 4th Edition, Rev. B
DirectSOFT
X1
LDR
R45
RADR
SINR
OUTD
V2000
Load the real number 45
into the accumulator.
Convert the degrees into
radians, leaving the result
in the accumulato r.
Take the sine of the number
in the accumulato r, which
is in radians.
Copy the valus in the
accumulator to V2000
and V2001.
ACOSR
ATANR
SQRTR
Accumulator contents
(viewed as real number)
45.000000
0.7358981
0.7071067
0.7071067
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?