EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 514

Mitsubishi Electric MELSEC FX Series
838 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 Applied Instructions
7.12 Floating Point
512
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Caution
When handling 32-bit data in structured program, you cannot specify 16-bit device directly unlike the simple
project. When handling 32-bit data, please use the label.
However, the 32-bit counter is a 32-bit long device, and can be specified directly.
When specifying the device, use the global label.
Program example
This is a program for converting the radian value set in binary floating decimal point in D20, D21 to the angle
when the X000 is ON, and issuing to the Y040 to Y057 in BCD value.
Operation when the value of D20, D21 is 1.435792.
[Structured ladder]
X000
D0
DDEG
EN
s
ENO
BCD
EN
s
ENO
d
d
K4Y40
*1. VAR_01 is global label, and D20 is defined.
*2. VAR_02 is global label, and D10 is defined.
[ST]
DDEG(X000,VAR_01,VAR_02);
INT:=(X000,VAR_03,D0);
BCD(X000,D0,K4Y40);
*3. VAR_03 is global label, and D10 is defined.
INT
EN
s
ENO
d
D0
VAR_01
*1
VAR_02
*2
VAR_03
*3
Radial value is converted to angle. (1))
Angle of binary floating decimal point (real number)
is converted to integer. (2))
The converted integer value is issued
to the display unit. (3))
1) Angle
conversion
DDEG
0 8
Y057 Y040
0 2
Value of binary floating
decimal point (real number)
Value of binary floating
decimal point (real number)
1.435792
D21 D20
3) BCD
conversion
BCD
82.26482
D11 D10
82
b15 b0
D0
BIN value
2) BIN
conversion
INT BCD value

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals