18.25 Fnc137 - Deg / Floating Point Radians To Degrees Conversion - Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
18.25 FNC137 – DEG / Floating Point Radians to Degrees Conversion
Outline
This instruction converts a value in radians into a value in degrees.
1. Instruction format
FNC 137
D
DEG
P
2. Set data
Operand Type
S
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
D
Explanation of function and operation
1. 32-bit operation (DDEG and DDEGP)
The unit of [
S
].
D
Command
input
FNC137
DDEG
• The conversion from radians into degrees is executed as follows:
Degrees = Radians ×
Program example
In the program example shown below, a binary floating point value set in radians in D20 and D21 is converted into a
BCD value in degrees, and stored to Y040 and Y057 when X000 turns ON.
X000
Operation when "1.435792" is specified in D20 and D21
D21
D20
1.435792
Binary floating point
value (real number)
Mnemonic
16-bit Instruction
Head device number storing a value in radians to be converted into a value in degrees
Head device number storing a value in degrees acquired by conversion
Digit Specification
+1,
] is converted from radians into degrees, and the operation result is stored to [
S
S
D
180
π
FNC137
D20
DDEG
FNC129
D10
INT
FNC 18
D0
BCD
[1]
Conversion
D11
into degrees
82.26482
Binary floating point
DDEG
value (real number)
18.25 FNC137 – DEG / Floating Point Radians to Degrees Conversion
→ For handling of floating point, refer to Subsection 5.1.3.
Operation Condition
32-bit Instruction
9 steps
Description
Word Devices
Special
System User
Unit
V
+1
S
S
rad
Binary floating point
(real number)
A value in radians is converted into a value in
D10
degrees ([1]).
The angle in binary floating point (real number) is
D0
converted into an integer ([2]).
The converted integer is output to the display unit
K4Y40
([3]).
END
[2]
Conversion
into binary
D10
value
INT
18 Floating Point – FNC110 to FNC139
Mnemonic
Operation Condition
Continuous
DDEG
Operation
Pulse (Single)
DDEGP
Operation
Data Type
Real number (binary)
Others
Con-
Real
Charac-
Index
stant
Number
ter String
Z Modify K H
E
" "
+1
D
D
Binary floating point
(real number)
[3]
D0
Conversion
b15
b0
Y057 Y040
into BCD
82
0
Binary
BCD
value
value
11
12
13
14
Pointer
P
15
+1,
D
16
°
17
18
19
20
0 8
2
BCD
531

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents