FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Program example
1. Arithmetic operations by binary floating point operations
The sequence program shown below is constructed as follows:
1)
Calculation example
(D 0)
16-bit binary
(1)
(D 21, D 20)
Binary floating
point operation
2)
Sequence program
M8000
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
× K34.5
÷
(X017 to X010)
2-digit BCD
(2)
(5)
(D 22)
(D 27, D 26)
BIN
Binary floating
point operation
(3)
(D 25, D 24)
Binary floating
point operation
(D 29, D 28)
Binary floating
point operation
FNC 49
D 0
D 20
FLT
FNC 19
K2X010
D 22
BIN
FNC 49
D 22
D 24
FLT
FNC 123
K345
K 10
DEDIV
FNC 123
D 20
D 24
DEDIV
FNC 122
D 28
D 26
DEMUL
FNC 118
D 10
D 12
DEBCD
FNC 129
D 10
D 14
DINT
12.10 FNC 49 – FLT / Conversion to Floating Point
(D 11, D 10) Binary floating point
(6)
(7)
(4)
(8)
(D 0) → (D21, D20)
BIN
Binary floating point operation
(X017 to X010) → (D22)
BCD
BIN
(D22) → (D25, D24)
BIN
Binary floating point operation
K345 ÷ K 10 → (D27, D26)
D 26
Binary floating point operation
(D21, D20) ÷ (D25, D24) → (D29, D28)
D 28
Binary floating point
division
(D29, D28) × (D27, D26) → (D11, D10)
D 10
Binary floating point multiplication
→ (D13, D12)
(D11, D10)
Binary floating
Scientific notation operation
point operation
for monitoring
→ (D15, D14)
(D11, D10)
Binary floating
32-bit binary integer
point operation
12 Data Operation – FNC 40 to FNC 49
operation
(D 13, D 12)
Scientific notation operation
for monitoring
(D 15, D 14)
32-bit binary integer
Binary floating point
operation
11
12
13
14
15
16
17
18
19
20
337