Sine, Cosine, And Tangent - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

SIMATIC Instructions
Natural Exponential
L
L
A
A
EN
D
D
F
IN
B
D
S
EXP
T
L
221
222
Inputs/Outputs
IN
VD, ID, QD, MD, SMD, SD, LD, AC, Constant, *VD, *AC, *LD
OUT
VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *AC, *LD

Sine, Cosine, and Tangent

L
L
A
A
EN
D
D
F
IN
B
D
EN
IN
EN
IN
S
SIN
T
COS
L
TAN
222
222
9-86
The Natural Exponential instruction performs the
EXP
exponential operation of e raised to the power of the
ENO
value in IN and places the result in OUT. The Natural
Exponential can be used in combination with the Natural
OUT
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
IN, OUT
EXP (Y * LNX).
Examples:
224 226
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).
Operands
The Sine, Cosine, and Tangent instructions evaluate
SIN
the trigonometric function of the angle value IN and place
ENO
the result in OUT. The input angle value is in radians. To
convert an angle from degrees to radians, use MUL_R
OUT
(*R) to multiply the angle in degrees by 1.745329E-2
COS
(approximately by π /180).
ENO
Error conditions that set ENO = 0: SM1.1 (overflow),
OUT
0006 (indirect address)
TAN
ENO
This instruction affects the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative),
OUT
SM4.3 (run-time).
IN, OUT
IN, OUT
IN, OUT
224 226
S7-200 Programmable Controller System Manual
Data Types
REAL
REAL
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents