EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 603

Mitsubishi Electric MELSEC-Q/L
1084 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...
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
601
7
Program example
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]
[Operations involved when X20 to X2F designate a value of 60]
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 ( ).
1
2
3
4
Step Instruction Device
64-bit floating-point
real number
X2F
BCD value
0
D30
060
X20
Conversion
to BIN
BIN
b15 b0
BIN value
Conversion to radian
RADD
SIN operation
COSD
60
Conversion to
floating-point
FLTD
D21
60
D20D23 D22
64-bit floating-point
real number
D11
1.047198
D10D13 D12
64-bit floating-point
real number
D1
0.500000
D0D3 D2
1
2
3
4

Table of Contents

Related product manuals