SIMATIC Instructions
9-86
S7-200 Programmable Controller System Manual
A5E00066097-02
Natural Exponential
The Natural Exponential instruction performs the
exponential operation of e raised to the power of the
value in IN and places the result in OUT. The Natural
Exponential can be used in combination with the Natural
Logarithm to raise any real number to the power of
another real number, including fractional exponents. That
is, X raised to the Y power can be computed as
EXP (Y * LNX).
Examples:
5 cubed = 5^3=EXP(3*LN(5))=125
The cube root of 125=125^(1/3)= EXP(1/3)*LN(125))= 5
The square root of
5 cubed=5^(3/2)=EXP(3/2*LN(5))=11.18034 ...
Error conditions that set ENO = 0: SM1.1 (overflow),
0006 (indirect address)
This instruction affects the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative),
SM4.3 (run-time).
Inputs/Outputs Operands Data Types
IN VD, ID, QD, MD, SMD, SD, LD, AC, Constant, *VD, *AC, *LD REAL
OUT VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *AC, *LD REAL
Sine, Cosine, and Tangent
The Sine, Cosine, and Tangent instructions evaluate
the trigonometric function of the angle value IN and place
the result in OUT. The input angle value is in radians. To
convert an angle from degrees to radians, use MUL_R
(*R) to multiply the angle in degrees by 1.745329E-2
(approximately by π /180).
Error conditions that set ENO = 0: SM1.1 (overflow),
0006 (indirect address)
This instruction affects the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative),
SM4.3 (run-time).
L
A
D
S
T
L
EXP IN, OUT
EXP
EN
IN OUT
ENO
F
B
D
L
A
D
224 226
✓
222221
✓
L
A
D
S
T
L
SIN IN, OUT
COS IN, OUT
TAN IN, OUT
SIN
EN
IN OUT
ENO
F
B
D
L
A
D
224 226
✓
222
COS
EN
IN OUT
ENO
222
✓
TAN
EN
IN OUT
ENO