
12-13
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
12.11 Establishing the Trigonometrical Functions of Angles as
Floating-Point Numbers
With the following instructions, you can establish the trigonometrical
functions of angles represented as 32-bit IEEE floating-point numbers.
Instruction Explanation
SIN Establish the sine of an angle given in the radian measure.
ASIN Establish the arc sine of a floating-point number. The result is an angle
that is given in the radian measure. The value lies within the following
range:
/ 2 v arc sine v + / 2, where = 3.14.
COS Establish the cosine of a floating-point number from an angle given in
the radian measure.
ACOS Establish the arc cosine of a floating-point number. The result is an
angle that is given in the radian measure. The value lies within the
following range:
0 v arc cosinev + , where = 3.14...
TAN Establish the tangent of a floating-point number from an angle given in
the radian measure.
ATAN Establish the arc tangent of a floating-point number. The result is an
angle that is given in the radian measure. The value lies within the
following range:
/ 2 v arc tangent v + / 2, where = 3.14...
You can find information on the effects that the instructions SIN, ASIN,
COS, ACOS, TAN and ATAN have on the status bits CC 1, CC 0, OV and
OS in Section 12.6.
Tables 12-12 to 12-17 show the boxes SIN, ASIN, COS, ACOS, TAN and
ATAN and describe the parameters.
Table 12-12 Box SIN and Parameters
LAD Box Parameter Data
Type
Memory
Area
Description
EN BOOL I, Q, M, D, L Enable input
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN OUT
IN REAL I, Q, M, D, L Number
OUT REAL I, Q, M, D, L Sine of the
number
Description
Parameters
Floating-Point Math Instructions
Kommentare zu diesen Handbüchern