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...
514
ACOSD, ACOSDP
Program Example
(1) The following program seeks the inverse cosine of the 32-bit floating decimal point real number at D0 and D1, and
outputs the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when the D0 and D1 value is 0.5]
: COS value of which the COS
-1
(inverse cosine) value is obtained or head number of the devices where the COS value is stored (real number)
: Head number of the devices where the operation result will be stored (real number)
7.12.10 ACOSD , ACOSDP Arc cosine ope ration on floa ting-point data (Do uble
precision)
7.12.10
ACOSD, ACOSDP
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
E
Other
Bit Word Bit Word
–– –– ––
–– –– –– ––
Calculates an angle (radian value)
by COS
-1
operation ( )
Converts the radian value into an angle ( )
Converts the angle in 32-bit floating-point
real number into an integer ( )
Outputs the integer-converted angle
to a display device ( )
1
2
3
4
Step Instruction Device
Conversion
to BIN
32-bit floating-point
real number
D21
D20
INT
BCD operation
BCD
ACOS
Conversion to angle
DEG
Y4F
BCD value
0060
Y40
D30
b15
b0
BIN value
60
32-bit floating-point
real number
D1
D0
32-bit floating-point
real number
D11
D10
COS
-1
operation
0
.
5
1
.
047
1
98
60
Universal
LCPU
Basic
High
performance
Process
Redundant
Command
Command
ACOSDP
ACOSD
ACOSDP
ACOSD S D
S D
S
D
S
D

Table of Contents

Related product manuals