Mitsubishi Electric MELSEC FX3U Programming Manual page 547

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Program example
In the program example shown below, the SIN
calculated, and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
X000
Operation when "0.5" is stored in D0 and D1
D1
D0
0.5
Binary floating point
(real number) value
D21
D20
30
Binary floating point
(real number) value
−1
value of data (binary floating point) stored in D0 and D1 is
FNC133
D0
D10
DASIN
FNC137
D10
D20
DDEG
FNC129
D20
D30
INT
FNC 18
D30
K4Y40
BCD
END
[1]
Conversion
−1
by SIN
D11
operation
0.5235988
Binary floating point
DASIN
(real number) value
[2] Conversion into degrees
[3]
D30
Conversion
b15
b0
into binary
operation
30
Binary
INT
value
18 Floating Point – FNC110 to FNC139
18.21 FNC133 – ASIN / Floating Point Arc Sine
The angle (in radians) is calculated by the SIN
operation ([1]).
The value in radians is converted into the value in
degrees ([2]).
The angle expressed in binary floating point (real
number) is converted into an integer (binary) ([3]).
The angle expressed in integer (binary) is output to
the display unit ([4]).
D10
DDEG
[4] BCD
Y057 Y040
0 0 3 0
BCD
BCD
value
11
−1
12
13
14
15
16
17
18
19
20
545

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents