Mitsubishi MELSEC Q Series Programming Manual page 630

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

COSD(P)
Program Example
(1) The following program performs a COS operation on the angle data designated by the 4
BCD digits from X20 to X2F, and stores results as 64-bit floating decimal point type real
numbers at D0 to D3.
[Ladder Mode]
[List Mode]
Step
[Operations involved when X20 to X2F designate a value of 60]
X2F
0
BCD value
7-256
Instruction
Device
D30
1
Conversion
X20
b15
to BIN
0 6 0
60
BIN value
BIN
D13 D12
D11
1.047198
64-bit floating-point
real number
Inputs an angle used for
COS operation (
Converts the input angle into a
64-bit floating-point real number (
Converts the converted angle
into a radian value (
Executes COS operation using the
converted radian value (
2
Conversion to
D23 D22
b0
floating-point
64-bit floating-point
FLTD
real number
D10
D3 D2
SIN operation
4
64-bit floating-point
COSD
real number
).
1
).
2
).
3
).
4
D21
D20
60
Conversion to radian
3
RADD
D1
D0
0.500000

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents