11 - 34 11 - 34
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
COS
Function
COS
• Returns a cosine value of the trigonometric function
COS ( <arithmetic expression> )
Syntax
arithmetic expression
• • • •
Specify a numeric value in radian.
Examples
A=COS(3.14159/180 60)
• • • •
Converts 60° angle to radian, calculates its cosine
value, and stores in A.
Description
• The COS function returns a cosine when the <arithmetic expression> value is given in
radian ((
π
/180) x angle).
• <arithmetic expression> can be any numeric value type, but the COS function always
calculates in single precision.
Program Example
10 ' Calculates cos 60°C
20 A=(3.141592653#*60)/180
:
' Converts 60°C to radian
30 B=COS(A)
:
' Calculates cos
40 PRINT "60°C =";A;"radian"
50 PRINT "cos 60°C =";B
RUN
60°C
= 1.0472 radian
cos 60°C
= .5
OK
REMARK
See the ATN, 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...