EasyManua.ls Logo

Mitsubishi MELSEC-Q/L

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
504
COSD, COSDP
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 32-bit floating decimal point type real numbers at D0 and D1.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X2F designate a value of 60]
: Angle data of which the COS (cosine) value is obtained or head number of the devices where the angle data is stored (real number)
: Head number of the devices where the operation result will be stored (real number)
7.12.4 COSD, COSDP CO S operation on f loating-point d ata (Double prec ision)
7.12.4
COSD, COSDP
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
E
Other
Bit Word Bit Word
–– –– ––
–– –– –– ––
Inputs an angle used for COS
operation ( ).
Converts the input angle into
a 32-bit floating-point real
number ( ).
Converts the converted angle into
a radian value ( ).
Executes COS operation
using the converted radian value ( ).
1
2
3
4
Step Instruction Device
Conversion to radian
32-bit floating-point
real number
D21
D20
RAD
COS operation
32-bit floating-point
real number
D11
D10
COS
32-bit floating-point
real number
D1
D0
X2F
BCD value
0
D30
060
X20
Conversion to BIN
BIN
b15
b0
BIN value
Conversion to floating-point
FLT
60
60
1
.
047
1
98 0
.
500000
Universal
LCPU
Basic
High
performance
Process
Redundant
Command
Command
COSDP
COSD
COSDP
COSD S D
S D
S
D
S
D

Table of Contents

Related product manuals