Cos ( Returns A Cosine Value ) - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
COS
Function
• Returns a cosine value of the trigonometric function
COS ( <arithmetic expression> )
Syntax
arithmetic expression
A=COS(3.14159/180 60)
Examples
• The COS function returns a cosine when the <arithmetic expression> value is given in
Description
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
30 B=COS(A)
40 PRINT "60°C
50 PRINT "cos 60°C =";B
RUN
60°C
= 1.0472 radian
cos 60°C
= .5
OK
11 - 34
COS
• • • •
• • • •
=";A;"radian"
REMARK
See the ATN, SIN and TAN functions.
Specify a numeric value in radian.
Converts 60° angle to radian, calculates its cosine
value, and stores in A.
:
' Converts 60°C to radian
:
' Calculates cos
MELSEC-Q
11 - 34

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents