Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
18 Applied Instructions (Floating Point)
18.17 INT / Floating Point to Integer Conversion
481
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
Function and operation explanation
1. 16-bit operation (INT, INTP)
The binary floating decimal point of the device specified by is converted into BIN integer, and is
transferred to the device specified by .
Instruction of reverse converting operation
Reverse converting operation of the operation of this instruction is FLT.
As for FLT instruction, refer to 11.10.
2. 32-bit operation (DINT, DINTP)
The binary floating decimal point of the device specified by is converted into BIN integer, and is
transferred to the device specified by .
Instruction of reverse converting operation
Reverse converting operation of the operation of this instruction is DFLT(FNC49) instruction.
As for FLT instruction, refer to 11.10.
Related devices
As for the manner of using the zero, borrow, and carry flag, refer to the FX Structured Programming
Manual [Device & Common].
Cautions
1) Fractions below the decimal point are discarded in operation.
2) The instruction is provided in the FX
3G PLC Ver. 1.10 or later.
3) Some restrictions to applicable devices.
S1: The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2: The FX
3U and FX3UC PLCs only are applicable.
Device Name Content
M8020 Zero To be turned ON when the operation result is 0.
M8021 Borrow To be turned ON when less than 1 is discarded in convertion.
M8022 Carry
To be turned ON when the operation result overflows by exceeding the range of -32, 768 to 32,
767 (in 16-bit operation), or -2, 147, 483, 583 to 2, 147, 483, 583 (in 32-bit operation).
(Operation result is not reflected.)
Command
input
INT
EN ENO
d
s
Binary floating
decimal point
To discard below the decimal
point of 16-bit BIN integer.
+1,
ds s
Device for storing the data
to be converted into BIN integer
The device for storing
the converted data.
Binary floating
decimal point
To discard below the decimal
point of 32-bit BIN integer.
+1,
s s
+1,
d d
DINT
EN ENO
d
s
Command
input
Device for storing the data
to be converted into BIN integer
The device for storing
the converted data.