Mitsubishi QD51 Programming Manual page 561

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
TAN
Function
• Returns the trigonometric tangent function of a value.
TAN(<numeric expression>)
Syntax
numeric expression
A=TAN(3.14159/180 45)
Examples
• The TAN function returns the tangent function value of <numeric expression>, which must
Description
be given in radians (π/180 x angle).
• Numeric expression can be any type of value, but the TAN function always calculates the
result in single-precision.
• If the following values are specified in <numeric expression>, a "Division by zero" error
occurs.
((2n + 1)
Program Example
10 ' This program returns tan 45°
20 A=(3.141592653#*45)/180
30 B=TAN(A)
40 PRINT "45°=";A;"radians"
50 PRINT "tan 45°=";B
60 END
RUN
45°=.785398 radians
tan 45° = 1
OK
11 - 391
TANgent
• • • •
• • • •
π)/2
n=0, 1, 2, 3 • • •
π =3.1415926
REMARK
See the SIN and COS functions.
Specify the value or the numeric variable in radians.
Converts the angle of 45( to radians, calculates the
tangent value, and assigns it to A.
:
' Converts 45° to radian
:
'Obtains tan 45°
MELSEC-Q
11 - 391

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents