Atn ( Returns Arc Tangent) - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
ATN
Function
• Returns arc tangent (tan
ATN ( <arithmetic expression> )
Syntax
arithmetic expression
A=(180/3.141592)
Examples
ATN(1)
• The ATN function returns the arc tangent (tan
Description
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
30 RAD=ATN(HI)
40 DEG=(RAD*180)/3.141592653#
50 PRINT "RAD.=";RAD
60 PRINT "DEG.=";DEG
70 END
RUN
RAD.= 1.04719
DEG.= 59.9993
OK
11 - 5
TaNgent
-1
) of the arithmetic expression.
• • • •
• • • •
REMARK
See the COS, SIN and TAN functions.
Specify an arithmetic expression to calculate the arc
tangent.
Calculates the arc tangent of 1, then converts to
degrees and assigns it to A.
-1
) of the value from the <arithmetic
:
' Defines the value
:
' Calculates the angle
:
' Converts the value in radian to degrees
:
' Display
MELSEC-Q
11 - 5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents