EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 615

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
613
7
Program example
The following program seeks the inverse cosine of the 64-bit floating decimal point real number at D0 to D3, and outputs
the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when the D0 to D3 value is 0.5]
Calculates an angle (radian value) by COS
operation ( ).
Converts the radian value into an angle ( ).
Converts the angle in 64-bit floating-point
real number into an integer ( ).
Outputs the integer-converted angle to a
display device ( ).
1
1
2
3
4
Step Instruction Device
64-bit floating-point
real number
D1
0.5
D0D3 D2
64-bit floating-point
real number
D21
60
D20D23 D22
64-bit floating-point
real number
D11
1.047198
D10D13 D12
Conversion
to BIN
INTD
BCD operation
BCD
ACOSD
Conversion to angle
DEGD
Y4F
BCD value
0
060
Y40
D30
b15 b0
BIN value
60
COS operation
1
1
2
3
4

Table of Contents

Related product manuals