11 - 391 11 - 391
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
TAN
Function
TANgent
• Returns the trigonometric tangent function of a value.
TAN(<numeric expression>)
Syntax
numeric expression
• • • •
Specify the value or the numeric variable in radians.
Examples
A=TAN(3.14159/180 45)
• • • •
Converts the angle of 45( to radians, calculates the
tangent value, and assigns it to A.
Description
• The TAN function returns the tangent function value of <numeric expression>, which must
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)
π
)/2
n=0, 1, 2, 3 • • •
π
=3.1415926
Program Example
10 ' This program returns tan 45°
20 A=(3.141592653#*45)/180
:
' Converts 45° to radian
30 B=TAN(A)
:
'Obtains tan 45°
40 PRINT "45°=";A;"radians"
50 PRINT "tan 45°=";B
60 END
RUN
45°=.785398 radians
tan 45° = 1
OK
REMARK
See the SIN and COS 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...