Mitsubishi QD51 Programming Manual page 549

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
SIN
Function
• Returns the trigonometric sine function of a value.
SIN(<numeric expression>)
Syntax
numeric expression
A=SIN(3.14159/180*60)
Examples
• The SIN function returns the sine function value of <numeric expression>, which must be
Description
given in radians (π/180 x angle).
• <numeric expression> can be any type of value, but the SIN function always calculates the
result in single-precision.
Program Example
10 ' This program returns sin 45°
20 A=(3.141592653#*45)/180
30 B=SIN(A)
40 PRINT "45°=";A;"radians"
50 PRINT "sin 45°=";B
60 END
RUN
45°=.785398 radians
sin 45°= .707107
OK
11 - 379
SINe
• • • •
• • • •
REMARK
See the COS and TAN functions.
Specify a value or numeric variable in radians.
Converts the angle of 60( into radians, calculates the
sine value, and assigns it to A.
:
' Converts 45° to radian
:
' Obtains sin 45°
MELSEC-Q
11 - 379

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents