EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 488

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
486
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.
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 negative. (Error code: K6706)
When the value specified by is 0. (Error code: K6706)
Program example
This is a program for determining the common logarithm of "15" set in D50 when the X000 is ON, and storing
in D30, D31.
[Structured ladder]
X000
VAR_02
*2
MOV
EN
s
ENO
K15 D50
DLOGIO
EN
s
ENO
d
d
VAR_03
*3
*1. VAR_01 is global label, and D40 is defined.
*2. VAR_02 is global label, and D40 is defined.
[ST]
MOV(X000,K15,D50);
FLT:=(X000,D50,VAR_01);
DLOGIO(X000,VAR_02,VAR_03);
*3. VAR_03 is global label, and D30 is defined.
FLT
EN
s
ENO
d
VAR_01
*1
D50
Setting of data for common logarithm operation. (1))
Conversion of operation data into binary
floating decimal point (real number). (2))
Operation of common logarithm (3))
Value of binary floating
decimal point (real number)
15
10
1)
MOV
15
b15 b0
2) Conversion of binary
floating decimal point
(real number)
3) LOG
operation
DLOG10
D41 D40
Value of binary floating
decimal point (real number)
1.176091
D31 D30
FLT
D50
BIN value

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals