Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
18 Applied Instructions (Floating Point)
18.21 DASIN / Floating Point Arc Sine
487
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
Error
In the following cases, it is an operation error, error flag (M8067) is turned ON, and error code is stored in
D8067.
When the value specified by is out of the range of -1.0 to 1.0. (Error code: K6706)
Program example
This is a program for determining SIN
-1
of D0, D1 (binary floating decimal point) when the X000 is ON, and
sending the angle to Y040 to Y057 in BCD four digits.
Operation when the value of D0, D1 is 0.5.
[Structured ladder/FBD]
X000
D20
DASIN
EN
s
ENO
INT
EN
s
ENO
d
d
D30
[ST]
DACOS(X000,D0,D10);
DDEG(X000,D10,D20);
INT(X000,D20,D30);
DDEG
EN
s
ENO
d
D20
D30
BCD
EN
s
ENO
d
K4Y40
D0
D10
D10
BCD(X000,D30,K4Y10);
Calculation of angle (radian) by
SIN
-1
operation. (1))
Conversion of radian into angle. (2))
Conversion of angle of binary floating
decimal point (real number) into integer (BIN). (3))
Output of angle converted to integer (BIN)
to display unit. (4))
Value of binary floating
decimal point (real number)
0.5
D1 D0
1) SIN
-1
conversion
Value of binary floating
decimal point (real number)
0.5235988
D11 D10
DASIN
Value of binary floating
decimal point (real number)
30
D21 D20
3) BIN
conversion
30
b15 b0
D30
BIN value
4) BCD
operation
BCD
0 0 3 0
Y057 Y040
BCD value
DDEG
2) Angle conversion
INT