11 - 5 11 - 5
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
ATN
Function
TaNgent
• Returns arc tangent (tan
-1
) of the arithmetic expression.
ATN ( <arithmetic expression> )
Syntax
arithmetic expression
• • • •
Specify an arithmetic expression to calculate the arc
tangent.
Examples
A=(180/3.141592)
ATN(1)
• • • •
Calculates the arc tangent of 1, then converts to
degrees and assigns it to A.
Description
• The ATN function returns the arc tangent (tan
-1
) of the value from the <arithmetic
expression>.
• While <arithmetic expression> can be any value type, the ATN function always calculates
in single precision.
• Unit of the returned value is in radian.
Program Example
10 ' Calculates angle by the ATN function
20 HI=1732/1000
:
' Defines the value
30 RAD=ATN(HI)
:
' Calculates the angle
40 DEG=(RAD*180)/3.141592653#
:
' Converts the value in radian to degrees
50 PRINT "RAD.=";RAD
:
' Display
60 PRINT "DEG.=";DEG
70 END
RUN
RAD.= 1.04719
DEG.= 59.9993
OK
REMARK
See the COS, SIN and TAN functions.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...